Skip to content

fix: prevent visible scrolling when opening a chat - #169334

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/fix-initial-ui-scroll-position
Oct 11, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/fix-initial-ui-scroll-position

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes visible scrolling through intermediate positions when opening a previously unvisited chat.

User Impact

The transcript appears at its correct reading position on first display, including navigation from the session sidebar. Saved reading positions and normal message scrolling are unchanged.

Why This Change Was Made

The virtualized transcript must measure its rows before its existing initial end anchor settles. Keep those preliminary layouts measurable but unpainted, then reveal the already-positioned transcript. This reuses the existing readiness owner without adding timers, measurement passes, or a second scroll policy.

Evidence

  • Reproduced the original first-visible frames at offsets 0/4139 and 4798/6004 before reaching the end.
  • Direct first load and clicking an unvisited sidebar session: all 24 sampled visible frames were at the end after the fix.
  • 16 browser scenarios passed across initial/cached load, navigation, and message motion. The final cold-load file's three cases took 5.19 s of test time (20.93 s invocation including build/setup); hosted CI timing is pending.
  • 67 scroll/controller unit checks passed; UI typecheck, targeted lint, formatting, and diff checks passed.
  • Independent full-context review and canonical AutoReview at P1 completed without blocking findings.
  • Proof uses the actual Control UI with a synthetic mocked Gateway, not a live server. Inspected before/after screenshots show the unchanged settled layout; frame assertions above verify the transient behavior.

Contributor credit

Reported by and prepared for @steipete.

Work sessions

Worked on by


View the OpenClaw team session

roboclaw-bot and others added 2 commits October 11, 2026 20:12
Keep the initial measured transcript out of paint until its existing end anchor settles. Cover direct entry, sidebar first visits, and cached reconnection without changing live scroll ownership.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: d55a53ab-b105-48bd-856a-5090609eb270
@clawsweeper

clawsweeper Bot commented Oct 11, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 11, 2026 20:13
@roboclaw-bot

roboclaw-bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Visual evidence

Synthetic transcript in the actual Control UI. The settled layout is intentionally unchanged. The baseline initially measured scrollTop=0, max=4139, then moved to the end before its screenshot; the fixed version was already at 7009/7009 on its first visible frame. The committed browser regressions also cover sidebar first visits and require all 24 visible samples to remain at the end. These stills show the settled appearance; they are not presented as snapshots of the intermediate movement.

Before — settled after the initial jump

Before

After — same final layout, positioned before display

After

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR keeps the transcript measurable but hidden until its existing initial end anchor settles.

Example: Open an unvisited conversation containing 40 messages from the session sidebar.

  • Before: The transcript can appear at intermediate scroll positions before reaching the latest message.
  • After: The transcript becomes visible after measurement and initial positioning finish.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and no actionable correctness defect was found; supplied visual evidence establishes settled appearance, with limited independent evidence of the transient improvement.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is outside the ordinary contributor proof gate; inspected screenshots show the settled Control UI with a synthetic mocked Gateway, while direct-entry and sidebar first-frame results are reported through browser assertions.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Opening an unvisited chat visibly scrolls through intermediate positions before reaching its intended reading position.
Reason: The collaborator-authored direction matches the existing initial-position contract and addresses visible motion with a narrow rendering change.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it addresses a concrete first-display scrolling defect with a focused change, and review found no definite introduced bug; collaborator authorship also protects it from cleanup closure.

Priority: P3
Reviewed head: 28c3b4483a9cffd24b021afe0ea1babf9fd9524e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The attached stills cannot independently establish the transient first-frame result; the supplied result is reported through browser frame assertions rather than an attached trace or recording.
Agent review details

How this fits together

The Control UI transcript receives session rows and saved scroll state, measures a virtualized window, and renders messages at the reading position selected by the session scroll owner.

flowchart TD
  A[Chat route or sidebar] --> B[Session transcript controller]
  B --> C[Session virtualizer host]
  C --> D[Solid transcript renderer]
  D --> E[Row measurements]
  E --> C
  C --> F[Initial end anchor settled]
  F --> G[Visible transcript]
Loading

Technical review

Best possible solution:

Reveal the measured transcript through the existing initial-anchor lifecycle while preserving saved-reader and explicit-scroll ownership.

Do we have a high-confidence way to reproduce the issue?

The current rendering lifecycle permits preliminary measured positions to paint, and the contributor reports baseline offsets of 0/4139 and 4798/6004; this review inspected source and supplied evidence without executing target code.

Is this the best way to solve the issue?

The focused visibility gate fits the existing ownership model and preserves layout measurement, avoiding additional scrolling or scheduling machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0df3c9188273.

Provenance checked

  • Initial transcript measurement and end anchoring keeps the original intent (cc7bd7b: Measure the bounded initial row window before retiring the end anchor while preserving saved-reader and explicit-command ownership.)
  • Solid transcript commit lifecycle keeps the original intent (4e3818b: Retain one Solid root per session while keeping virtualizer geometry and scroll decisions in the existing plain TypeScript owners.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 4e3818b adds ui/src/pages/chat/components/chat-transcript-layout-solid.tsx:204 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4e3818bab0fe; files: ui/src/pages/chat/components/chat-transcript-layout-solid.tsx)
  • Dallin Romney: Raw commit 51f772a adds ui/src/pages/chat/components/chat-transcript-virtualizer-host.ts:83 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 51f772aeefbc; files: ui/src/pages/chat/components/chat-transcript-virtualizer-host.ts)

PR surface

Source +5, Tests +112. Total +117 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 5 0 +5
Tests 1 113 1 +112
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 118 1 +117

Review metrics

Metric Value Why it matters
Production versus test changes Production +5/-0 lines; tests +113/-1 lines The small rendering change is supported by browser coverage for direct entry, sidebar navigation, and cached-load visibility.

Labels

Label changes:

  • add P3: The defect causes transient visual movement when opening a conversation, with no established loss of messages or reading state.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: The defect causes transient visual movement when opening a conversation, with no established loss of messages or reading state.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 11, 2026, 4:20 PM ET / 20:20 UTC.

@roboclaw-bot
roboclaw-bot merged commit 68d5869 into main Oct 11, 2026
149 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/fix-initial-ui-scroll-position branch October 11, 2026 20:24
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
* fix: prevent visible scrolling when opening a chat

Keep the initial measured transcript out of paint until its existing end anchor settles. Cover direct entry, sidebar first visits, and cached reconnection without changing live scroll ownership.

Co-authored-by: steipete <[email protected]>

* fix: prevent visible scrolling when opening a chat

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: d55a53ab-b105-48bd-856a-5090609eb270

---------

Co-authored-by: steipete <[email protected]>
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant