Repository navigation
fix(prompt): keep the stale-read count across a poll restart (#1418) - #1856
Merged
Merged
Conversation
added 3 commits
October 24, 2026 21:16
The failed-read count lived inside the poll effect, so a refused answer or the page shown again restarted it at zero: one failed read, a refused answer and one more failed read never showed the Not updated notice. It now lives in a ref, changed only by reads of the poll still running. A new prompt-dock case holds the reads so exactly one fails on each side of the restart.
Each marked waitForTimeout waits to show that nothing happens; settle waits before a positive assertion stay counted. scripts/fixed-sleeps.json shrinks to match.
… of a fixed wait The 100 ms wait came before a check that the banner or the draft changed, so it was a settle wait, not a wait proving absence. It now waits for that change as the tab paste above it does.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 12 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Owner
Author
|
Merge pass review-work report. Overall: PASSED.
QA
Behaviour
Fixed-wait markers
Follow-ups (LOW)
All required checks are green, and no review thread is open. CodeRabbit did not review this PR (rate-limited or skipped). The reviews above stand in for it. |
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1418. The waits in the test and the count of Playwright's
waitForTimeoutas a fixed sleep already landed in #1440; this PR ships what was left.What it does for the user
A question card says "Not updated: the question on screen may have changed." once two reads of the screen in a row have failed. The failed-read count was local to each run of the poll effect. So a restart of the poll (a refused answer, or the page shown again) reset it to zero: a failed read, a refused answer and one more failed read never showed the notice, even though the screen had not been read for two polls. The count now lives in a ref and carries across a restart. A read that answers, or the poll stopping (disconnect, the pane ending), still clears it. Reads from a poll that a restart cancelled change the count for neither side, so a late success or failure from the old poll cannot hide or fake the notice.
No new UI: the card, the notice and its wording stay as they were.
Test cleanup
// fixed wait: <why>markers on PlaywrightwaitForTimeoutcalls that prove something does not happen (no send, no dialog, focus not moved). Waits that only let something settle before a positive check stay counted.scripts/fixed-sleeps.jsononly goes down (for example ui-regression 33 → 14, prompt-dock 6 → 1).terminal-input-regression.tscame before a positive check (the note or the draft must change), so it now waits for that change withuntil(...), as the tab paste just above it does.Verification
bun scripts/prompt-dock-demo-regression.ts: 28 PASS, including the new case "a restarted poll counts the failed reads before it". WithChatView.tsxreverted to main, the new case times out (waitForFunction: Timeout 10000ms exceeded).bun scripts/terminal-input-regression.ts: passes.bun run check fast: passes (typecheck, build, unit tests includingscripts/conventions.test.ts).Known follow-up, not changed here: ChatView is keyed by
paneIdonly, so the same pane id on another machine would keeppromptStale. That was already true before this PR.