Skip to content

Fix history preview tab styling on replay (#7601) - #2331

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Oct 26, 2026
Merged

inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.

* chore: claim history preview tab fix

* test(ok): cover history preview re-entry

* fix(ok): retain history preview intent

* docs(ok): note history preview fix

* test(ok): cover pending history retry

* fix(ok): retry pending history traversal

* fix(ok): keep the history traversal marker until it resolves

The hashchange handler cleared the traversal marker before resolving the
target, so a re-entered call or a later effect run before the target became
active opened it as a permanent tab. The marker now stays set until the next
popstate replaces it, and the open path already returns early once the target
is active.

This replaces the token, second URL ref, acknowledgement effect, frozen
disposition and per-branch retirement added earlier on this branch.

* test(ok): cover a history traversal deferred while pages load

A Back press handled while the page list is loading now opens its target
as a preview once the list loads. The retry case drops two assertions on a
test-local variable that nothing in the run could change.

* test(ok): repeat every hashchange listener in the re-entry case

The re-entry hook picked the app listener by a local identifier in its
source text, so a rename left nothing wrapped and the test timed out on an
unrelated poll. It now wraps every hashchange listener, repeats each one for
the armed event, and fails with a named message when nothing was wrapped or
repeated.

* docs(ok): describe the history preview fix by its visible outcome

* test(ok): name the no-op traversal case by its behavior

The case title named a pending-traversal record and an acknowledgement
step that the simplified fix no longer has. It now says what the case
checks: a traversal whose open changed nothing opens as a preview again
on the next render.

* test(ok): settle the history traversal seed before its first click

Both history traversal cases flaked during setup, before any Back press.
On CI (Open Knowledge Validation run 40326960693, playwright shard 2,
first attempt) the seeded hist-a row never rendered: earlier specs in
the same worker had left dozens of root entries, so the virtualized tree
did not render the new rows. Locally the click aimed at hist-a opened
the fixture's sidebar-folder: the tree first rendered only the three
seeded docs, then the full listing inserted sidebar-folder above them
just as the click landed.

The helper now seeds through api.seedDocs, which resets the worker's
content to the fixture baseline and waits for the seeded pages, and it
waits for every root entry of that content, the baseline entries
included, before the first click.

GitOrigin-RevId: aa5d90675a52c77b9b80cce0a683343975fdad41
@inkeep-oss-sync
inkeep-oss-sync Bot merged commit 656b7a1 into main Oct 26, 2026
3 checks passed
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch October 26, 2026 15:03
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