Repository navigation
fix(ui): keep transcript disclosures anchored - #126272
vyctorbrzezowski merged 13 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 22, 2026, 5:51 AM ET / 09:51 UTC. ClawSweeper reviewWhat this changesMoves Control UI transcript disclosure anchoring into the session virtualizer and adds frame-level browser tests for work, tool, raw-detail, message, JSON, and code-wrap disclosures. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer handling. Current main still uses the delayed per-control scroll repair, while this PR centralizes the resize at the virtualizer boundary and adds broad frame-level browser coverage; no actionable patch defect was found. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherControl UI renders Gateway transcript history as virtualized chat rows. A disclosure click changes row height; the session virtualizer must measure that change while preserving the reader’s viewport position. flowchart LR
A[Gateway transcript history] --> B[Virtualized chat rows]
B --> C[Disclosure click]
C --> D[Session virtualizer]
D --> E[Measure committed row]
E --> F[Stable transcript viewport]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +52, Tests +470. Total +522 across 10 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one virtualizer-owned interaction-anchor path, retain the frame-level regression matrix, and merge only after the exact current head completes its required checks. Do we have a high-confidence way to reproduce the issue? Yes. The linked issue supplies a deterministic mocked-Gateway long-transcript reproduction, and current main still contains the two-frame repair path that permits the intermediate displacement. Is this the best way to solve the issue? Yes. Moving the measurement and anchor decision from individual disclosure handlers to the session virtualizer is the narrowest canonical owner-boundary repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 04d174584d1b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper re-review Addressed the file-backed toggle finding at head
No landing requested. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
cae5b44 to
e7b68e1
Compare
Exact-head closeout evidenceHEAD: The active rebase conflict in Root cause: transcript disclosure handlers committed a virtual-row height change, then repaired scroll position after animation frames. TanStack's ordinary end-anchor adjustment could therefore paint before the delayed consumer repair. The session virtualizer now owns the interaction: it measures the committed clicked row synchronously while temporarily suspending the ordinary end anchor for that explicit resize. Diff classification: production OpenCode review: one full-branch Remote focused proof
The exact-head geometry traces keep Exact-pushed-head screenshotsDark disclosure geometry: Light disclosure geometry: Dark raw-details geometry: Light raw-details geometry: Dark desktop tool layout: Light desktop tool layout: Dark mobile tool layout: Recordings: disclosure interaction · raw-details interaction · permanent exact-head media bundle This is owner-lane evidence only. CI and landing remain intentionally unclaimed. |
|
Landing gate update for
Native review artifacts validate as |
|
Merged via squash.
|
* fix(ui): keep transcript disclosures anchored * fix(ui): include file tool disclosure anchors * fix(ui): anchor raw tool disclosures * test(ui): cover merged disclosure invariants * fix(ui): anchor sidebar disclosure commits * test(ui): assert disclosure state transitions * fix(ui): cover semantic transcript disclosures * fix(ui): anchor transcript geometry controls * test(ui): exercise tab geometry anchoring * test(ui): keep geometry proof behavior-bound * refactor(ui): split disclosure anchor coverage * refactor(ui): extract transcript scroll margin * refactor(ui): shorten transcript helper names







