Collection Settings in React: dialog shell and save pipeline (BL-16902) - #8388
JohnThomson wants to merge 2 commits into
Conversation
Disabling OK while the save is in flight left it disabled for good if the POST itself failed, so the only way out was Cancel, which throws away the edits. The dialog now re-enables OK when the save fails, and a test covers it. Found by Devin on PR #8388. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…902) The error callback added a moment ago swallowed the failure: bloomApi only reports an error when nothing handles it, so a save that failed outright went by with no sign at all. The callback now re-throws after re-enabling OK, so the failure still reaches Bloom's usual error reporting, and the test checks that. Found by Devin on PR #8388. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
[Claude Opus (subagent of Claude Fable 5.1) from John Thomson's machine during preflight] Consulted Devin on 2026-09-22, up to commit Across three rounds it raised five bugs and two things to investigate. Two of the bugs were about the new React Settings dialog stranding the user after a failed save — one leaving OK disabled for good, one then hiding the failure entirely — and both are fixed ( Three threads are deliberately left open, waiting on the developer: posting a null third language does not remove it, retrying a save whose response was lost would hit an ended session, and the four new page labels went into the top-priority XLF without the priority being confirmed first. Each has its own thread on this PR. CI ( |
|
[Claude Opus (subagent of Claude Fable 5.1) from John Thomson's machine during preflight] Consulted Devin again on 2026-09-22, up to commit Nothing new. The review of this commit repeats the set it already raised, and now also considers the third-language question answered by the note added to the TypeScript contract. Of the threads that were waiting on the developer, two are decided and resolved above — the no-session posts are ignored again, and a null third language is defined to mean "leave it alone", with an empty tag being how you remove one. The XLF priority question is still open for John. CI ( |
|
[Claude Opus 5.5 during preflight] Consulted Devin on 2026-09-25 22:31 -07:00 up to commit ee2e072. Across this run it raised four new bugs (subscription revert saving the undone code, and its lingering restart; Cancel during a save; a late settings reply after reopening) and two Investigate flags; all are fixed or answered on their own threads and resolved. Its final pass on the head commit found nothing new. |
…er traps Found while hand-testing BL-16902: clicking WinForms tabs from DPI-unaware PowerShell, pointing Bloom at a scratch collection, the collection-rename relaunch, and the workspace page's changing URL. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Seven placeholder Config-R pages opened from a second Settings button, from the browser on any tab. OK saves once through CollectionSettingsUpdater, shared with the WinForms dialog via a PendingCollectionSettings session; restart reminder, validation errors, retry after a failed save, and an administrators-only message in Team Collections. Plan for the rest of BL-16271 in docs/collection-settings-react/PLAN.md. Co-authored-by: John Thomson <john_thomson@sil.org> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ee2e072 to
075c110
Compare
Problem
BL-16271 is moving Bloom's collection Settings dialog off WinForms and onto React with Config-R, and nothing on master was ready for that work to start. The React side was an empty two-page skeleton that nothing launched, backed by a placeholder endpoint. Everything that actually saves collection settings lived inside the WinForms dialog's OK handler, reachable from anywhere else only through a static pointer to the currently-open WinForms dialog. None of the seven per-tab cards could begin against that.
What the PR does
showCollectionSettingsDialog(pageKey?)raises the dialog's launch event directly, with no round trip through C#, andApprenders the dialog, so later callers on the Edit or Publish tab can open it too, on a named page.GET collection/settingsapplies the same rule as the old button: a member who is not an administrator gets just the reason, in a small dialog with Close, and no editing session is opened.PendingCollectionSettingssession replaces the staticDialogBeingEditedpointer, so both dialogs and the React tab components that already exist (Subscription, Team Collection, bookshelf) read and write the same pending state during the overlap. A post that lands when no dialog is open (a control losing focus as one closes) is ignored rather than failing.CollectionSettingsUpdater.Validate/Applyholds what the WinForms OK handler used to do, with unit tests. The legacy dialog keeps working unchanged through it and the shared session.The plan for the rest of BL-16271, with its settled decisions, is
docs/collection-settings-react/PLAN.md.Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16902
🤖 Generated with Claude Code
Devin review
This change is