Skip to content

improve(control-ui): redesign composer slash and skill invocations - #129707

Merged
steipete merged 5 commits into
openclaw:mainfrom
vyctorbrzezowski:brzezowski/composer-invocations
Aug 26, 2026
Merged

steipete merged 5 commits into
openclaw:mainfrom
vyctorbrzezowski:brzezowski/composer-invocations

Conversation

@vyctorbrzezowski

Copy link
Copy Markdown
Member

Continues #127824 (auto-closed when its merged base branch was deleted); rebased onto main per maintainer instruction.

Stacked on #124301. Full campaign evidence is in the primary PR draft.

What Problem This Solves

Slash commands and skill references used inconsistent sheets and token geometry that could drift, wrap over adjacent text, or fragment during keyboard selection.

Why This Change Was Made

This layer provides command-first invocation sheets and atomic skill references. Token measurement follows resize/scroll, shifted selection stays at token boundaries, and split-line references fall back to raw mirrored text rather than covering neighboring content.

User Impact

Commands and skills remain keyboard-accessible and visually aligned across wrapping, resizing, mobile layouts, punctuation, and bidirectional text.

Evidence

Final head: d6c319d4d74; base: 00321d37503.

  • 261 focused unit tests and the skill-reference browser suite passed before final restack.
  • Final 10-round top-stack matrix: 5,250 observations, 0 flakes/failures.
  • Final clean top-stack run: 395 unit + 130 E2E passed (32647773179).
  • Exact-head CI: run 32690377270 completed green.
  • Build budget: 337.4 KiB startup JS, 44.7 KiB startup CSS; largest CSS 45.0 KiB (46,075 B).
  • Delta: production +615/-297; tests +407/-25.
  • Final Testbox proof passed build/budget, 366 UI tests + 4 E2E, stylelint, 0 import cycles, and check:changed; final autoreview reported no actionable P0/P1 findings.
  • Recursive review findings for shifted selection, resize, single-line layout, and split-line geometry were fixed. No post-fix review/judge round was started after the campaign-close order.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 26, 2026 00:29
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 26, 2026, 12:44 AM ET / 04:44 UTC.

ClawSweeper review

What this changes

This PR redesigns the Control UI composer’s slash-command and skill-invocation menus and adds inline rendered skill-reference tokens.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: Escape targets the first invocation sheet in document order, so a split-pane session with sheets open in both panes leaves the focused pane’s sheet open and moves focus to the other pane.

Priority: P2
Reviewed head: 0e1219c0148b42ac1d69018f8e992fe9839e9baa

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The PR has useful focused coverage and current-head visual evidence, but the split-pane Escape regression is a concrete merge blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a repository member; the maintainer comment supplies current-head sanitized browser captures as supplemental evidence.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member; the maintainer comment supplies current-head sanitized browser captures as supplemental evidence.
Evidence reviewed 4 items Focused-pane dismissal bug: The new document-level Escape handler selects the first visible invocation menu rather than the composer owning the keyboard event, then prevents the focused composer’s own handler from receiving Escape.
Split-pane invariant: Existing coverage explicitly establishes that slash menus may be open independently in two panes, making the first-menu lookup observable behavior rather than a hypothetical multiple-instance case.
Current-main comparison: Current main retains the previous picker-only Escape path and does not contain the PR’s skill-token helpers, so it does not already provide this PR’s central composer behavior.
Findings 1 actionable finding [P2] Dismiss the invocation sheet belonging to the focused pane
Security None None.

Live Verification

Entry: /chat

Result: FAIL (partial) — step 4 expect_text Skills: locator.waitFor: Timeout 15000ms exceeded.

Steps:

  • PASS goto /chat
  • PASS fill .agent-chat__composer-combobox textarea ← /sta
  • PASS wait_for [role='listbox'][aria-label='Slash commands']
  • FAIL expect_text Skills — locator.waitFor: Timeout 15000ms exceeded.

How this fits together

The Control UI composer converts typed slash commands and $skill references into selectable menus and rendered draft tokens. Those selections update the draft that the chat send flow subsequently submits to the Gateway.

flowchart LR
A[User types in composer] --> B[Slash or skill detection]
B --> C[Invocation menu state]
C --> D[Keyboard or pointer selection]
D --> E[Composer draft]
E --> F[Chat send flow]
Loading

Before merge

  • Dismiss the invocation sheet belonging to the focused pane (P2) - When two split-pane composers have invocation sheets open, this lookup chooses the first menu in document order. The capture listener then stops propagation, so Escape in the other pane leaves its sheet open and focuses the first pane’s textarea. Resolve the enclosing composer from the keyboard event instead, and cover the two-pane path.
  • Resolve merge risk (P1) - In split view, pressing Escape in the second of two open invocation sheets can leave that sheet visible and move focus to the first pane; ordinary one-pane evidence will not expose it.
  • Complete next step (P2) - A narrow source-proven repair can preserve the PR’s design by scoping the global Escape path to the focused composer.

Findings

  • [P2] Dismiss the invocation sheet belonging to the focused pane — ui/src/pages/chat/components/chat-picker-overlay.ts:70-83
Agent review details

Security

None.

PR surface

Source +358, Tests +386. Total +744 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 17 624 266 +358
Tests 4 399 13 +386
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 21 1023 279 +744

Review metrics