Closes #126093
What Problem This Solves
Fixes an issue where users expanding or collapsing completed activity/tool work in a long Control UI transcript would see the clicked disclosure visibly jump before settling. The deterministic collapse reproduction moved the row
224 -> 318 -> 253px, a 94px intermediate displacement hidden by the prior final-only assertion.Why This Change Was Made
The disclosure helper changed expansion state, then waited two animation frames before repairing
scrollTop. That allowed the committed height change and TanStack end-anchor correction to paint before the consumer-side repair.The session virtualizer now owns this interaction invariant. It captures disclosure clicks within virtual rows, measures the committed row height during the Lit controller update, and updates TanStack with the ordinary end anchor temporarily suspended for that explicit clicked-row resize. The delayed two-frame helper and its duplicate caller path are removed.
This keeps expansion state in the existing per-session owner, keeps row measurement/anchoring in the virtualizer owner, and covers completed-work, activity-group, individual-tool, and standalone-tool disclosures through one canonical path.
Alternatives rejected: another animation-frame delay, direct forced-scroll repair in each disclosure, browser scroll anchoring over transformed absolute rows, keeping hidden bodies mounted, and a work-group-only branch. Each either permits an intermediate paint, duplicates owner policy, masks the symptom, or leaves sibling disclosures exposed.
Provenance: the “Worked for …” rollup was introduced by #105012. The delayed repair was introduced by #125790 /
415ffc010b7e; current source blame attributes that helper to ClawSweeper, with Vyctor Brzezowski and RoboClaw credited on the merged change. This repair is authored by@vyctorbrzezowski.User Impact
Transcript disclosures now expand and collapse without a visible flash, scroll-anchor jump, remount, or layout oscillation. The viewport remains stable for short work near the bottom and long work in the middle, including nested activity and tool disclosures with reduced motion enabled.
Production LOC:
+41/-40(net+1) | Tests:+185/-21(net+164)Evidence
Before
AWS Crabbox
cbx_afe82b316a38, runrun_1a077c31e95e: focused browser regression failed on current main for the intended reason.224 -> 318 -> 253px94px2425 -> 2331px2886 -> 2792pxworked-for-before.webm
Light:
Dark:
After
AWS Crabbox
cbx_afe82b316a38, focused runrun_c9e49df08194: frame-level matrix passed.rowTopremained constant in every scenario, tolerance<=2pxscrollTopremained constant whilescrollHeightchanged by up to291pxworked-for-after.webm
Light:
Dark:
All screenshots and extracted video frames were inspected before attachment. The recording shows a transcript layout jump, not a theme, font, image, CSS-transition, or late-mount flash.
Remote validation
run_1a077c31e95e: pre-fix focused E2E RED, 94px displacementrun_6702901feb1b: simplified virtualizer-owner implementation focused GREENrun_a12f59bb0c7c: remotecheck:changed, all 7 tests inchat-tool-turn-outcome.e2e.test.ts, and fullpnpm buildpassedrun_c9e49df08194: expanded final geometry matrix GREEN with short/long, bottom/middle, expand/collapse, activity/tool siblings, and reduced motionrun_b8c6b51f5388: exact-tree focused E2E GREEN after enrolling file-backed read/edit/write toggles; 90 frames keptrowTop/scrollTopconstant while the file body changedscrollHeightby 123pxrun_ad7c26a563f4: exact-tree remotecheck:changed, UI/core-test typecheck, lint, formatting, i18n, guards, and dead-export checks passed@tanstack/[email protected]and@tanstack/[email protected]; synchronousresizeItemowns cache update, scroll adjustment, and same-frame notificationExact-head CI run
32236677425ran against3f60870c13311425b903daff30a56b66d54c8593: all Control UI checks, all 12 UI E2E shards, build artifacts, types, guards, and package checks passed. The aggregate remains red on two base-owned gates:packages/gateway-protocol/src/index.tsalready exceeds the 700-line lint limit on basee71fc902eec, and #126140 removed the existing Codexrun-attempt-tools.test.tsshard claim. Both are repaired together by commit582a85a74d8in open PR #125067; this PR intentionally does not duplicate that unrelated fix.Final exact-head CI run
32240706511is fully green forcae5b442fe2b58687bb4f8de0cf25c4892396925, including all 12 UI E2E shards andopenclaw/ci-gate.Exact-tree AFTER recording after the ClawSweeper file-toggle repair:
worked-for-exact-head.webm
Review gap
Autoreview was not run in this publication phase by explicit operator instruction; it is reserved for a future explicitly authorized landing review. Earlier remote attempts consumed zero model tokens because the Testbox Claude OAuth was expired. Roboclaw/maintainers should complete the reviewloop before any landing.