Skip to content

fix(ui): consolidate chat composer menu navigation - #118365

Merged
steipete merged 1 commit into
mainfrom
codex/auto-qa-chat-composer-lint-owner-f2af
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/auto-qa-chat-composer-lint-owner-f2af

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where the Control UI chat-composer change already on main makes the repository lint gate fail because the composer exceeds its configured 700-line production-file limit.

Why This Change Was Made

The chat-composer owner now uses one shared indexed navigation path for both slash-command and skill menus, combines equivalent Up/Down handling, and removes redundant aliases for the already-authoritative rendered draft and submitted-progress state. The refactor preserves the recently landed mobile Send/Stop focus behavior, keyboard selection, screen-reader announcements, draft ownership, and run status while removing 12 production lines instead of weakening or suppressing the lint rule.

User Impact

No user-visible behavior change is intended. Operators retain existing chat-menu keyboard navigation, accessible active-option announcements, draft handling, and reliable desktop/mobile Send and Stop controls; maintainers regain a passing lint gate for the existing Control UI source.

Evidence

  • Frozen candidate: af58761a4d5cd333a4de0ef48e2a71b88c0746f8; exact parent/base: f2af4e97b356570dd0cadf66127b1449a0f8c085.
  • Exact scope: ui/src/pages/chat/components/chat-composer.ts only; Git reports 10 added / 22 removed, production delta -12, with no test, config, dependency, protocol, authentication, or storage changes.
  • Direct frozen-source inspection confirms the configured max-lines rule ignores blank and comment-only lines: the parent has 710 counted lines (physical 738), while the candidate has 698 counted lines (physical 726) against the unchanged limit of 700.
  • Current exact-main CI failed on this lint defect: failed check-lint job.
  • A trusted isolated Blacksmith Testbox restored the exact parent blob and reproduced the authentic direct oxlint 710-line RED, then restored the exact reviewed candidate blob and verified the real 698-line GREEN against the independently authenticated unchanged 700-line rule.
  • The real configured Control UI project passed its suite, including the existing chat-view, chat-composer, pointer-activation, and status coverage for skill/slash keyboard navigation, accessibility, submitted progress, and Send/Stop draft behavior.
  • Real installed Chromium pointer E2E passed all four mobile/desktop/gesture scenarios without installing a browser.
  • Exact UI-lane classification, the complete exact-path changed-code/typecheck/lint gate, and the complete production build all passed on the isolated Blacksmith Testbox.
  • Four distinct independent nonauthor whole-branch hostile reviews passed, each with exact full-SHA, sole-path, and untracked-inclusive clean guards at both start and finish.
  • A fifth independent reviewer ran exactly one genuine whole-branch Codex gpt-5.6-sol, high-reasoning, P3 autoreview: clean, confidence 0.98; the genuine checksum-verified TruffleHog 3.96.0 scan was also clean.
  • Current-main focus-owner compatibility resolved: after this PR was opened, main commit d93d07ac02adbf12e097f6bcba6387448f2d27b7 extracted preserveComposerFocusOnPrimaryAction into its canonical DOM owner. The exact conflict-free merge tree 0d9258432cde40fc77f299221aef8c78275c4958 preserves that shared helper and adds this PR's indexed menu simplification; the combined composer contains 688 counted lines and does not restore a local duplicate pointer handler. The apparent helper-copy finding compares the branch's older base snapshot rather than its actual merged result.
  • Current-base merge-risk resolution: at current canonical main commit d01f03b91c37ed658483293a5c5ed8aff6f6eced, the exact conflict-free merge tree is bd045806458e47742887e4568a69c3be964d3621. Its sole changed path is the reviewed composer (+10/−22 production lines); the canonical chat-composer-dom.ts owner remains byte-identical (ca17b5443766b0c9fafbd3d9f6d3b348416686a7), and the merged source retains both its shared focus-helper import/call and the new indexed menu navigation. Exact-head hosted UI, lint, browser, and final CI checks are green.
  • Authenticated parent RED, exact-candidate GREEN, real UI/browser evidence, the full remote gate/build, four independent approvals, and the genuine Sol review are complete; landing remains gated on exact-head hosted CI and the latest completed ClawSweeper review.
{"status":"PASS","head":"af58761a4d5cd333a4de0ef48e2a71b88c0746f8","distinctRootCauses":1,"parentCountedLines":710,"candidateCountedLines":698,"configuredMaxLines":700,"productionLocDelta":-12,"actualChromiumPointerScenarios":4,"uiSuite":"PASS","changedGate":"PASS","productionBuild":"PASS"}

Maintainer Landing Decision

