Skip to content

feat(ui): reveal chat widget actions on hover and focus - #143541

Merged
vyctorbrzezowski merged 4 commits into
openclaw:mainfrom
vyctorbrzezowski:feat/chat-widget-actions-hover
Sep 11, 2026
Merged

vyctorbrzezowski merged 4 commits into
openclaw:mainfrom
vyctorbrzezowski:feat/chat-widget-actions-hover

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Closes #143539

What Problem This Solves

Chat widgets currently show Pin and More in a separate row above their content. This improvement removes the reserved row and keeps secondary controls quiet while reading.

Why This Change Was Made

When at least 40px is available to the right, Pin and More form a vertical column outside the widget, aligned to its top. Pin is above More. With less space, the controls become a horizontal row immediately above the widget. Both placements are absolute overlays and preserve the widget's width and position.

The outside desktop column appears on hover or keyboard focus. Narrow-pane and touch controls remain reachable at 60% opacity; interacting with them or opening More reveals them fully. Tapping outside restores the muted state. Both buttons use the existing icon/ghost button radius, border, background, and sizing consistently in light and dark themes. Placement observation starts in the next animation frame, after the preview is attached, and pending initialization is canceled when its ref is retired. This prevents resize-delivery errors when widgets mount or rerender.

User Impact

Widgets retain their full content width and no longer reserve a separate action row. The narrow first-widget case keeps Pin below the conversation header, where it can be clicked. Canvas HTML and inline MCP App widgets share this behavior. Pin, keyboard navigation, image export, raw details, and the open More menu remain available.

Evidence

Current desktop: Pin above More, with the menu closed and open. Current mobile: muted at rest and fully visible after tapping More. Captions are included in each image; historical baselines below are explicitly labeled Before this PR.

Desktop lightDesktop dark
Current — desktop light, hover: Pin above More
Current — desktop light, hover: Pin above More
Current — desktop dark, hover: Pin above More
Current — desktop dark, hover: Pin above More
Current — desktop light, More menu open
Current — desktop light, More menu open
Current — desktop dark, More menu open
Current — desktop dark, More menu open

Mobile at rest and after tapping More:

Mobile: muted at restMobile: active after tap
Current — mobile light, muted at rest (60%)
Current — mobile light, muted at rest (60%)
Current — mobile light, active after tap (100%)
Current — mobile light, active after tap (100%)
Current — mobile dark, muted at rest (60%)
Current — mobile dark, muted at rest (60%)
Current — mobile dark, active after tap (100%)
Current — mobile dark, active after tap (100%)

Historical before/after comparison. The old reserved row is in the left column; this is a comparison between versions, not a hover shift.

Before this PRCurrent: hover
Before this PR — light: old reserved action row
Before this PR — light: old reserved action row
Current — desktop light, hover: Pin above More
Current — desktop light, hover: Pin above More
Before this PR — dark: old reserved action row
Before this PR — dark: old reserved action row
Current — desktop dark, hover: Pin above More
Current — desktop dark, hover: Pin above More

Complete resting-state matrix (four scenarios per image):

Before this PRCurrent
Before 1440px light: own turn, short and long text, with and without attachment
Before 1440px light: own turn, short and long text, with and without attachment
Current 1440px light: own turn, short and long text, with and without attachment
Current 1440px light: own turn, short and long text, with and without attachment
Before 1440px light: peer turn, short and long text, with and without attachment
Before 1440px light: peer turn, short and long text, with and without attachment
Current 1440px light: peer turn, short and long text, with and without attachment
Current 1440px light: peer turn, short and long text, with and without attachment
Before 1440px dark: own turn, short and long text, with and without attachment
Before 1440px dark: own turn, short and long text, with and without attachment
Current 1440px dark: own turn, short and long text, with and without attachment
Current 1440px dark: own turn, short and long text, with and without attachment
Before 1440px dark: peer turn, short and long text, with and without attachment
Before 1440px dark: peer turn, short and long text, with and without attachment
Current 1440px dark: peer turn, short and long text, with and without attachment
Current 1440px dark: peer turn, short and long text, with and without attachment
Before 390px light: own turn, short and long text, with and without attachment
Before 390px light: own turn, short and long text, with and without attachment
Current 390px light: own turn, short and long text, with and without attachment
Current 390px light: own turn, short and long text, with and without attachment
Before 390px light: peer turn, short and long text, with and without attachment
Before 390px light: peer turn, short and long text, with and without attachment
Current 390px light: peer turn, short and long text, with and without attachment
Current 390px light: peer turn, short and long text, with and without attachment
Before 390px dark: own turn, short and long text, with and without attachment
Before 390px dark: own turn, short and long text, with and without attachment
Current 390px dark: own turn, short and long text, with and without attachment
Current 390px dark: own turn, short and long text, with and without attachment
Before 390px dark: peer turn, short and long text, with and without attachment
Before 390px dark: peer turn, short and long text, with and without attachment
Current 390px dark: peer turn, short and long text, with and without attachment
Current 390px dark: peer turn, short and long text, with and without attachment

Validation:

  • Final commit 4e3b0b91324e3ebfe3eb0b65a90661767408b4d3: all 13 hosted UI E2E shards passed; shard 7/13 confirms all 8 session-dashboard tests pass.
  • Final-head CI passed all selected gates, including types, formatting, i18n, guards, dead-export scans and lint. The final local changed-file rerun also completed successfully, including types, formatting, i18n, guards, all three dead-export scans, lint and styles.
  • The focused Chromium renderer tests pass (2/2). The new regression fails on the original observer implementation with a resize-delivery error and passes after the lifecycle repair, including rerendering during resize delivery and resizing the containing thread.
  • Existing flows verify vertical desktop ordering, unchanged widget geometry, keyboard access, and a visible/clickable Pin in the first widget of a narrow dashboard conversation. The original failing narrow-column case was reproduced before the horizontal fallback was applied.
  • Browser probes verify the exact cutoff: 40px gives an external vertical column; 39px gives the horizontal top overlay. Both buttons are clickable, with unchanged widget geometry.
  • Mobile interaction verifies 60% at rest, 100% with More open, and 60% after tapping outside, plus working raw details and Pin.
  • The 32-case matrix covers 1440/390px, light/dark, own/peer shared-session turns, one-line/five-line text, and attachment/no attachment. Captures use real application fonts and were inspected.

Risk and coverage

The above-widget row intentionally overlays existing space. Its 36px height keeps both controls inside the narrow first-widget conversation tested here, without reserving layout height. The tests retain real clicks and the existing request, error-toast, tooltip, enabled-state, and private-detail assertions. No forced clicks or longer timeouts were introduced.

The final local session-dashboard run passed 5/8 tests, including both Pin paths and failure recovery, but timed out in three Workboard scenarios while the host was under heavy CPU and memory pressure. The identical final source passed all 8 tests in hosted CI; the three scenarios completed there in 0.9–1.5 seconds. No tests or timeouts were weakened.

Browser evidence uses Chromium with a mocked Gateway; Canvas HTML and inline MCP App paths are both exercised. On the earlier commit cd7a3ecd52b2, hosted CI attempt 2 passed without a code change after one failed-job rerun: checks-ui-e2e (11/13) and openclaw/ci-gate both succeeded. Attempt 1 timed out waiting for “Plugin ready” after Matrix installation restarted the Gateway. This flow does not render widgets or exercise Pin/More. Source review identified a request/acknowledgment race covered by the later upstream repair #143671 by @steipete. The old log does not reveal the exact acknowledgment ordering; the successful retry confirms that the same code can pass. No product or test changes were needed for that earlier CI follow-up.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Sep 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 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.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review September 10, 2026 00:06
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 10, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 4:00 PM ET / 20:00 UTC (Revision 3).

ClawSweeper review

What this changes

The Control UI moves chat widget controls beside available space or above narrow widgets, reveals desktop actions on hover or focus, and extends browser coverage for placement and accessibility.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, visually demonstrated improvement absent from current main. No actionable introduced defect was found, and the prior review contains no unresolved findings.

Priority: P3
Reviewed head: cd7a3ecd52b2ab160b0353ecd440b75c97d4bf8b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with convincing visual evidence and useful browser coverage; no blocking correctness or security finding was identified.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after browser captures show the shared widget toolbar's compact desktop placement, light/dark open menus, and mobile resting/active states in the declared Chromium mock-Gateway setup; source and browser assertions supplement the visible proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after browser captures show the shared widget toolbar's compact desktop placement, light/dark open menus, and mobile resting/active states in the declared Chromium mock-Gateway setup; source and browser assertions supplement the visible proof.
Evidence reviewed 9 items Verified review scope: The complete host-verified merge-base-to-head patch changes toolbar placement, presentation, and the existing browser tests. Endpoint drift and the stale test-merge candidate were not treated as introduced changes. The checkout remained clean, and the introduced diff passed the read-only whitespace check.
Placement and lifecycle owner: The renderer measures available space against the containing chat thread, observes both element and thread resizing, and disconnects its observer when the ref is retired. Existing action handlers and authorization-sensitive widget behavior are unchanged.
Existing main behavior: Fetched main still reserves 40px above widgets and places a horizontal toolbar above them at 45% resting opacity; it does not implement this PR's side placement and desktop hiding.
Findings None None.
Security None None.

How this fits together

The Control UI renders Canvas and MCP App widgets inside assistant messages. Their shared toolbar connects readers to existing dashboard pinning, image export, and raw-detail actions.

