Skip to content

Collection Settings in React: Team Collection page (BL-16735) - #8500

Draft
andrew-polk wants to merge 5 commits into
BL-16733-xmatter-settingsfrom
BL-16735-team-collection-settings
Draft

andrew-polk wants to merge 5 commits into
BL-16733-xmatter-settingsfrom
BL-16735-team-collection-settings

Conversation

@andrew-polk

@andrew-polk andrew-polk commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The new React Collection Settings dialog (BL-16271) showed only a placeholder on its Team Collection page. Users still had to use the old WinForms dialog to see a Team Collection's shared folder, edit its administrators, or turn a collection into a Team Collection.

What the PR does

  • The page reuses the old tab's panel, including the experimental warning and the subscription overlay. The WinForms tab and its Create dialog keep working as before.
  • Administrators are kept by the dialog (like the subscription code). When the user edits them, they are checked in the browser using the rule CollectionSettings.ValidateAdministrators uses. If they are invalid, the field says so and OK is disabled. A change is saved through ApplyAdministrators and needs a restart, as in the old dialog.
  • Create a Team Collection opens the existing Create dialog in the browser, starting in the user's Dropbox folder. Its Create & Restart works as before: the settings dialog saves the user's other edits, then C# creates the Team Collection (TeamCollectionApi.CreateTeamCollection, split out of the old endpoint) and Bloom restarts. The edits are saved first so they reach the shared copy. The Team Collection subscription rules apply, so a Pro code typed in the same save is refused. This reverses PLAN Q12, which had deferred the create to the settings dialog's OK; the plan says why.
  • No create while a rename is unsaved. A rename only happens as Bloom restarts, so the Team Collection would get the old name, which is also the name the Create dialog asks the user to approve. While the collection name has an unsaved edit, Create is disabled with a note to save the rename first.
  • The page is hidden when the Team Collections feature is off (as saved) and this is not a Team Collection, and in a collection holding a Bloom Library book downloaded for editing, as in the old dialog.

Screenshots