Metric Value Why it matters
Production versus test delta production +624/-266; tests +399/-13 The UI redesign materially grows production behavior while adding focused rendering and browser coverage; the split-pane dismissal case remains untested.

Root-cause cluster

Relationship: canonical
Canonical: #129707
Summary: This PR is the active rebased continuation of the same invocation redesign; the former stacked branch is closed unmerged.

Members:

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

Merge-risk options

Maintainer options:

  1. Scope Escape to its owning composer (recommended)
    Dismiss the invocation state for the composer containing the keyboard event and verify that another pane’s open sheet remains independent.

Technical review

Best possible solution:

Resolve Escape from the event target’s enclosing composer, preserve that composer’s focus, and add a two-pane regression test before merge.

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

Yes, from source: open slash sheets in two independently rendered panes, focus the second textarea, and press Escape; the capture handler resolves the first sheet and stops propagation.

Is this the best way to solve the issue?

No: the global Escape listener should derive the invocation composer from the event target rather than document order, which preserves the existing per-pane state invariant.

Full review comments:

  • [P2] Dismiss the invocation sheet belonging to the focused pane — ui/src/pages/chat/components/chat-picker-overlay.ts:70-83
    When two split-pane composers have invocation sheets open, this lookup chooses the first menu in document order. The capture listener then stops propagation, so Escape in the other pane leaves its sheet open and focuses the first pane’s textarea. Resolve the enclosing composer from the keyboard event instead, and cover the two-pane path.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2b06180bb5fe.

Labels

Label changes:

  • add merge-risk: 🚨 other: The new global dismissal path can misdirect keyboard focus and leave an invocation sheet open when multiple composers are active.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The author is a repository member; the maintainer comment supplies current-head sanitized browser captures as supplemental evidence.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member; the maintainer comment supplies current-head sanitized browser captures as supplemental evidence.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: The defect breaks a bounded but established Control UI keyboard workflow in split-pane sessions.
  • merge-risk: 🚨 other: The new global dismissal path can misdirect keyboard focus and leave an invocation sheet open when multiple composers are active.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member; the maintainer comment supplies current-head sanitized browser captures as supplemental evidence.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The author is a repository member; the maintainer comment supplies current-head sanitized browser captures as supplemental evidence.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/pages/chat/chat-view.test.ts.
  • [P1] node scripts/run-vitest.mjs ui/src/e2e/chat-skill-references.e2e.test.ts.

What I checked:

Likely related people:

  • steipete: Authored the current-head composer accessibility repair and has maintained the picker overlay path. (role: recent area contributor; confidence: high; commits: 0e1219c0148b, 6d716d93187c; files: ui/src/pages/chat/components/chat-picker-overlay.ts, ui/src/pages/chat/components/chat-composer-plus-menu.ts)
  • vyctorbrzezowski: Previously refactored composer menu active-option scrolling and authored the current invocation redesign. (role: feature refactor author; confidence: high; commits: 4be9091a3ef6, 7630d060f850; files: ui/src/pages/chat/components/chat-composer-slash-menu.ts, ui/src/pages/chat/components/chat-composer-skill-menu.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Fix the event-target-scoped Escape dismissal and add the two-pane regression test.
  • Refresh exact-head validation after the repair.

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-08-26T00:36:40.864Z sha 70a69db :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T01:18:34.636Z sha 70a69db :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 26, 2026
The unified capability toggle row embedded a wa-switch even in checkbox
mode, reintroducing a hidden-but-real switch control inside the
new-session composer (breaking the rail-owns-switches contract asserted
by new-session-page.places e2e) and an aria-hidden focusable control.
Checkbox rows rely on the dropdown item's own checked state.
@steipete

Copy link
Copy Markdown
Contributor

Maintainer landing pass on the current head:

  • Fixed the exact-head CI failure in 0e1219c: the unified capability toggle row embedded a wa-switch even in checkbox mode, reintroducing a (hidden-but-real, aria-hidden-focusable) switch inside the new-session composer and breaking the rail-owns-switches contract (new-session-page.places e2e). Checkbox rows now rely on the dropdown item's own checked state; places, both capability-menu suites, chat-composer-redesign, and chat-skill-references are green locally (19 e2e tests), plus chat-view/theme-contrast units (276).
  • Current-head sanitized browser captures from the mocked-gateway harness attached (inspected): the skill-reference picker above the composer and inline skill chips in the draft.

@clawsweeper re-review

skill-reference-picker

skill-references-selected

skill-reference-wrapped

@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete steipete closed this Aug 26, 2026
@steipete steipete reopened this Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 26, 2026
@steipete
steipete merged commit 7b3fb42 into openclaw:main Aug 26, 2026
180 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
…penclaw#129707)

* improve(control-ui): align composer invocations with current main

* fix(ui): close composer invocation regressions

* test(ui): follow grouped slash hint rule

* fix(ui): preserve reasoning reset cleanup after rebase

* fix(ui): keep checkbox capability rows switch-free

The unified capability toggle row embedded a wa-switch even in checkbox
mode, reintroducing a hidden-but-real switch control inside the
new-session composer (breaking the rail-owns-switches contract asserted
by new-session-page.places e2e) and an aria-hidden focusable control.
Checkbox rows rely on the dropdown item's own checked state.

---------

Co-authored-by: Peter Steinberger <[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 maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants