Skip to content

Read the page's stored reading under page in the reading-position tests - #5330

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-5074
Nov 4, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-5074

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#4873 (strict type checking for browser modules) changed the stored lf-view from the page's reading with revision and regions merged in to {page, revision, activeRegion, regions}, with the page's reading under page (captureView). Restoration reads the new shape, but three tests in tests/browser/projection/test_reading_position.py still read quote and section from the top level, so they failed with KeyError before reaching their restoration checks. They now read .page, where the producer stores the reading. Their assertions are unchanged, and nothing in the runtime changes.

All three failed with the reported KeyError on current main and pass with this change, including their checks that the reading position comes back after the revision changes:

  • test_revision_changes_keep_the_complete_heading_below_user_chrome
  • test_revision_changes_follow_authored_text_into_declared_shadow_trees
  • test_the_reading_position_restores_onto_a_section_that_draws_no_box

Closes #5074 — automated triage

…ests

#4873 nested the page's reading in the stored `lf-view` under `page`, beside
`revision` and `regions`, so three tests reading `quote` and `section` from the
top level hit KeyError before reaching their restoration assertions. The tests
now read the page reading where the producer stores it; no behavior changes.

Closes #5074
@max-sixty
max-sixty merged commit 4c25b22 into main Nov 4, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/issue-5074 branch November 4, 2026 09:56
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.

Reading-position tests expect missing quote and section fields

2 participants