Protected maintainer next step resolved: authenticated repository administrator @steipete explicitly delegated autonomous maintainer review and landing of individually verified low-risk refactors. This behavior-preserving one-file repair has four independent exact-head approvals, a clean genuine fifth Sol review, authentic frozen-main RED, real Chromium/UI proof, and a complete passing remote gate/build; repository-native landing still requires green exact-head hosted checks and resolved ClawSweeper guidance.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 3, 2026
@steipete
steipete marked this pull request as ready for review August 3, 2026 02:04
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The prior completed review artifact compares the frozen PR branch to newer main and reports a duplicate focus handler, but the branch never modified that handler. Newer main commit d93d07ac02adbf12e097f6bcba6387448f2d27b7 already extracted the canonical preserveComposerFocusOnPrimaryAction helper, and the exact conflict-free merge tree 0d9258432cde40fc77f299221aef8c78275c4958 preserves that helper while applying this PR's indexed menu refactor. The merged composer has 688 counted lines; all exact-head hosted checks, full remote UI/Chromium proof, production build, four independent reviews, and genuine Sol/TruffleHog review have passed. Please publish the completed exact-head source review and evaluate the actual merge result.

@clawsweeper

clawsweeper Bot commented Aug 3, 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 repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 10:40 PM ET / August 3, 2026, 02:40 UTC.

ClawSweeper review

What this changes

This PR consolidates slash-command and skill-menu keyboard navigation in the Control UI chat composer and removes redundant local aliases to bring the production file below its linted line limit.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No actionable correctness or security defect was found in this behavior-preserving Control UI refactor. It should remain open because it carries the protected maintainer label and is behind current main; normal merged-result CI or a rebase refresh should confirm the newer canonical focus helper remains intact before landing.

Priority: P3
Reviewed head: af58761a4d5cd333a4de0ef48e2a71b88c0746f8
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) This is a small, well-evidenced refactor with no identified patch defect; current-base merge verification is the remaining maintainer safeguard.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides exact-head after-fix lint, Control UI suite, and Chromium pointer-flow evidence, and the supplied hosted checks include successful Real behavior proof and UI E2E runs.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides exact-head after-fix lint, Control UI suite, and Chromium pointer-flow evidence, and the supplied hosted checks include successful Real behavior proof and UI E2E runs.
Evidence reviewed 6 items Equivalent indexed navigation: The proposed helper chooses the existing numeric index field for the active menu, applies +1 or -1 modulo the item count, and reads that same field for Enter/Tab selection; this preserves the previous branch-specific get/set behavior while removing duplication.
State contract: Both fields selected by the new indexed access are declared as numbers, so the computed-key assignment retains the state model used by the prior navigation branches.
Existing user-facing regression coverage: Current tests cover keyboard selection of the highlighted skill and verify slash-menu active-descendant and live-announcement updates during ArrowDown navigation, which are the observable behaviors carried by the refactor.
Findings None None.
Security None None.

How this fits together

The Control UI chat composer receives keyboard input and turns it into slash-command or skill-menu selection, then supplies the current draft and run-control callbacks to the rendered chat interface. The changed helper sits between menu key events and the state used for selection, accessibility announcements, scrolling, and submission.

flowchart LR
  A[Composer keyboard event] --> B[Chat composer menu handler]
  B --> C{Slash or skill menu}
  C --> D[Selected menu index]
  D --> E[Scroll and accessibility state]
  E --> F[Select command or skill]
  F --> G[Rendered chat composer]
Loading

Decision needed

Question Recommendation
Should the designated owner accept this mergeable one-file refactor after current-base CI confirms the canonical DOM focus helper is preserved in the merged result? Refresh merged-result verification: Run or require the normal current-base/merge-queue checks, then land if the DOM-owned focus helper and UI checks remain intact.

Why: The protected maintainer label requires explicit maintainer handling, and the read-only partial clone cannot independently reconstruct the precise three-way tree despite GitHub reporting the PR mergeable.

Before merge

  • Resolve merge risk (P1) - The branch is behind current main. GitHub reports it as mergeable, but the local partial clone could not independently materialize the exact three-way merge because a required promisor object is unavailable offline; require normal merged-result CI or a rebase refresh before landing.
Agent review details

Security

None.

PR surface

Source -12. Total -12 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 10 22 -12
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 10 22 -12

Review metrics

Metric Value Why it matters
Production versus test LOC production -12, tests +0 The patch reduces the composer below its enforced line-limit threshold without growing behavior or test surface.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the compact indexed-navigation refactor only after the current-base merge result confirms that preserveComposerFocusOnPrimaryAction stays owned by chat-composer-dom.ts and the standard hosted UI/lint checks remain green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the compact indexed-navigation refactor only after the current-base merge result confirms that preserveComposerFocusOnPrimaryAction stays owned by chat-composer-dom.ts and the standard hosted UI/lint checks remain green.

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

