Skip to content

Refuse a page change the Edit tab cannot do, and wait before asking (BL-16799) - #8299

Open
hatton wants to merge 2 commits into
masterfrom
BL-16799-page-change
Open

Refuse a page change the Edit tab cannot do, and wait before asking (BL-16799)#8299
hatton wants to merge 2 commits into
masterfrom
BL-16799-page-change

Conversation

@hatton

@hatton hatton commented Sep 3, 2026

Copy link
Copy Markdown
Member

editView/jumpToPage replied success to a jump it dropped, so a test that asked at
the wrong moment saw an empty page iframe and asked again, up to three times, 20
seconds apart. A real "this page will not load" defect looked the same.

Two changes, one on each side:

  • EditingModel.JumpToPage says whether it did the jump, and HandleJumpToPage
    replies with a failure when it did not. postString takes a report argument, so
    the two callers in the front end can turn off the problem report for a failure that
    is a matter of timing and that a user cannot put right.
  • e2e/editState reports what the Edit tab is doing, and how many times the page it
    shows has announced itself. waitForEditTabSettled reads that twice, 1500 ms apart,
    and every helper that changes the page calls it first.

The count of announcements is the part that matters: a page announces itself twice, and
a page change that arrives between the two announcements wedges the Edit tab in
SavePending. The state alone reads Editing in that window. No test can see this from
the DOM, because Bloom leaves the previous page in the frame while it loads the next.

That Bloom defect is older than this suite and still open. AUTOMATION-DEBT.md now has
an entry for it, with the log lines that show it and two fix directions, both of which
change production save behavior.

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-tab-test-ids. 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.

  1. BL-16799-automation-scripts — Make the bloom-automation scripts safe to ask for help
  2. BL-16799-vr-collect-failures — Report every failed image comparison in a visual-regression case, not the first
  3. BL-16799-component-tests-in-ci — Run the component-tester Playwright suites nightly
  4. BL-16799-vite-port — Let an e2e run test the working tree's front end
  5. BL-16799-type-in-one-call — Type into a text box in one call, not one key press per character
  6. BL-16799-page-screenshot — Capture a whole book page from a test
  7. BL-16799-toolbox-registration — Register the toolbox tools from one list both callers share
  8. BL-16799-shell-document — Stop a test attaching to a shell document Bloom does not drive
  9. BL-16799-tab-test-ids — Click a workspace tab by a test id, not by its localized label
  10. BL-16799-page-change — Refuse a page change the Edit tab cannot do, and wait before asking
  11. BL-16799-collection-languages — Set a collection's languages through an e2e hook, not by writing XML

Replaces #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/BloomE2E suite 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 Reviewable

Comment thread src/BloomExe/Edit/EditingModel.cs
Comment thread src/BloomE2E/helpers/bookMaking.ts Outdated
`editView/jumpToPage` replied success to a jump it dropped, so a test that asked at
the wrong moment saw an empty page iframe and asked again, up to three times, 20
seconds apart. A real "this page will not load" defect looked the same.

Two changes, one on each side:

- `EditingModel.JumpToPage` says whether it did the jump, and `HandleJumpToPage`
  replies with a failure when it did not. It also refuses a page id the book does
  not have: such an id used to pass the guard and report success, while
  OnBecomeVisible fell back to the most recently edited page and a
  save-then-navigate landed wherever the id took it, so the caller waited for a page
  that could not appear. `postString` takes a `report` argument, so the two callers
  in the front end can turn off the problem report for a failure that is a matter of
  timing and that a user cannot put right.
- `e2e/editState` reports what the Edit tab is doing, and how many times the page it
  shows has announced itself. `waitForEditTabSettled` polls that until the page and
  the count have held still for 1500 ms, and every helper that changes the page calls
  it first.

The count of announcements is the part that matters: a page announces itself twice, and
a page change that arrives between the two announcements wedges the Edit tab in
SavePending. The state alone reads Editing in that window. No test can see this from
the DOM, because Bloom leaves the previous page in the frame while it loads the next.

That Bloom defect is older than this suite and still open. AUTOMATION-DEBT.md now has
an entry for it, with the log lines that show it and two fix directions, both of which
change production save behavior.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@hatton
hatton force-pushed the BL-16799-page-change branch from 9e6391c to bc78b4e Compare September 3, 2026 19:40
Master moved while this stack was open, so each branch merges the one below it.
The conflicts were all in src/BloomE2E/AUTOMATION-DEBT.md: master gave the table
of this stack a pull-request column and annotated each promise with its number,
while this branch deletes its own row and replaces or deletes its own promise.
The merge keeps both, taking this branch text where the two describe the same
entry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BaWw4EHWrbFF2fNJvMJVC8
@hatton

hatton commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

[Claude Opus 5 from Hatton's machine during devin-review]

Consulted Devin on 2026-09-03 22:45 UTC up to commit 106645476c116a8f0f453e6906aba2feda00fff8.

Base automatically changed from BL-16799-tab-test-ids to master September 3, 2026 23:12
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