Skip to content

test: name the foreign layer in the registry's $layer for the held-keys give-up test - #6512

Merged
leaf-agent merged 1 commit into
mainfrom
fix/held-keys-foreign-registry
Nov 19, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/held-keys-foreign-registry

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_a_document_the_runtime_gives_up_on_lets_its_held_keys_go has failed deterministically since #6484. That PR stopped holding the registry fetch to its Leaf-Layer header, because a revision asset can come from the browser's cache with an earlier release's headers. Whether the runtime gives a document up now depends on the registry's own $layer.generation (prepareDocument in browser/runtime/widget-loader.js). The test still named the other layer only in a header, with a {} body. So startup threw Cannot read properties of undefined (reading 'generation'), and the floating panel stayed (.lf-floating-panel count 1, expected 0).

The route now fetches the real registry and serves it with $layer.generation set to another layer. That is the reading #6484 left in charge, so the test reaches the give-up path again. What it protects is unchanged: the held keys are dropped, later presses reach the page, and the panel's row and the chrome's sheet go. No runtime code changes.

Verification: the test fails on main (2cd1bda49) and on #6484 (e81413d38), and passes on #6484's parent (152c83570). With this change it passes on main, along with test_a_page_that_cannot_start_lets_its_held_keys_go.

Refs #6418 — automated triage

…ys give-up test

#6484 stopped admitting the registry fetch by its headers, since a
revision asset can be answered from the browser's cache with an earlier
release's Leaf-Layer; the registry's own `$layer.generation` now decides
whether the runtime gives the document up (`prepareDocument`,
widget-loader.js). The test still named the other layer only in a header
and served `{}`, so startup threw reading `registry.$layer.generation`
and the floating panel stayed. The route now serves the real registry
with its `$layer.generation` set to another layer. The behavior the test
protects is unchanged: a document the runtime gives up on drops its held
keys, lets later presses reach the page and removes the panel's row.

Refs #6418
@leaf-agent
leaf-agent merged commit c94638d into main Nov 19, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/held-keys-foreign-registry branch November 19, 2026 11:49
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