Skip to content

fix(ui): restore chat-new-messages class on scroll pill button#44856

Merged
altaywtf merged 3 commits intoopenclaw:mainfrom
Astro-Han:worktree-fix-scroll-pill-class
Mar 13, 2026
Merged

fix(ui): restore chat-new-messages class on scroll pill button#44856
altaywtf merged 3 commits intoopenclaw:mainfrom
Astro-Han:worktree-fix-scroll-pill-class

Conversation

@Astro-Han
Copy link
Contributor

@Astro-Han Astro-Han commented Mar 13, 2026

Note

AI-assisted (Claude Code). Testing level: fully testedpnpm build, pnpm check, pnpm test all pass locally (913/913 test files passed; 2 unrelated jsdom env errors in app-chat.test.ts). codex review --base origin/main passed with no blocking issues. Author understands the change.

Summary

  • Problem: The "New messages" scroll-to-bottom button in the Dashboard chat UI renders its SVG icon at full container size, covering the entire chat area.
  • Why it matters: The button is completely unusable and blocks the chat UI for all Control UI / webchat users.
  • What changed: Restored the CSS class from agent-chat__scroll-pill (introduced in feat(ui): dashboard-v2 views refactor (slice 3/3 of dashboard-v2) #41503) back to chat-new-messages, which matches the existing styles in ui/src/styles/chat/layout.css:104-139.
  • What did NOT change (scope boundary): No CSS changes, no new classes, no SVG changes. One-line class name fix only.

Change Type (select all)

  • Bug fix

Scope (select all touched areas)

  • UI / DX

Linked Issue/PR

User-visible / Behavior Changes

The "New messages" scroll pill renders as a compact floating pill button instead of a full-screen SVG overlay.

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Any (web UI)
  • Runtime/container: Gateway dashboard / Control UI

Steps

  1. Open the OpenClaw Dashboard (Control UI)
  2. Scroll up in a chat session so the "New messages" button appears
  3. Observe the button renders as a small pill

Expected

  • Small floating pill button with a 16x16 down-arrow icon

Actual (before fix)

  • SVG icon stretches to fill the entire chat panel

Evidence

  • Trace/log snippets

Root cause: PR #41503 (f76a3c5225) changed class="btn chat-new-messages" to class="agent-chat__scroll-pill", but no CSS rule exists for .agent-chat__scroll-pill. The existing .chat-new-messages styles (including svg { width: 16px; height: 16px }) never applied, leaving the SVG unconstrained.

Human Verification (required)

  • Verified scenarios: pnpm build + pnpm check + pnpm test (913/913 passed). codex review --base origin/main passed (no blocking issues). Confirmed agent-chat__scroll-pill has zero CSS matches; chat-new-messages has full styling at layout.css:104-139.
  • Edge cases checked: Grep confirms no other references to agent-chat__scroll-pill in styles or JS.
  • What you did not verify: Visual browser rendering (no UI test environment available).

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: Revert the single line in ui/src/ui/views/chat.ts
  • Files/config to restore: ui/src/ui/views/chat.ts
  • Known bad symptoms reviewers should watch for: Scroll pill not appearing or unstyled

Risks and Mitigations

None.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 13, 2026

Greptile Summary

This PR restores the correct CSS class (chat-new-messages) on the "New messages" scroll-to-bottom pill button in the chat view, reverting a regression introduced in PR #41503 that replaced it with agent-chat__scroll-pill — a class that has no corresponding CSS rules.

  • Root cause confirmed: A grep of the entire ui/ directory finds zero occurrences of agent-chat__scroll-pill in any CSS file, meaning the SVG icon and button were completely unstyled, causing the SVG to expand to fill the full container.
  • Fix is correct: chat-new-messages is fully defined at ui/src/styles/chat/layout.css:104-139, including svg { width: 16px; height: 16px } that pins the icon to the intended compact size, and also appears in ui/src/styles/components.css:2229.
  • Scope is minimal: Only the single class attribute on the <button> element is changed; no CSS, no SVG, no event handlers, and no other logic is touched.

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, well-scoped one-line bug fix with no side effects.
  • The change is a single class attribute restoration that directly maps to existing, verified CSS rules. There are no logic changes, no new dependencies, and grep confirms agent-chat__scroll-pill has no CSS definitions anywhere in the repo, validating both the bug and the fix. Risk of regression is negligible.
  • No files require special attention.

Last reviewed commit: 121ecfe

@altaywtf altaywtf self-assigned this Mar 13, 2026
@altaywtf altaywtf force-pushed the worktree-fix-scroll-pill-class branch 2 times, most recently from 4aff2e7 to 691632b Compare March 13, 2026 18:54
@altaywtf altaywtf force-pushed the worktree-fix-scroll-pill-class branch from 691632b to 621ef63 Compare March 13, 2026 19:02
@altaywtf altaywtf merged commit 96c48f5 into openclaw:main Mar 13, 2026
18 of 27 checks passed
@altaywtf
Copy link
Member

Merged via squash.

Thanks @Astro-Han!

z-hao-wang pushed a commit to z-hao-wang/openclaw that referenced this pull request Mar 13, 2026
…law#44856)

Merged via squash.

Prepared head SHA: 621ef63
Co-authored-by: Astro-Han <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
frankekn pushed a commit to xinhuagu/openclaw that referenced this pull request Mar 14, 2026
…law#44856)

Merged via squash.

Prepared head SHA: 621ef63
Co-authored-by: Astro-Han <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
ecochran76 pushed a commit to ecochran76/openclaw that referenced this pull request Mar 14, 2026
…law#44856)

Merged via squash.

Prepared head SHA: 621ef63
Co-authored-by: Astro-Han <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI/webchat: New messages pill can render as huge malformed overlay Dashboard: 'New messages' scroll button SVG icon renders full-screen size

2 participants