Repository navigation
fix: keep task progress collapsed while reading earlier messages - #148291
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 5:26 PM ET / 21:26 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR distinguishes automatic transcript measurement adjustments from reader scrolling so task progress stays collapsed, and updates regression coverage and chat documentation. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, focused repair absent from current main. No blocking correctness or security findings were identified, and the existing proof supports the visible reader flow. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI transcript combines incoming messages with browser row measurements and reader input. Its scroll policy controls whether the conversation follows new output and whether task progress expands above the composer. flowchart TD
A[Incoming messages] --> B[Transcript row measurements]
B --> C[Automatic scroll adjustment]
C --> D[Scroll origin tracking]
E[Reader input or Latest] --> D
D --> F[Reading and follow policy]
F --> G[Task progress disclosure]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +13, Tests +82, Docs +5. Total +100 across 5 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Preserve measurement-scroll origin within the existing transcript owner while keeping native reader input, Latest, and explicit card choices authoritative. Do we have a high-confidence way to reproduce the issue? Yes, source establishes a focused path: read slightly above the end, grow a measured row, and let browser clamping produce a positive end-position scroll. The contributor reports a failing-before/passing-after regression; this review did not execute it. Is this the best way to solve the issue? Yes, the patch repairs scroll-origin classification at its existing owner without duplicating disclosure policy, adding settings, or changing persisted state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3d21b1dce1d6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
6533f27 to
ad01226
Compare
Preserve the provenance of virtualizer row-measurement adjustments when their native scroll event lands at the transcript end. Layout compensation must not unlock a history reader or reopen automatic task progress. Explicit reader input and manual Latest commands keep their existing behavior. Validated the regression against the original implementation, 238 focused unit tests, 9 production-bundled Chromium E2Es, full changed checks, and independent P0-P2 review. The original CI animation timing did not reproduce locally; the controller and ResizeObserver regression independently proves the ownership defect.
Use actual Home input in the interactive manual-disclosure sequence so reader takeover cancels queued and active Latest commands. Exercise a return interrupted by keyboard collapse, while preserving all original card assertions and the 10-second click deadline. Keep the shared geometry-only helper and runtime unchanged. Paired bundled controls reproduce the scripted setup defect and verify native-input reader preservation. The permanent scenario fails with the old helper; all 9 ordinary bundled browser cases pass with the correction. Targeted formatting, lint, and independent P0-P2 review passed.
ad01226 to
bb0ec77
Compare
|
Merged via squash.
|
…nclaw#148291) * fix(ui): keep task progress collapsed during layout corrections Preserve the provenance of virtualizer row-measurement adjustments when their native scroll event lands at the transcript end. Layout compensation must not unlock a history reader or reopen automatic task progress. Explicit reader input and manual Latest commands keep their existing behavior. Validated the regression against the original implementation, 238 focused unit tests, 9 production-bundled Chromium E2Es, full changed checks, and independent P0-P2 review. The original CI animation timing did not reproduce locally; the controller and ResizeObserver regression independently proves the ownership defect. * test(ui): exercise reader input when interrupting Latest Use actual Home input in the interactive manual-disclosure sequence so reader takeover cancels queued and active Latest commands. Exercise a return interrupted by keyboard collapse, while preserving all original card assertions and the 10-second click deadline. Keep the shared geometry-only helper and runtime unchanged. Paired bundled controls reproduce the scripted setup defect and verify native-input reader preservation. The permanent scenario fails with the old helper; all 9 ordinary bundled browser cases pass with the correction. Targeted formatting, lint, and independent P0-P2 review passed.
Continues #148014 on its preserved branch after GitHub refused to reopen the original PR. Original author: @steipete.
What Problem This Solves
Fixes task progress reopening while a reader stays on earlier chat messages and background row measurements adjust the transcript.
User Impact
Task progress stays collapsed while you read earlier messages, even as streaming output and layout measurements continue. Scrolling back to the end or selecting Latest resumes following; explicit card choices remain respected.
Why This Change Was Made
The existing per-session transcript offset owner records the actual browser-clamped offset written by measurement compensation. Reader input and disconnect retire that marker, so automatic corrections preserve reading mode while real input retains its normal behavior.
The interactive browser fixture uses native Home-key input when interrupting an active Latest return. Directly assigning
scrollTopchanges geometry without delivering reader takeover. The shared geometry helper, original card assertions, and click deadlines remain unchanged.Evidence
A deterministic regression through the actual TanStack ResizeObserver and transcript/page-policy boundary fails on the original owner and passes with the repair. Both reader commits retain their reviewed patches exactly after rebasing onto main
5d461f09667b1d7474f7b963d2d1267c836a83f5; all four owned code/test files are byte-identical to the prior qualified version.The original scripted browser setup produced a 10-second Latest-click timeout. Paired controls showed that native Home input cancels the retained Latest target. The permanent scenario fails with the old helper and passes with the correction. Fresh current-base qualification passes 147 owner/unit tests, nine ordinary reader browser scenarios plus the upstream cloud-reconciliation scenario, the production build and budget check (354,195 bytes startup JavaScript gzip), and the complete changed-file gate. Independent P2 reviews remain valid through exact patch identity.
CI run 34870373589 passed every executable job except the cloud-reconciliation fixture. A controlled completed-history-first refresh reproduced its missing assistant reply: the fixture omitted that reply from history and delivered an event without current run ownership. The independent repair already on main in #147684 supplies the persisted reply in history and reuses it in the live event. This PR keeps that upstream repair without a duplicate fixture change. The exact historical CI ordering was not captured, and no production admission or reducer bug is claimed. New exact-head CI qualifies this reader-only refresh.
Earlier failures remain attributable: the shared Docker assertion, cloud timestamp fixture, and wizard routing were repaired separately in #148129, #147926, and #148337. Run 34854229458 also failed a real-desktop viewer proof and checkout before tests. The newer run passed that desktop lane, but this does not establish the earlier cause; diagnostic-only #148354 remains separately owned. No local desktop fault replay or relaxed assertions/deadlines were used.
The prior CI run 34880403170 stopped in preflight because main's shared worker inventory listed the same wizard test twice; the regular test gates did not run. This base includes the routing repair from #148504 (
867e655d51d892c47ee68fc7f02c7e8ca0a5628d), verified to retain exactly one wizard recovery route, and the separate UI fixture correction from #148444. Fresh qualification also covers main's Markdown-it and Vitest patch updates. No failed-job retry or weakened gate was used; new exact-head CI will qualify the refreshed source.The exact intermittent CI animation interleaving did not reproduce locally. The inspected screenshots below illustrate the normal synthetic before/after flow. All three PR attachments were verified as accessible PNGs, and the same captures were inspected and rendered in the originating task.
The earlier UI shard 2/3 failure remains documented: “keeps malformed closing-tag validation bounded” measured 107.0 ms against its 100 ms guard. This PR does not claim to fix that timing failure; its stress case and threshold are untouched.