Repository navigation
feat(ui): reveal chat widget actions on hover and focus - #143541
vyctorbrzezowski merged 4 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 4:00 PM ET / 20:00 UTC (Revision 3). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +30, Tests +84. Total +114 across 3 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
f946ff8 to
4e3b0b9
Compare
|
Merged via squash.
|
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.
Current — desktop light, hover: Pin above More
Current — desktop dark, hover: Pin above More
Current — desktop light, More menu open
Current — desktop dark, More menu open
Mobile at rest and after tapping More:
Current — mobile light, muted at rest (60%)
Current — mobile light, active after tap (100%)
Current — mobile dark, muted at rest (60%)
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 PR — light: old reserved action row
Current — desktop light, hover: Pin above More
Before this PR — dark: old reserved action row
Current — desktop dark, hover: Pin above More
Complete resting-state matrix (four scenarios per image):
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
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
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
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
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
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
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
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
Validation:
4e3b0b91324e3ebfe3eb0b65a90661767408b4d3: all 13 hosted UI E2E shards passed; shard 7/13 confirms all 8 session-dashboard tests pass.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.