Repository navigation
Description
Blocked by #3406
Context
packages/ui-react/tests/parallel-sessions-runtime.test.ts failed intermittently in hosted unit (2) (run 41506807539, job 125488962503, head d3c1d874c of #3320). The failing case was "mounted parallel sessions > 390 phone, light, coarse pointer, reduced motion: A and B stream side by side; trackers follow success, failure and a queued follow-up, and clear only once seen".
Where it fails. Session C finishes while the reader has scrolled up. The test then presses "Scroll to latest" (disc, line 697) and waits for C to read as cleared (line 721). The wait goes through until (packages/ui-react/tests/parallel-sessions-runtime.test.ts:274-276), and its 15 s waitForFunction timed out. The probe's last state:
never held: p.views().find((v) => v.sessionId === "odysseus-parallel-3")?.cleared === true
{"views":[{"sessionId":"odysseus-parallel-3","state":"done","pendingKind":null,"cleared":false,"turnId":"3ca268fb-…","settled":true}],"active":"odysseus-parallel-3",…}
C is active, done and settled, but it is never marked seen after the press. The assertion just before it ("scrolled up is not seen", line 719) passed.
Why this looks unrelated to the PR that hit it.
- chore(deps): drop the unused claude-agent-sdk-research-292 alias #3320 changes only
bun.lock, the rootpackage.json(it drops an unused SDK alias), the native-diagram pin, a shipped-runtime pin test and the runtime record's citations. Nothing in it reachesui-react. - The same case passed in
unit (2)of run 41494121721 atddff51c2a. That head differs fromd3c1d874conly inscripts/native-diagram-inputs.tsandtests/native-diagram-inputs.test.ts. - None of the other 35 failing
CIruns in the latest 200 runs (2026-11-02) shows amounted parallel sessionsfailure. - ui-react: parallel-sessions runtime "a panel over Chat is not seen" fails intermittently on main #2820 (closed) covered a different assertion in the same case: line 692, "a panel over Chat is not seen".
Scope
- Find out whether the press on "Scroll to latest" can leave the latest turn not counted as seen. It could be a product race in the seen/clear path, or the test pressing before the control is actionable or before the latest turn is in view.
- Fix the real cause.
Out of scope
- Lengthening the 15 s deadline, retrying the case, or weakening or removing the "clear only once seen" assertions.
- The other cases in this file, and ui-react: attribute intermittent unavailable Send after fixture readiness fixes #2202 or ui-react: attribute unexpected browser closure during parallel-session reload #2309.
Acceptance criteria
- The cause is shown with evidence: a trace, or a failing-first reproduction under load or with an injected delay at the press or the seen-recording step.
- The fix keeps every assertion and deadline in the case. The case fails with the fix reverted under the same injected condition, and passes with the fix in place.
- 30 sequential passes of the 390-phone case under load, recorded in the PR.
Verification
bun run test packages/ui-react/tests/parallel-sessions-runtime.test.ts, under the CPU load used for #2820, plus the hosted unit shard that carries the file.
Contract impact
None.
Readiness review: cause (2026-11-03)
This is a test race. The product's seen and clear path is correct. scrollUp (packages/ui-react/tests/parallel-sessions-runtime.test.ts:532-556) scrolls the phone transcript with three fast Input.dispatchTouchEvent swipes. Each swipe lifts its finger mid-motion, so Chromium follows each one with a fling, and that fling is still moving the transcript after scrollUp returns. If the press on "Scroll to latest" lands while the fling is running, the tap only stops the fling, and Chromium suppresses that tap, as a phone does. scrollToBottom never runs, the disc stays drawn, and C stays done, settled and cleared: false for the full 15 s. That is the recorded failure exactly.
Evidence: a trace of transcript scroll events shows the swipe's deltas still landing after scrollUp resolves and while C finishes. Lengthening C's log from 40 to 400 days means the fling cannot stop at the top before the press. With that change, the unmodified case fails 3/3 at line 721 with the hosted probe state.
Approach: each swipe carries its own event timestamps and holds the finger still before it lifts, so no fling starts, whatever the dispatch speed. Every assertion and deadline stays as it is.
2026-11-03: added this readiness section with the cause and evidence; scope and acceptance criteria are unchanged.
Status (2026-11-03)
#3409 fixes the race named above, and acceptance criteria 1 and 2 are met there: failing-first under the injected condition, then fixed, with a mutation receipt. Criterion 3, 30 sequential passes of the whole case under load, is blocked by #3406. That is a separate, earlier race at "selecting A cleared nothing" (line 678), and it caused all five failures across two loaded 30-run batches. The "Scroll to latest" step passed in all 55 loaded runs that reached it. Once #3406 lands, run the 30 passes under load on main and close this issue.
2026-11-03: added the Blocked by #3406 line and this status section.
Blocked by #3414
Activity
schlessera commentedon Nov 2, 2026
Claim
bk045-3377-20261102-scrollon branchfix/3377-parallel-sessions-scroll-clear. Readiness review first: tracing whether "Scroll to latest" can leave C uncounted as seen, keeping every assertion and deadline.schlessera commentedon Nov 3, 2026
Handoff (2026-11-03): #3409 is a draft that is ready to confirm, head
6f99fd3493ca9643fb3079ab2033eeb5dd562389, milestone 0.45.0. Main was green at the handoff, but another PR held the integration lease, so confirmation has not been requested yet. To resume once the lease is free:The PR uses
Refs #3377: criterion 3 (30 loaded passes of the whole case) waits on #3406. Releasing this claim.test(ui-react): end the phone's scroll-up swipes at rest, so no fling…
fix(ui-react): an answer still being written is not seen, so reopenin…