Skip to content

fix(ui): preserve the reading position when transcript ranges shrink - #199747

Merged
steipete merged 3 commits into
mainfrom
ci/437467-rail
Nov 15, 2026
Merged

steipete merged 3 commits into
mainfrom
ci/437467-rail

Conversation

@steipete

@steipete steipete commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes chat unexpectedly moving farther from the end when a previously estimated row becomes shorter while the reader scrolls upward.

User Impact

Readers keep their position near the end of a conversation as offscreen measurements settle. No migration or configuration change is required.

Why This Change Was Made

A deferred measurement shrinks the scroll range, so the browser clamps the native offset before the reader anchor applies its correction. Applying that correction to the already clamped offset counts the shrink twice. Preserve the offset before committing the range, matching the owner's existing resize handling.

This reproduces the exact 18 px failure in the 80-message LTR case of chat-position-rail-layout.e2e.test.ts in scheduled CI 43746768156. The separate disclosure assertion from that job remains unresolved and is not claimed fixed here.

Evidence

  • Unchanged original rail case reproduces the CI failure on main and passes with the fix; its selected disclosure sibling also passes.
  • New native Chromium regression fails at 40 versus 4 px from the end on the original owner and passes with the fix; all nine reader-anchor browser cases pass with both scroll repairs present.
  • Default pnpm tsgo:ui (tsrs), changed test typecheck, scoped lint, format and diff checks pass.
  • Isolated local autoreview, P0–P2, of the resolved local change against 113d6243f36094de453622a9e5cbb25da029b83c, with the complete owner, regression and caller context: no actionable findings. Local ClawSweeper built entrypoints were unavailable; hosted review follows the repository route.

After #199746 landed, the only conflict was both branches inserting a regression at the same location. Both test bodies are retained unchanged. Combined proof passes all nine owner browser cases and the unchanged lightbox, rail and disclosure E2E cases (three selected); default tsrs, scoped lint/format and fresh complete-context P0–P2 review pass. Previous-head CI 43755961115 passed all 30 jobs. The conflict-resolution head failed its bundle comparison: chat boot grew 207 normalized gzip bytes over the rebuilt base. Removing a redundant prepend-anchor read already implied by the existing ownership decision repairs that regression. The unchanged committed comparison now passes: chat boot normalized gzip 1,313,389 → 1,313,392 B (+3 B within the existing 64 B allowance); raw 4,237,227 → 4,237,228 B (+1 B); requests 21 → 21. New Session normalized gzip and request count stay unchanged (815,902 B, 17 requests). No budget or baseline changed. Final local proof repeats all nine native owner cases and the unchanged original rail and lightbox E2Es; default tsrs, scoped lint/format and fresh complete-context P0–P2 review pass. Current-head CI 43758684562 completed successfully at 78784ad884ead8ce85cafbbaf1227a4ba17a4528: all 30 planned jobs passed, including the repaired bundle gate.

The fix adds four production lines and removes two, plus one focused native regression. It reuses the existing positioning decision and pre-commit offset handling, with no new owner, state, helper, timeout, tolerance or assertion change.

Comparable synthetic captures immediately after the original upward wheel: before is 22 px from the end; after is 5 px, within the unchanged 4±1 px assertion. Capture instrumentation was removed from the final source.

Before: reader displaced to 22 px from the end

After: reader remains 5 px from the end

Bundle acceptance: run the committed pnpm ui:check-performance:base 113d6243f36094de453622a9e5cbb25da029b83c workload against the same installed toolchain. Keep existing normalized route byte/request budgets and the 64-byte build-variance allowance unchanged. Compare emitted raw bytes, normalized gzip bytes and request counts; no wall-time performance claim.

@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review November 15, 2026 20:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T20:23:23.793726Z 0244edf New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) November 15, 2026 20:11
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 15, 2026
@steipete
steipete disabled auto-merge November 15, 2026 20:18
@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head db21d072fdd386b21d5fde73c278531c016e1028, but the PR head is now 78784ad884ead8ce85cafbbaf1227a4ba17a4528. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-15T20:19:51.821Z sha db21d07 :: needs changes before merge. :: none

@steipete
steipete merged commit 914c6c6 into main Nov 15, 2026
97 of 99 checks passed
@steipete
steipete deleted the ci/437467-rail branch November 15, 2026 20:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 16, 2026
…penclaw#199747)

* fix(ui): preserve the reading position when transcript ranges shrink

* fix(ui): reuse transcript positioning ownership decision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant