Skip to content

fix(ui): prevent chat jumps and prompt flicker when sending - #160109

Merged
roboclaw-bot merged 6 commits into
mainfrom
openclaw/fix-chat-scroll-jumping-animation
Sep 28, 2026
Merged

roboclaw-bot merged 6 commits into
mainfrom
openclaw/fix-chat-scroll-jumping-animation

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: the transcript snaps when sending a message, and the entering prompt briefly fades out while the composer changes height.

User Impact

Sending short or multiline prompts now uses one smooth scroll into the conversation and keeps the prompt text visible. Reduced motion and reader scroll takeover remain supported. No configuration changes or migration are required.

Why This Change Was Made

The queued manual send scroll now owns the viewport instead of racing geometric auto-follow. Smooth sends wait through the first layout measurement before choosing their destination. The existing short upward prompt animation remains, without its opacity fade.

Evidence

  • Reproduced estimated-endpoint snaps in the actual Control UI: 217 px for a short prompt and 364 px for a multiline prompt, followed by range correction. Repaired recordings retained one fully opaque prompt node and issued no instant target displacement in those scenarios.
  • 80 focused scroll/controller/entry unit tests passed (2.98 s wall). The CI follow-up also passes all 109 collaborator-typing, scroll-owner, and transcript-ownership tests (2.20 s wall).
  • 8 isolated source-browser checks passed: desktop, multiline, mobile, reduced motion, composer growth, nested scrolling, delayed sends with expanding progress, and the Latest control. The updated motion file's four cases took 16.88 s test time / 18.23 s wall; browser layout and native scroll behavior cannot be proved by jsdom.
  • Steering-order verification: 41 existing UI boundary regressions, 4 actual-UI browser cases, 3 production chat.send/AgentSession custody cases, and 4 Codex harness prefix-persistence cases passed. Accepted input is distinct from consumed input; post-consumption output is already ordered below the user prompt. No production message-ordering change was needed. The earlier synthetic unsegmented stream is not used as consumed-steer evidence.
  • CI found an existing collaborator-typing test still expecting the old one-frame timing. The failure reproduced standalone. It now asserts a stationary measurement frame, introduces a second remote typing actor during that frame, and retains both final-position assertions after the manual command executes. No production code changed in this follow-up; independent P0–P2 review is clean. The changed typing test file passes all 25 cases in 2.04 s wall with one worker.
  • UI production and test typechecks, stylesheet lint, formatting, and diff checks passed.
  • Hosted CI also caught an unbound scroll-probe method in the browser test. Binding it at capture fixes the lint error without changing production code or motion assertions; independent P0–P2 correction review is clean.
  • Final-head hosted CI passed, including UI, browser/real-Gateway browser, lint, type checks, and the required CI gate. Local full bundled validation remains unverified because its runtime build child was SIGKILLed. Browser proof uses synthetic Gateway events, not a live provider or physical mobile device.

Before / after — multiline send in motion

Before: an estimated endpoint snap and a fading prompt.

Before: prompt fading during send

After: one upward movement with the prompt text remaining opaque.

After: prompt remains visible during its upward movement

Confirmed steering boundary

Protocol-faithful local UI replay: the agent is working, the steering input is confirmed, and subsequent response text grows below it. The pre-input narration remains unchanged; the user bubble stayed on the same DOM node with 0 px movement in transcript coordinates across 43 sampled frames. Viewport following is separate from message placement. This is not a live-provider recording.

steering-boundary.mp4

Thanks to @vyctorbrzezowski for the report and UX direction, and @steipete for review and landing direction.

Worked on by

Work sessions


View the OpenClaw team session

roboclaw-bot and others added 2 commits September 28, 2026 01:32
Let queued manual scrolling own the viewport and start smooth sends after the composer and appended rows have measured. Keep prompt entry motion fully visible and verify desktop, multiline, mobile, reduced-motion, and reader-takeover behavior.

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

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 5271d471-93c3-400f-b676-baf8a42618e6
@clawsweeper

clawsweeper Bot commented Sep 28, 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 September 28, 2026 04:42
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 3:09 AM ET / 07:09 UTC (Revision 3).

ClawSweeper review

What this changes

The branch delays smooth Control UI chat-send scrolling until layout has been measured, keeps submitted prompts opaque during entry, and updates chat documentation and regression tests.

Merge readiness

✅ Ready for maintainer review

Current main still has the prompt fade and earlier scroll timing. This PR remains useful, and the inspected visual evidence and browser coverage support the fix. No blocking patch defect was identified.

Priority: P2
Reviewed head: b10f206ef62db3e73cb59068da5f0cd50dca94f4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Direct visual evidence, measured browser observations, and focused tests support a narrow patch with no identified blocking defect.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: The contributor proof gate does not apply to this bot-authored PR. Its body reports actual Control UI before/after scroll measurements, and inspected screenshots show the prompt-opacity change; source-browser tests exercise the send path with a synthetic Gateway. No stored-data contract changes. The separate steering video could not be inspected: local preparation reported ffprobe ENOENT and browser retrieval returned a cache miss.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The contributor proof gate does not apply to this bot-authored PR. Its body reports actual Control UI before/after scroll measurements, and inspected screenshots show the prompt-opacity change; source-browser tests exercise the send path with a synthetic Gateway. No stored-data contract changes. The separate steering video could not be inspected: local preparation reported ffprobe ENOENT and browser retrieval returned a cache miss.
Evidence reviewed 9 items Introduced scroll repair: The PR makes a pending manual command suppress geometric auto-follow and waits a second animation frame before applying a smooth manual scroll.
Current main still differs: Current main applies the queued scroll in the first animation frame and has no pending-manual guard for transcript auto-follow.
Prompt fade remains on main: Current-main entry keyframes animate opacity from zero to one; the PR removes those opacity declarations while retaining upward motion.
Findings None None.
Security None None.

How this fits together

The Control UI turns composer sends and Gateway chat events into transcript rows. Its scroll owner and virtualizer decide whether to follow new content or preserve the reader's position, while chat styles render prompt entry.

flowchart LR
A[Composer send] --> C[Scroll owner]
B[Gateway chat events] --> D[Transcript rows]
C --> E{Reader control?}
E -- Yes --> F[Keep reader position]
E -- No --> G[Measured follow]
D --> G
D -->|Opaque prompt entry| H[Chat viewport]
F --> H
G --> H
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +13, Tests +116, Docs +2. Total +131 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 3 18 5 +13
Tests 3 126 10 +116
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 147 16 +131

Review metrics

Metric Value Why it matters
Production and test growth production +13 net lines, tests +116 net lines Production growth stays narrow; most added code exercises browser scroll behavior.
Motion browser suite 4 scenarios, 18.23 s wall reported Native layout and scrolling justify browser coverage and have a measurable CI cost.

Technical review

Best possible solution:

Keep one scroll owner for local sends and reader takeover, start smooth following after measured layout, and render submitted prompt text at full opacity.

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

Yes for the prompt fade: current-main keyframes start at zero opacity, and the inspected before image shows it. The PR reports measured browser scroll jumps, which this read-only review did not rerun.

Is this the best way to solve the issue?

Yes. The patch changes the existing scroll scheduler and entry animation, with browser coverage for multiline sends, mobile, reduced motion, and reader takeover.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5c467fb8f27c.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The patch addresses visible chat-send friction without evidence of message loss or a blocked workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The contributor proof gate does not apply to this bot-authored PR. Its body reports actual Control UI before/after scroll measurements, and inspected screenshots show the prompt-opacity change; source-browser tests exercise the send path with a synthetic Gateway. No stored-data contract changes. The separate steering video could not be inspected: local preparation reported ffprobe ENOENT and browser retrieval returned a cache miss.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The contributor proof gate does not apply to this bot-authored PR. Its body reports actual Control UI before/after scroll measurements, and inspected screenshots show the prompt-opacity change; source-browser tests exercise the send path with a synthetic Gateway. No stored-data contract changes. The separate steering video could not be inspected: local preparation reported ffprobe ENOENT and browser retrieval returned a cache miss.

Evidence

What I checked:

  • Introduced scroll repair: The PR makes a pending manual command suppress geometric auto-follow and waits a second animation frame before applying a smooth manual scroll. (ui/src/pages/chat/scroll.ts:233, b10f206ef62d)
  • Current main still differs: Current main applies the queued scroll in the first animation frame and has no pending-manual guard for transcript auto-follow. (ui/src/pages/chat/scroll.ts:220, 5c467fb8f27c)
  • Prompt fade remains on main: Current-main entry keyframes animate opacity from zero to one; the PR removes those opacity declarations while retaining upward motion. (ui/src/styles/chat/grouped.css:15, 5c467fb8f27c)
  • Production ownership: The chat pane passes its scroll policy to the transcript controller, whose virtualizer declines automatic end scrolling when that policy says the reader or a queued manual command owns the viewport. (ui/src/pages/chat/chat-pane-base.ts:353, b10f206ef62d)
  • Browser regression coverage: The source-browser test sends through the Control UI with a synthetic Gateway and checks prompt opacity, frame movement, and instant-scroll commands across desktop, multiline, mobile, and reduced-motion cases. (ui/src/e2e/chat-motion.e2e.test.ts:171, b10f206ef62d)
  • Inspected visual proof: The PR body supplies before/after Control UI screenshots; the downloaded images were inspected and show the fading prompt before and the more legible prompt during entry afterward. The body also reports actual-browser endpoint corrections of 217 px and 364 px before the fix.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-28T04:50:19.393Z sha e746b7f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T05:13:43.156Z sha 61667e7 :: needs maintainer review before merge. :: none

@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) September 28, 2026 04:57
roboclaw-bot and others added 2 commits September 28, 2026 05:03
Retain final geometry assertions, verify the first frame remains stationary, and introduce a second typing peer before the manual scroll executes. This updates the old one-frame collaborator test to the intentional two-frame smooth-send contract.

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

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 6e7ca1a9-21f6-48c3-ba07-d217de22e4e6
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
roboclaw-bot and others added 2 commits September 28, 2026 06:58
Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: b3aaf419-4ca9-43b3-b14b-feec093437e4
@roboclaw-bot
roboclaw-bot merged commit 2b8c65c into main Sep 28, 2026
90 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/fix-chat-scroll-jumping-animation branch September 28, 2026 07:42
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

@VACInc

VACInc commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Follow-up: merged PR #160506 replaces the frame-count assertion introduced here in ui/src/e2e/chat-motion.e2e.test.ts. Under runner load, requestAnimationFrame can sample only the start and end of a correct smooth scroll, causing expected 2 to be greater than 2. The test now checks that smooth scrolling is requested while more than 8px from the end and that the final position is within 8px, while retaining the no-synchronous-jump check. This is test-only; it does not change or replace the production chat-send fix in this PR.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…#160109)

* fix(ui): prevent chat jumps and prompt flicker when sending

Let queued manual scrolling own the viewport and start smooth sends after the composer and appended rows have measured. Keep prompt entry motion fully visible and verify desktop, multiline, mobile, reduced-motion, and reader-takeover behavior.

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

* fix(ui): prevent chat jumps and prompt flicker when sending

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 5271d471-93c3-400f-b676-baf8a42618e6

* test(ui): cover the measured frame before manual chat scrolling

Retain final geometry assertions, verify the first frame remains stationary, and introduce a second typing peer before the manual scroll executes. This updates the old one-frame collaborator test to the intentional two-frame smooth-send contract.

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

* fix(ui): prevent chat jumps and prompt flicker when sending

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 6e7ca1a9-21f6-48c3-ba07-d217de22e4e6

* test(ui): bind scroll probe methods at capture

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

* fix(ui): prevent chat jumps and prompt flicker when sending

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: b3aaf419-4ca9-43b3-b14b-feec093437e4

---------

Co-authored-by: vyctorbrzezowski <[email protected]>
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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

2 participants