flowchart TD
  A[Assistant message widgets] --> B[Shared widget renderer]
  B --> C{Space beside widget}
  C -->|Enough| D[Vertical side controls]
  C -->|Limited| E[Horizontal top controls]
  D --> F[Hover and keyboard focus]
  E --> F
  F --> G[Pin or open action menu]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +30, Tests +84. Total +114 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 62 32 +30
Tests 1 96 12 +84
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 158 44 +114

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #143539
Summary: This PR is the implementation candidate for the paired presentation request; the plugin-installation repair is distinct.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep placement in the shared widget renderer, with stable content geometry and existing actions reachable through mouse, keyboard, and touch.

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

Not applicable as a defect reproduction: this is a presentation improvement, and current-main source plus the historical screenshot establish the existing reserved toolbar row.

Is this the best way to solve the issue?

Yes: a shared placement observer and CSS preserve the existing action handlers while adapting to available space; the inspected evidence supports the intended visual result.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7e1b9a63cf64.

Labels

Label justifications:

  • P3: This improves chat reading density and secondary-control presentation without addressing 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. Sufficient (screenshot): Inspected before/after browser captures show the shared widget toolbar's compact desktop placement, light/dark open menus, and mobile resting/active states in the declared Chromium mock-Gateway setup; source and browser assertions supplement the visible proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after browser captures show the shared widget toolbar's compact desktop placement, light/dark open menus, and mobile resting/active states in the declared Chromium mock-Gateway setup; source and browser assertions supplement the visible proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after browser captures show the shared widget toolbar's compact desktop placement, light/dark open menus, and mobile resting/active states in the declared Chromium mock-Gateway setup; source and browser assertions supplement the visible proof.

Evidence

What I checked:

  • Verified review scope: The complete host-verified merge-base-to-head patch changes toolbar placement, presentation, and the existing browser tests. Endpoint drift and the stale test-merge candidate were not treated as introduced changes. The checkout remained clean, and the introduced diff passed the read-only whitespace check. (cd7a3ecd52b2)
  • Placement and lifecycle owner: The renderer measures available space against the containing chat thread, observes both element and thread resizing, and disconnects its observer when the ref is retired. Existing action handlers and authorization-sensitive widget behavior are unchanged. (ui/src/pages/chat/components/widget-card.ts:527, cd7a3ecd52b2)
  • Existing main behavior: Fetched main still reserves 40px above widgets and places a horizontal toolbar above them at 45% resting opacity; it does not implement this PR's side placement and desktop hiding. (ui/src/styles/chat/tool-cards.css, 7e1b9a63cf64)
  • Latest release comparison: The latest supplied release also uses the above-widget toolbar and 45% resting opacity. Its source was retrieved through GitHub after the local historical blob read failed. (ui/src/styles/chat/tool-cards.css:854, 1391f7cd2d40)
  • Inspected visual evidence and complete description: Inspected all four prepared desktop images, plus the linked historical light baseline and mobile resting/open-menu images. They show removal of the reserved row, vertical desktop controls, and accessible horizontal mobile controls. The full live body matched the captured 17,109 UTF-16 units and SHA-256 f00cefa72870102487f8ccbb353c609ebac3e5a36edb7b85b556bf91c69153af, resolving the supplied excerpt gap. The body identifies Chromium with a mocked Gateway and reports keyboard, threshold, Pin, and touch checks; screenshots directly support the visual claims, not independent execution of every reported check. (cd7a3ecd52b2)
  • Meaningful browser coverage: The extended existing flow checks unchanged widget geometry, vertical ordering, keyboard menu access, responsive placement, actual Pin requests, and visible failure recovery. These assertions protect observable behavior without adding a test-only production API. Tests were inspected, not executed during this read-only review. (ui/src/e2e/session-dashboard.e2e.test.ts:257, cd7a3ecd52b2)

Likely related people:

  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: 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-10T02:02:55.325Z sha b7eef0f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-10T02:34:21.372Z sha cd7a3ec :: needs maintainer review before merge. :: none

@vyctorbrzezowski
vyctorbrzezowski force-pushed the feat/chat-widget-actions-hover branch from f946ff8 to 4e3b0b9 Compare September 11, 2026 06:31
@vyctorbrzezowski
vyctorbrzezowski merged commit 7a2d832 into openclaw:main Sep 11, 2026
171 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski
vyctorbrzezowski deleted the feat/chat-widget-actions-hover branch September 11, 2026 06:47
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
)

* feat(ui): reveal chat widget actions on hover and focus

* feat(ui): fit widget actions beside narrow chat panes

* feat(ui): stack widget actions and mute narrow controls

* feat(ui): stabilize widget action observer lifecycle
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

[Feature]: Reveal chat widget actions on hover and keyboard focus

1 participant