Set a collection's languages through an e2e hook, not by writing XML (BL-16799) - #8300
Closed
hatton wants to merge 3 commits into
Closed
Set a collection's languages through an e2e hook, not by writing XML (BL-16799)#8300hatton wants to merge 3 commits into
hatton wants to merge 3 commits into
Conversation
A test that needed different collection languages stopped Bloom, composed a `.bloomCollection` file by hand, and started Bloom again. No part of Bloom writes that file that way, so the test exercised a path a user never takes, and it got a different answer for it: the publish list showed the dropped language's own name for itself rather than the name the collection remembers. `e2e/setCollectionLanguages` takes one to three language tags and does the work of the Collection Settings dialog's OK button, `CollectionSettingsDialog.UpdateLanguageSettings` included. `helpers/collection.ts setCollectionLanguages` posts to it and restarts Bloom, which is still needed because Bloom reads the languages when it opens the collection. Test Case ID 169 therefore runs again. It was skipped on master because it failed on CI every time, on the language name: Bloom asks LibPalaso for that name "in" the collection's metadata language, and LibPalaso answers differently depending on whether a native ICU library is findable. Going through the dialog's own code keeps the collection's name for the language, so the list reads "Spanish" on every machine and that lookup is never reached. The lookup itself is a real defect, tracked on BL-16806, and AUTOMATION-DEBT.md now records both it and the coverage this test no longer gives. The Settings dialog is still invisible to CDP, so its own entry stays.
hatton
force-pushed
the
BL-16799-collection-languages
branch
from
September 3, 2026 19:40
9722757 to
a942645
Compare
Master moved while this stack was open, so each branch merges the one below it. Two places in src/BloomE2E/AUTOMATION-DEBT.md conflicted. This branch deleted the whole "work in progress" block, because in the world it was written in its own row was the last one in the table. Master's table does not empty out when this branch lands: it still names e2e-private-user-settings and e2e-real-library-login, which nobody has opened yet, and three entries still carry a "being fixed" line pointing at those two. So the block stays here, without this branch's row, and the sentence that counted the rows now says what is true of the two that are left. In the entry about WinForms surfaces being invisible to CDP, master annotated the promise with the pull request's number, while this branch replaces the promise with what it did. The branch's text stands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BaWw4EHWrbFF2fNJvMJVC8
hatton
commented
Sep 3, 2026
| // ChangeTag just computed instead of the English one. | ||
| pending[i].SetName(pending[i].Name, false); | ||
| pending[i].SetName(pending[i].GetNameInLanguage("en"), true); | ||
| } |
Member
Author
There was a problem hiding this comment.
[Devin] Bug: Language hook creates impossible metadata
When a slot changes language, HandleSetCollectionLanguages retains its old direction and forces an English custom name. Tests can pass against states the Settings chooser never creates.
(src/BloomExe/web/controllers/E2eTestingApi.cs:379)
Member
Author
|
[Claude Opus 5 from Hatton's machine during devin-review] Consulted Devin on 2026-09-03 22:45 UTC up to commit |
The e2e documentation told the reader to serve the dev server on 5173, and to stop a Bloom that already held that port. Both instructions came from a wrong diagnosis of a failure on 2026-09-02. --vite-port honours any port. ReactControl.ReplaceViteDevOrigin rewrites the literal http://localhost:5173 in the HTML of all three Edit frames, including the two *.vite-dev.pug files that the entry said ignored the flag, and its three callers have been in place since a170199 (2026-03-13). A run on port 5199 on 2026-09-03 loaded the shell, the toolbox and the page list from 5199; the page list drew its 53 thumbnails and the toolbox drew the Talking Book Tool. What really failed on 2026-09-02 is the other half of the same entry: BLOOM_E2E_VITE_PORT was unset, so Bloom probed 5173, found nothing, and served a day-old output/browser that had no duplicate-page-button test id. So the README now says to set the variable and use any free port, and the debt entry that blamed the port is gone. The remaining debt, that a run inherits its front end from whatever else is running, keeps the record. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BaWw4EHWrbFF2fNJvMJVC8
Member
Author
|
[Claude Fable 5.1 following a prompt from Hatton] Closed at Hatton's request. This change is not going in. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A test that needed different collection languages stopped Bloom, composed a
.bloomCollectionfile by hand, and started Bloom again. No part of Bloom writes thatfile that way, so the test exercised a path a user never takes, and it got a different
answer for it: the publish list showed the dropped language's own name for itself
rather than the name the collection remembers.
e2e/setCollectionLanguagestakes one to three language tags and does the work of theCollection Settings dialog's OK button,
CollectionSettingsDialog.UpdateLanguageSettingsincluded.
helpers/collection.ts setCollectionLanguagesposts to it and restarts Bloom,which is still needed because Bloom reads the languages when it opens the collection.
Test Case ID 169 therefore runs again. It was skipped on master because it failed on CI
every time, on the language name: Bloom asks LibPalaso for that name "in" the
collection's metadata language, and LibPalaso answers differently depending on whether
a native ICU library is findable. Going through the dialog's own code keeps the
collection's name for the language, so the list reads "Spanish" on every machine and
that lookup is never reached. The lookup itself is a real defect, tracked on BL-16806,
and AUTOMATION-DEBT.md now records both it and the coverage this test no longer gives.
The Settings dialog is still invisible to CDP, so its own entry stays.
This is one of eleven stacked pull requests (BL-16799)
Each one pays down one entry of
src/BloomE2E/AUTOMATION-DEBT.md, and each branches off the one before it. Base:BL-16799-page-change. Review only this pull request's own commit; the ones below it are reviewed in their own pull requests. The first six change test and tooling code only; the last five also change product code.BL-16799-automation-scripts— Make the bloom-automation scripts safe to ask for helpBL-16799-vr-collect-failures— Report every failed image comparison in a visual-regression case, not the firstBL-16799-component-tests-in-ci— Run the component-tester Playwright suites nightlyBL-16799-vite-port— Let an e2e run test the working tree's front endBL-16799-type-in-one-call— Type into a text box in one call, not one key press per characterBL-16799-page-screenshot— Capture a whole book page from a testBL-16799-toolbox-registration— Register the toolbox tools from one list both callers shareBL-16799-shell-document— Stop a test attaching to a shell document Bloom does not driveBL-16799-tab-test-ids— Click a workspace tab by a test id, not by its localized labelBL-16799-page-change— Refuse a page change the Edit tab cannot do, and wait before askingBL-16799-collection-languages— Set a collection's languages through an e2e hook, not by writing XMLReplaces #8276, which did all of this in one pull request.
Verification of the whole stack, at its tip: the C# suite passes (3338 passed, 13 skipped), the front-end vitest suite passes (781 passed, 5 skipped), and the
src/BloomE2Esuite passes against a Vite dev server on the working tree (36 passed, 0 skipped, 8.2 minutes). Each pull request also has its own type check and lint.🤖 Generated with Claude Code
Devin review
This change is