With an unsaved new name on the Advanced page, Create is disabled and the page says why. (A collection without the needed subscription shows the old tab's overlay over this panel, as before; it was hidden for this shot.)

Team Collection page with a note to save the collection's new name first, above a disabled Create a Team Collection button

The existing Create dialog, now shown in the browser over the settings dialog. Create & Restart saves the settings, creates the Team Collection and restarts.

Create a Team Collection dialog with Create & Restart, over the Collection Settings dialog

Risk Evaluation

Low. The shared code it changes:

  • CollectionSettingsUpdater.Apply, the React dialog's save path, now applies posted administrators and, after saving, a requested Team Collection.
  • The old teamCollection/createTeamCollection endpoint now calls a method split out of it, with the same steps and error reporting.
  • TeamCollectionSettingsPanel and CreateTeamCollectionDialog were refactored so that the old WinForms tab and dialog behave exactly as before.

Everything else is reached only through the new page.

Ecosystem Impact

No change to books, published output or the collection file format: administrators are saved exactly as the old dialog saves them. One new string, CollectionSettingsDialog.TeamCollectionPage.SaveRenameFirst, in BloomLowPriority.xlf with translate="no" like the other new pages' strings; the page otherwise reuses the existing TeamCollection.* strings. No new dependencies.

E2E Coverage

None. No e2e test drives the new Collection Settings dialog yet; PLAN step 6 adds one at cutover. Unit tests cover the change instead:

  • vitest: which collections get the page, administrator checking, saving with the folder when Create & Restart is pressed, and the rename guard.
  • NUnit: Apply saving the administrators, creating the Team Collection only after saving, and refusing a Pro code when creating.

Notion Test Suite

None.

Preflight report: https://bloombooks.github.io/dev-process-artifacts/deciders/bloomdesktop-bl-16735-team-collection-settings.html

Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16735

🤖 Generated with Claude Code

Devin review


This change is Reviewable

@andrew-polk
andrew-polk added this pull request to stack #8498 October 23, 2026 16:40
Comment thread src/BloomExe/Collection/CollectionSettingsUpdater.cs
Comment thread src/BloomExe/Collection/CollectionSettingsUpdater.cs
Comment thread src/BloomExe/web/controllers/CollectionSettingsApi.cs
Comment thread src/BloomBrowserUI/teamCollection/administrators.ts
@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in Greptile

[Medium impact] The changes affect the Team Collection settings and creation workflow.

Update the dependent caller in PR #8502 before merging this change through the stack.

Findings

  1. P1 Dependent caller misses required props ▶

Summary

Adds the React Team Collection page using the existing controls.

  • The React settings dialog now shows Team Collection details and administrator controls.
  • Create & Restart saves the settings before creating a shared Team Collection.

Reviews (2) · Last reviewed commit: "Team Collection page: Create & Restart c..." · Reviewed by Greptile

Comment thread src/BloomExe/Collection/CollectionSettingsUpdater.cs
Comment thread src/BloomExe/web/controllers/CollectionSettingsApi.cs
Comment thread src/BloomExe/Collection/CollectionSettingsUpdater.cs
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 from Andrew Polk's machine during preflight] Consulted Devin on 2026-10-23 17:00 UTC up to commit 0b57ebc. It found 5 bugs over two rounds. Two are fixed: the Pro rule for a pending create and saved administrators blocking saves. Two are declined with reasons: retry after a failed create and the silently refused Pro code. One is left open for Andrew to decide: rename and create in the same save. It also made 1 informational note (accepting the default Dropbox folder skips the early location check, as the old dialog does).

Comment thread src/BloomBrowserUI/collection/CollectionSettingsDialog.tsx
Comment thread src/BloomBrowserUI/collection/settingsPages/TeamCollectionPage.tsx
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Devin] Bug: Deleted localization entry lacks lossless-deletion evidence (DistFiles/localization/en/BloomMediumPriority.xlf:88; outside the PR's diff, so not resolvable as a thread)

The removed WillCreate entry is unused, but the PR gives no evidence that deleting it preserves translations. The localization rules require that evidence before removing a trans-unit.


✅ Not an issue. [Claude Opus 5.5 from Andrew Polk's machine during preflight] The evidence:

  • CollectionSettingsDialog.TeamCollectionPage.WillCreate was added by this PR's first commit (ad994a1) and removed by its third (1f3abe5). git log -G finds it in no other commit, and on neither origin/master nor the base branch.
  • It was translate="no" the whole time, so it was never sent to Crowdin.
  • It appears in no translated XLF file.
  • Against the base branch, the PR's net diff doesn't touch BloomMediumPriority.xlf at all. That's why this comment can't be anchored to the file.

Nothing is deleted from what reviewers or translators have seen.

@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 from Andrew Polk's machine during preflight] Consulted Devin on 2026-10-23 up to commit 1f3abe5. It considers rename and create in the same save fixed. Three new points are answered with no code change: a failed save drops the create request (declined, with the reason), the description was out of date (refreshed), and evidence for the XLF entry removal (the PR's net diff deletes nothing). No review threads are open.

@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 from Andrew Polk's machine during preflight] @greptile-apps review

Comment thread src/BloomBrowserUI/collection/settingsPages/TeamCollectionPage.tsx
@andrew-polk
andrew-polk force-pushed the BL-16735-team-collection-settings branch 2 times, most recently from 1a5dfa1 to f14df6f Compare October 23, 2026 21:16
andrew-polk and others added 4 commits October 23, 2026 16:01
Reuses the WinForms tab's panel; the dialog keeps the administrators (checked in the client) and the folder to create a Team Collection in, which C# applies after saving. The page is hidden when the feature is off outside a Team Collection, and for a Bloom Library book downloaded for editing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d administrators (BL-16735)

A collection becoming a Team Collection in the same save now gets the Team Collection subscription rule, so it cannot take a Pro code with it. Saved administrators are no longer re-checked by the browser's stricter email rule, which blocked every save for an address like admin@intranet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ename is unsaved (BL-16735)

Reverses PLAN Q12: the Create dialog's Create & Restart now has the settings dialog save at once (the user's other edits first, so they reach the shared copy), then create the Team Collection and restart, as in the old dialog. While the collection name has an unsaved edit, Create is disabled with a note to save the rename first; otherwise the Team Collection would get the old name, which is also the name the Create dialog asks the user to approve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BL-16734 made CollectionSettingsValues.Subscription a copy made in the constructor that populating overwrites; the Team Collection values, which follow its pattern, now do the same instead of keeping a posted object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrew-polk
andrew-polk force-pushed the BL-16735-team-collection-settings branch from f14df6f to 01c8b47 Compare October 23, 2026 23:03
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 from Andrew Polk's machine during preflight] Consulted Devin on 2026-10-23 up to commit 01c8b47, after the stack was restacked onto BL-16733 5b07891. No new findings: the rebase carried over earlier ones, each already answered on its thread, including the out-of-date description note, which was refreshed earlier. No review threads are open.

…BL-16735-team-collection-settings

# Conflicts:
#	src/BloomBrowserUI/collection/CollectionSettingsDialog.test.tsx
#	src/BloomBrowserUI/collection/CollectionSettingsDialog.tsx
#	src/BloomBrowserUI/collection/collectionSettingsTypes.ts
#	src/BloomExe/web/controllers/CollectionSettingsApi.cs
#	src/BloomExe/web/controllers/CollectionSettingsTypes.cs
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 from Andrew Polk's machine] Consulted Devin on 2026-10-23 up to merge commit 0dc7f2e (BL-16733's 5e1682b merged in). No new findings: only earlier ones, each already answered on its thread. No review threads are open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant