Skip to content

test(planning): wait for the delivery before the queued-note check in ui_journey 13 - #8575

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/planning-ui-journey-13-wait
Oct 20, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/planning-ui-journey-13-wait

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: a test flake found in merge-queue run 39378456368, which ejected an unrelated PR (#8110) from the queue.

Summary

ui_journey phase 13 ("a save while a wake is in flight says queued, Claude is busy") failed in the merge queue with an empty toast (FAIL: ui_journey.13 … []) and passed elsewhere. It slept a fixed 300 ms and hoped the page had applied the delivered state by then.

Fix

  • plugins/planning/surface/tests/ui_journey.js:621: the waitForTimeout(300) is replaced by a bounded wait (5 s, the test's existing until helper) for #workLine to read Claude is working on. The page renders that line from the same condition queued() reads for the "Queued, Claude is busy" suffix (S.online && !stalled() && pending().some(delivered); index.html:632, :881-889, :921-922). The page keeps S in a closure, so #workLine is where that state shows. The assertion is unchanged.
  • .changes/planning/fix-planning-ui-journey-13-wait-1f3f108c.md: a bump: none fragment (the fragment gate counts every file under plugins/<name>/).

Verification

  • surface-journey.test.sh: 3/3 local runs passed, 239 checks each, toast "Sent. Claude's reply lands here. Queued, Claude is busy."
  • scripts/check-affected.sh --tests: 11 passed, 3 skipped.
  • Not proven: that the wait times out without the delivery; until returns quietly at its limit and the unchanged assertion then decides.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01WyWcv2NwzrPQ4dChfwFjM7

kyle-sexton and others added 2 commits October 20, 2026 04:16
… ui_journey 13

Phase 13 slept 300 ms after delivering the first note, then expected the
second note's toast to say "Queued, Claude is busy". The toast reads the
page's own state (an unhandled event marked delivered), so when the page
had not yet applied the delivered state the toast had no suffix and the
check failed. Wait until #workLine reads "Claude is working on", which the
page renders from the same condition queued() checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WyWcv2NwzrPQ4dChfwFjM7
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 20, 2026 08:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T08:47:41.010709Z b4160b4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed b4160b40b05782e8c0c2e70dcc5c0e0b0b93ebdb: 0 finding(s), 0 as inline comments.

No security findings. The PR changes two files: a changelog fragment (bump: none) and one line in the planning UI journey test (plugins/planning/surface/tests/ui_journey.js). That line replaces a fixed 300 ms sleep with a poll on the page's workLine text. The change adds no production code path, input handling, credential use or trust-boundary change. It touches no workflow, permission, hook or standing instruction, so the instruction-surface lens did not apply. The test sends the token header only to the page's own origin, as before.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed b4160b40b05782e8c0c2e70dcc5c0e0b0b93ebdb: 0 finding(s), 0 as inline comments.

No findings on PR #8575; I posted no inline comments.

Wait condition: the replacement for waitForTimeout(300) at plugins/planning/surface/tests/ui_journey.js:621 waits for #workLine to read "Claude is working on". working() (plugins/planning/surface/index.html:881-889) produces that text under the same condition queued() reads at index.html:632: online, not stalled, and a delivered pending event. renderHeader writes it at index.html:921-922. Waiting on that text is therefore a sound signal that the page has applied the delivery.

Helper: until (ui_journey.js:24) wraps page.waitForFunction(fn, null, {timeout}) and returns true or false. The predicate is a self-contained page-context function, so the call is valid. A timeout is swallowed by design, and the unchanged ok(...) assertion after it then decides. The PR body states this limit.

Fragment: bump: none is appropriate for a test-only change.

Closing issue: none is linked. The body states No related issue: <reason>, so there are no acceptance criteria to check.

Verification: I did not run the test. The local runs (3/3 passes, 239 checks) and check-affected.sh result in the PR body are author-claimed and unverified by me.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit c7859d9 Oct 20, 2026
59 checks passed
@kyle-sexton
kyle-sexton deleted the fix/planning-ui-journey-13-wait branch October 20, 2026 08:59
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