Repository navigation
fix(ui): retain the reader position through history measurements - #200482
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 Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR retains the visible message through pending history measurements, restores its position after DOM commit, and makes mobile wizard test measurements atomic. Example: A prepared predecessor measures 98 px instead of its estimated 120 px while a history refresh holds the displayed transcript.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: current main retains the reader-position timing gap, and the patch repairs it through the existing anchor owner without a concrete introduced correctness defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI transcript combines virtual row measurements, native scrolling, and Solid DOM commits; its existing reader and message anchors translate changing geometry into a stable visible reading position. flowchart TD
A[Row measurements] --> B[Transcript virtualizer]
B --> C[Reader anchor]
C --> D[Retained message anchor]
B --> E[Solid DOM commit]
E --> D
D --> F[Native scroll position]
Technical reviewBest possible solution: Use the existing message-anchor owner to retain the reader until measurements settle and restore only against committed geometry, selecting one repair for the canonical report. Do we have a high-confidence way to reproduce the issue? The source and supplied red/green component regression establish the controlled held-refresh failure, but a high-confidence natural product trigger has not been demonstrated; this review ran no target code. Is this the best way to solve the issue? The patch addresses premature compensation at the existing owners, preserves relative fallback and touch handling, and adds distinct retention, settlement, and pending-frame coverage without unnecessary production machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 238160cf99b2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +15, Tests +131. Total +146 across 8 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed November 20, 2026, 8:25 AM ET / 13:25 UTC (Revision 5). |
|
The correction is now at The PR body now includes the controlled resize failure, full corrected wizard pass, cumulative Codex review and its resolved normalization concern, and the actual local check/targeted-lint outcomes. Prior-head CI and review are identified as historical; new-head CI remains required. The previous ClawSweeper report had no open items. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review the cumulative correction at The existing absolute anchor now separates reader retention from history admission. The measurement caller retains real geometry while preserving relative correction when no target exists. No new state or scheduling policy is introduced. The original all-frame test and probe remain unchanged; 37 final-source focused tests pass, and fresh cumulative Codex review completed two passes without actionable findings. The body records the observed correctness cost, including median active-interval elapsed 724.4→807.4 ms and renderer task CPU 729.318→802.303 ms, mixed allocation pairs, and bounded native-frame limitations. #199080 introduced the ordinary prepared-row trigger; its historical comparison remained stable, so exact failure onset is unestablished. The required local aggregate remains exit 1: formatting was corrected by its exact leaf, and the remaining complete 3-production/1-full-tree export set matches the qualified exact parent. This is not a hosted-CI waiver. New-head CI and this final-head review remain landing gates; the prior 975 review applies only to that older source. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review final head |
|
🦞👀 Re-review progress:
|
|
Fresh visual evidence for the rebased reader fix. These are the real transcript component with synthetic rows, using the held-refresh regression adapted from #202347 (@daniel-lxs). The test delivers a measured predecessor height while a Solid action holds the displayed window; it does not reproduce natural ResizeObserver scheduling. The unchanged 1 px assertion fails on main with 22 px movement and passes with the candidate at 0 px. After settlement, scrollTop changes from 499 to 477 and the retained row stays at y=1. Before: main Clean comparison
Annotated comparison
|
Add the deterministic 22px predecessor-measurement regression from #202347, using live row lookup after commit so replacement DOM does not become a stale assertion target. Main fails the unchanged 1px limit; retained-reader handling passes the pending and settled geometry checks. Co-authored-by: daniel-lxs <[email protected]>
ef9b9b2 to
ae5e068
Compare
|
@clawsweeper re-review Rebased and reviewed head |
|
🦞👀 Re-review progress:
|
|
Merged via squash auto-merge.
|
Merge main ce30eda to include the existing cached-reader repair e44a7e3 (#200482) for the named checks-ui-e2e (1/4) failure. This changes the failed gate input rather than retrying its old red job. Resolve the workerStarted conflict by retaining main's pool-diagnostic arguments and unconditional SQLite admission exit tracking. The PR-only delta remains the original two-file Code Mode cleanup repair. Co-authored-by: vincentkoc <[email protected]>
…nclaw#200482) * test(ui): measure mobile wizard containment atomically * fix(ui): retain the reader through pending history measurements * fix(ui): restore retained reader geometry after commit * test(ui): prove reader retention across held history refresh Add the deterministic 22px predecessor-measurement regression from openclaw#202347, using live row lookup after commit so replacement DOM does not become a stale assertion target. Main fails the unchanged 1px limit; retained-reader handling passes the pending and settled geometry checks. Co-authored-by: daniel-lxs <[email protected]> * test(ui): avoid returning the animation handle from promise executor --------- Co-authored-by: daniel-lxs <[email protected]>




Related: #200320, #200343, #199080, #202347
What Problem This Solves
Cached-history refresh can visibly move the reader while predecessor measurements and DOM commits arrive at different times. The hourly UI run 44736390881 captured a transient 22 px shift in the active-reload long-reply case.
User Impact
Readers keep their place while history settles. Explicit navigation, held touch, structural prepend admission and end-following retain their existing behavior. The accompanying mobile wizard test measures both bounds in one browser evaluation, avoiding a comparison across layout frames.
Why This Change Was Made
Relative scroll correction can run before the pending DOM update commits. This change uses the existing absolute message-anchor owner to retain the reader and restore it against committed geometry. Restoration proceeds once the DOM commits, while the target remains retained until measurement receipts settle. There is no new cache, configuration or scroll owner. The production delta is +15 lines (+40/-25).
Rebased on
b084c7f9cc485591ad1607f452be4616145a5e8b, preserving main's private fields. The former Discord IPC change was dropped because #200983 already supersedes it. The separate attachment-menu 54 px offset from the hourly run is already fixed on main by #202463; its cause was layout containment introduced by #202325.Evidence
Current reviewed head:
ae5e068d3c060.pnpm check:changed --base b084c7f9cc485ran. Introduced line-cap and lint failures were corrected and their targeted checks pass. The remaining unusedOAuthLoginCallbacksexport fails identically on exact main parentb084c7f9cc485, introduced by refactor(auth): give OAuth contracts a pure type owner #202443 /e5b085abf795261d61f4bf5f72698359d85bfe54. This is an identified main regression, not a passing cumulative check; the other 23 gates passed.The older first retention revision caused a separate 91 px activity regression by delaying restoration after DOM commit. The committed-context correction remains in this rebased patch, and the affected activity E2Es pass. Earlier CI and measurements remain historical; exact-head CI 44743187868 succeeded: 41 passed, 28 skipped, 0 failed, including all ten UI E2E shards and both real-Gateway lanes. No CI rerun or admin exception was needed. Final-head ClawSweeper review completed with zero findings and zero unchecked items.
Visual evidence
Verified before/after proof includes clean and annotated images, all four rendered and inspected on the published PR. These are the actual transcript component with synthetic rows during a held Solid action; they are bounded component timing evidence, not a natural ResizeObserver or live-Gateway recording. No user data is present.
Measured cost
Reusing the prior lane's production-shaped synthetic experiment: 390 sessions, 80 saved messages, two history rounds, five counterbalanced comparison pairs per mode plus separate A/A controls. The interval excludes held boot/setup. CPU is renderer threadTicks; allocation samples the main isolate at 32 KiB. These are historical pre-rebase measurements, not new exact-head performance results.
A/A wall changes −5.22%/+2.41% and allocation changes −20.18%/−0.327% show substantial variability. Lower unpaired medians do not establish a speedup or allocation gain. This owner does not scan agent databases or workspaces; no Team data was accessed.