Skip to content

Assistant: the reply stays above a growing follow-up composer - #545

Merged
andersalm merged 3 commits into
developfrom
fix/assistant-reply-layout
Nov 6, 2026
Merged

andersalm merged 3 commits into
developfrom
fix/assistant-reply-layout

Conversation

@andersalm

Copy link
Copy Markdown
Contributor

Deepen notes

  1. Expert view: a "flaky" layout smoke that failed twice on unrelated branches is investigated, not rerun; the fix keeps reader-controlled scrolling and CI reliability: the census names the child that left its unit (#433); Assistant keeps the finished reply in view #533's behaviour.
  2. Raw material: scripts/assistant-reply-layout-browser-smoke.mjs failed on 5 Nov on feat/201-channel-choice and fix/201-browser-open-reason (abovePx=-64 while typing a follow-up); capsules/assistant/browser/agent-harness.js composer clearance observer.
  3. Methods: pinned Chromium with CDP CPU throttling 1/4/6, 50 runs each before and after; DOM geometry at the assertion; a forced resize burst as the regression.
  4. Independent check: Claude review PASS on ec11ec6: the guard really trips, the loop it protected against cannot happen (composer width is CSS-only, only the composer is observed, the re-entry guard stays), a reader scrolled up is not moved, and CI reliability: the census names the child that left its unit (#433); Assistant keeps the finished reply in view #533's own failure still reproduces without CI reliability: the census names the child that left its unit (#433); Assistant keeps the finished reply in view #533.

Change

  • Product bug: a burst guard in the Assistant composer-clearance observer counted unchanged geometry calls and disconnected the ResizeObserver after 8 calls in 250 ms. When the follow-up composer then grew, the reply clearance stayed at 104 px where 204 px was needed, and the end of the reply sat 64 px behind the composer. The guard is removed; the measured-value check and the per-frame re-entry guard stay.
  • Before: 4 of 50 runs failed at CPU throttling 6 (2 with this exact overlap). After: 0 of 150 across throttling 1, 4 and 6.
  • The smoke records scroll and composer geometry with each failure, and loads Chromium through the shared fixture like the other Assistant smokes (Main restored that import after review).

Separate, still open: "Jump to latest" can show for 1 to 2 frames to a reader who never scrolled up, under load (reviewer: 5 of 30 before, 1 of 30 after); recorded on #527.

Release issue #535.

Remove the time-based observer disconnect: unchanged geometry calls can consume its burst budget and leave a grown follow-up composer covering the reply. Keep the measured-value check and per-frame re-entry guard.

Pinned Chromium at CPU rate 6 reproduced persistent -64px overlap on the unchanged product. The geometry-burst regression failed 3/3 before and passed 10/10 in the candidate pilot. Preserve all existing assertions and record geometry and assertion timing for further failures. Full behaviour and source gates follow on this commit.
Review note on ec11ec6: the smoke switched to playwright-core 1.59.1
(Chromium 1217) unlike the other Assistant smokes; the 5 Nov failures ran on
the fixture's Chromium 1223. Main (Claude) restored the import; the smoke
passes at CPU rates 1 and 6.
@andersalm andersalm added this to the 2.0.1 milestone Nov 6, 2026
@andersalm
andersalm merged commit a7c47c5 into develop Nov 6, 2026
16 checks passed
@andersalm

Copy link
Copy Markdown
Contributor Author

Merged for 2.0.1. Reviews: Claude PASS on ec11ec6 (cause reproduced, guard's loop cannot recur, reader position kept, #533 behaviour unchanged). Main restored the shared-fixture Chromium import in the smoke after review (smoke passes at CPU rates 1 and 6). CI 15/15. The separate 'Jump to latest' flash is recorded on #527.

@andersalm andersalm mentioned this pull request Nov 6, 2026
5 of 6 tasks
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