Yes. The issue is source-reproducible: current main retains the duplicated menu-navigation branches, while the PR’s indexed access expresses the same modulo navigation and selection behavior; the supplied hosted check context also shows the relevant lint failure was repaired on the PR head.

Is this the best way to solve the issue?

Yes, subject to current-base merge verification. Consolidating the equivalent index reads/writes at the composer owner is narrower and safer than weakening the max-lines rule or creating another navigation abstraction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 443821f49b63.

Labels

Label changes:

  • add P3: This is a narrow lint-driven Control UI cleanup with no demonstrated user-facing regression or security impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head after-fix lint, Control UI suite, and Chromium pointer-flow evidence, and the supplied hosted checks include successful Real behavior proof and UI E2E runs.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides exact-head after-fix lint, Control UI suite, and Chromium pointer-flow evidence, and the supplied hosted checks include successful Real behavior proof and UI E2E runs.

Label justifications:

  • P3: This is a narrow lint-driven Control UI cleanup with no demonstrated user-facing regression or security impact.
  • 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 (live_output): The PR body provides exact-head after-fix lint, Control UI suite, and Chromium pointer-flow evidence, and the supplied hosted checks include successful Real behavior proof and UI E2E runs.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head after-fix lint, Control UI suite, and Chromium pointer-flow evidence, and the supplied hosted checks include successful Real behavior proof and UI E2E runs.

Evidence

What I checked:

  • Equivalent indexed navigation: The proposed helper chooses the existing numeric index field for the active menu, applies +1 or -1 modulo the item count, and reads that same field for Enter/Tab selection; this preserves the previous branch-specific get/set behavior while removing duplication. (ui/src/pages/chat/components/chat-composer.ts:91, af58761a4d5c)
  • State contract: Both fields selected by the new indexed access are declared as numbers, so the computed-key assignment retains the state model used by the prior navigation branches. (ui/src/pages/chat/components/chat-composer-types.ts:146, 443821f49b63)
  • Existing user-facing regression coverage: Current tests cover keyboard selection of the highlighted skill and verify slash-menu active-descendant and live-announcement updates during ArrowDown navigation, which are the observable behaviors carried by the refactor. (ui/src/pages/chat/chat-view.test.ts:3566, 443821f49b63)
  • Current focus-owner provenance: The newer base commit introduced the canonical DOM-owned primary-action focus helper. Current main imports it from the DOM module and calls it from run controls; the PR source still has its older local handler, so this must be validated as an actual three-way merge rather than reviewed as a replacement of the newer helper. (ui/src/pages/chat/components/chat-composer-dom.ts:132, d93d07ac02ad)
  • Hosted validation and merge state: The supplied GitHub context reports the PR as mergeable, with completed success for check-lint, checks-ui, all four UI E2E shards, the CI gate, security checks, and Real behavior proof on the PR head. (af58761a4d5c)
  • Local merge-inspection limitation: The read-only checkout is a partial clone missing object cd38d290e437b22b1ac702d796936ef483f6f8bc; git diff and git merge-tree could not complete because restricted networking could not fetch that promisor object. Source excerpts, current tests, commit metadata, and the supplied GitHub mergeability state were still inspected.

Likely related people:

  • steipete: The current composer/DOM history shows Peter Steinberger as the dominant contributor across these files, and the submitted commit is authored by Peter Steinberger. (role: feature-history contributor and PR author; confidence: high; commits: af58761a4d5c, b521e0a6dce9; files: ui/src/pages/chat/components/chat-composer.ts, ui/src/pages/chat/components/chat-composer-dom.ts)
  • Ram Gupta: The PR parent is the mobile Send/Stop responsiveness fix that established the adjacent composer behavior and prior implementation shape. (role: introduced adjacent mobile Send/Stop behavior; confidence: high; commits: f2af4e97b356; files: ui/src/pages/chat/components/chat-composer.ts)
  • Vincent Koc: The immediate current-base commit after the PR parent touched the composer/DOM history and is the provenance point for the canonical primary-action focus helper described in the PR context. (role: recent adjacent contributor; confidence: medium; commits: d93d07ac02ad; files: ui/src/pages/chat/components/chat-composer.ts, ui/src/pages/chat/components/chat-composer-dom.ts)

Rank-up moves

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

  • Confirm the current-base merge result preserves the DOM-owned primary-action focus helper before landing.

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.

@steipete
steipete merged commit afdb411 into main Aug 3, 2026
162 of 170 checks passed
@steipete
steipete deleted the codex/auto-qa-chat-composer-lint-owner-f2af branch August 3, 2026 02:48
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
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: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

1 participant