Skip to content

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

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

andrew-polk wants to merge 1 commit 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) and, in a Team Collection, checked in the browser with the front end's existing email check. If they are invalid, the field says so and OK is disabled. That check is a little stricter than the C# one, so an address saved earlier such as admin@intranet must be fixed before the settings can be saved. A change is saved by Apply 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 was split so the page can keep the administrators itself; the WinForms tab keeps a thin wrapper.
  • CreateTeamCollectionDialog now always hands the chosen folder to its caller. The WinForms tab gets its old create-at-once behavior from a small LegacyCreateTeamCollectionDialog wrapper, which goes at cutover.

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.

Automated Tests

  • vitest (CollectionSettingsDialog.test.tsx, administrators.test.ts): which collections get the page, administrator checking (including addresses saved under the looser rule), saving with the folder when Create & Restart is pressed, Cancel saving nothing, and the rename guard.
  • NUnit (CollectionSettingsUpdaterTests): Apply saving the administrators only in a Team Collection, creating the Team Collection only after saving, and refusing a Pro code when creating.

It replaces master's ApplyAdministrators_OnlyInATeamCollection with Apply_AdministratorsOutsideATeamCollection_Ignored, since ApplyAdministrators is now part of Apply (approved by Andrew).

Test of the change: the vitest and NUnit tests above.

E2E Coverage

None. No e2e test drives the new Collection Settings dialog yet; one is added at cutover (BL-17042). The unit tests above cover the change instead.

Live checks:

  • With an unsaved new collection name, the page showed the note and a disabled Create button in a running Bloom (ef01fcb, before the restack; that code is unchanged since).

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 PR appears safe to merge with no new actionable findings.

Summary

Adds the React Team Collection page using the existing panel and Create dialog.

  • The React settings page now shows and saves Team Collection administrators.
  • Create & Restart saves the settings before making a Team Collection.

Reviews (3) · Last reviewed commit: "Create Team Collection dialog: callers 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 Outdated
@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
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.

@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.

@andrew-polk
andrew-polk force-pushed the BL-16735-team-collection-settings branch from 0dc7f2e to bc640b7 Compare October 26, 2026 21:00
@andrew-polk

Copy link
Copy Markdown
Contributor Author

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

@andrew-polk

andrew-polk commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 from Andrew Polk's machine during preflight]

Consulted Devin on 2026-10-26 up to 6ce8ecb (the restacked branch plus this round's simplification of the Create dialog and the administrators check). Nothing new: every finding it lists is an earlier one that already has an answer on its thread. The one about local-domain administrators is now reversed on purpose; its thread records that decision.

The page shows the WinForms tab's panel (TeamCollectionSettings, with its warning and subscription overlay). The dialog keeps the administrators, checks them with the front end's email check (OK is disabled while they are invalid, including ones saved earlier under C#'s looser rule), and Apply saves them in a Team Collection. Create & Restart opens the existing Create dialog, which hands back the chosen folder: the dialog saves the other edits, then C# creates the Team Collection (TeamCollectionApi.CreateTeamCollection) and Bloom restarts; Pro is refused when creating. Create is disabled while a collection rename is unsaved. The page is hidden when the feature is off and this is not a Team Collection, and for a book downloaded for editing. The WinForms tab keeps its create-at-once behavior through LegacyCreateTeamCollectionDialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrew-polk
andrew-polk force-pushed the BL-16735-team-collection-settings branch from 6ce8ecb to 8dd7cb3 Compare October 26, 2026 22:23
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 from Andrew Polk's machine]

Consulted Devin on 2026-10-26 up to 8dd7cb3 (the squash of 6ce8ecb onto BL-16733's new 02027ff). Devin reports an unchanged diff and repeats its earlier findings; each already has an answer on its thread. Nothing new.

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