Skip to content

Wait for the Bold choice to reach the log before reloading in the playground restore test - #5338

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5124
Nov 4, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5124

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_complete_views_restore_native_values_in_wrapped_layouts fills Title, presses Bold and reloads straight away. Since #4845 the playground saves its settings as tune events in the log. The Title field's blur records {title, tone: quiet}, and the press then records {title, tone: bold}. Delivery sends the second tune only after the first one's answer arrives or shows up in the page's state. So a reload inside that round trip keeps the title and loses Bold. That is the exact failure in scheduled runs 41432142330 (macOS, both widths) and 41622727492 (macOS, 390). Linux passed in the same runs: its round trip is shorter.

The test now waits until the log holds the Bold tune before it reloads. It still checks that the restored title, the checked radio and host.values.title come back after the reload. #4845's intent and the playground's behavior are unchanged.

Verification

  • Before: a scratch copy of the test let the server admit the first tune but held back its answer, then reloaded right after the press. The log held only the quiet tune, Title was restored and Bold was unchecked, on 3 of 3 runs.
  • After: with the first event's answer delayed by 1 s, both widths pass. Without a delay they also pass locally.

What this leaves

The underlying limit is in delivery, not this test. A gesture still waiting in the queue behind an unanswered one is not sent when the page unloads. The playground's pagehide handler only flushes edits that haven't been dispatched yet (#unsent), not ones already queued. A person would only lose a gesture this way by leaving within one round trip of two quick gestures. On a local server that's milliseconds, so this PR doesn't change delivery. Making the queue survive unload would need ordered keepalive sends and resolving the queued events' references to their predecessors.

Closes #5124 — automated triage

…ound test

test_complete_views_restore_native_values_in_wrapped_layouts filled Title,
pressed Bold and reloaded at once. Since #4845 the playground keeps its
settings as `tune` events, so the field's blur records {title, tone: quiet}
and the press records {title, tone: bold}; delivery sends the second only
after the first's answer, so a reload inside that round trip kept the title
and dropped Bold. macOS's slower runner hit the window. The test now waits
for the log to hold the Bold tune, and still asserts both values restore.

Closes #5124
@leaf-agent
leaf-agent merged commit e917996 into main Nov 4, 2026
5 of 7 checks passed
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.

Reloading the complete-view example loses the saved Bold radio choice

1 participant