Skip to content

fix(ui): keep Escape within its owner in settings and plugin pages - #165100

Merged
steipete merged 3 commits into
mainfrom
fix/w8-j5
Oct 4, 2026
Merged

steipete merged 3 commits into
mainfrom
fix/w8-j5

Conversation

@steipete

@steipete steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Escape did the wrong thing in three places in the Control UI settings:

  1. Settings search during IME composition. For Japanese, Chinese, or Korean input, Escape cancels or commits the composition. The settings search treated that Escape as its own, so it cleared the query, or left Settings entirely when the field was empty.
  2. Sidebar search over plugin details. With a plugin's settings open, pressing Escape in the sidebar search box closed the plugin details as well as clearing the search, because the plugin page listened for Escape on the whole document.
  3. Composing Escape in plugin text fields. Escape during composition in a plugin setting (for example, Workspace label) forced a blur, which saved the unfinished text immediately.

Why This Change Was Made

  • ui/src/components/settings-sidebar.ts handled Escape unconditionally (since fe2486247b6, extended in 663f4e796d3). It now uses the existing shared IME composition guard.
  • ui/src/pages/plugins/plugins-page.ts captured Escape document-wide (since 401f278f111). Its dismissal handler now ignores Escape owned by sibling controls such as the sidebar search, while unfocused Escape still dismisses the details.
  • The same page forced a blur on Escape, which triggered the blur-save path (1710fede5df). The IME guard now prevents that premature blur, and ordinary Tab still saves exactly once.

All three reuse the repository's existing IME and keyboard-ownership guards; no new mechanism was added.

User Impact

CJK input users can search and edit settings without losing text. Escape in the sidebar search clears only the search.

Evidence

Before and after, with synthetic data. Left: before. Right: after.

Settings search, composing Escape (the query 日本語 is kept):
settings search IME

Sidebar Escape with plugin details open (the details stay open):
plugin details dismissal

  • Three regressions for search composition each failed before the fix and pass after.
  • Plugin dismissal: before, the details closed; after, only the search clears, and unfocused Escape still dismisses.
  • Plugin composition: before, one unintended config.set; after, zero writes for both composition variants, and Tab saves once.
  • 473 related unit and browser tests and 13 focused keyboard E2E tests pass, along with check-changed. The broad E2E run was 159/160; the one failure is a pre-existing, test-only cache issue in screenshot-capture mode of plugins-hub-navigation.e2e.test.ts, which passes in normal mode.
  • The lane also smoke-tested 375px dark mode in English, German, and Japanese.
  • Production +12/-1; tests +118; docs +2.

Keep composing Escape with the input method, including legacy keyCode 229. Browser regressions retain Japanese search text and the current Settings route.
Let the Settings sidebar own Escape without closing plugin details. Preserve page-level dismissal when focus is on the document and existing dropdown dismissal order.
Return before forced blur while an input method owns Escape. Browser regressions prove that composing Escape sends no config.set and that ordinary Tab still saves the edited value.
@clawsweeper

clawsweeper Bot commented Oct 4, 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.

@steipete
steipete marked this pull request as ready for review October 4, 2026 20:38
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Oct 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Oct 4, 2026
@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed October 4, 2026, 4:48 PM ET / 20:48 UTC (Revision 2).

ClawSweeper review

What this changes

The PR preserves composing Escape in settings inputs and keeps sidebar Escape from dismissing plugin details, with browser regressions and documentation.

Merge readiness

⛔ Needs changes before merge - 1 item remains

The fix remains necessary on current main, and no introduced correctness or security defect was found. The prior test-cost reporting requirement remains outstanding.

Priority: P2
Reviewed head: c17bcf52ac4d2799ce928f64b12c71fa5bc54d98

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with inspected browser proof and meaningful regressions; required test-cost reporting remains incomplete.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before-and-after browser images demonstrate the changed sidebar and plugin-page handlers retaining Japanese search text and preserving plugin details. Supplied browser request assertions additionally cover composing-Escape write suppression and ordinary Tab saving; no stored-data model changes occur.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before-and-after browser images demonstrate the changed sidebar and plugin-page handlers retaining Japanese search text and preserving plugin details. Supplied browser request assertions additionally cover composing-Escape write suppression and ordinary Tab saving; no stored-data model changes occur.
Evidence reviewed 8 items Pinned introduced patch: The complete introduced patch adds the existing composition guard to sidebar search and plugin dismissal, plus a containment check for sibling controls. Configuration formats, save ownership, permissions, and dependencies are unchanged.
Current main still needs the repair: The production files are unchanged between the pinned base and fetched main. Main's plugin handler still captures sibling Escape and forces blur without checking composition.
Latest release retains unguarded search Escape: The v2026.9.8 sidebar handles Escape without a composition check, clearing a populated query or leaving Settings when empty.
Findings None None.
Security None None.

How this fits together

The Control UI settings sidebar and plugin pages receive keyboard input before navigating or saving edits. Escape ownership determines whether text composition continues, search clears, or plugin details close.

flowchart TD
 A[Escape key] --> B[Composition check]
 B -->|Composing| C[Input method retains control]
 B -->|Ordinary| D[Keyboard owner]
 D --> E[Sidebar clears search or exits]
 D --> F[Plugin details dismiss]
 F --> G[Blur commits edited value]
Loading

Before merge

  • Complete next step (P2) - Add measured local wall time and CI seconds for plugins-settings-composition.e2e.test.ts, plugins-settings-keyboard.e2e.test.ts, and settings-search-keyboard.e2e.test.ts to the PR body.
Agent review details

Security

None.

PR surface

Source +11, Tests +118, Docs +2. Total +131 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 12 1 +11
Tests 3 118 0 +118
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 132 1 +131

Review metrics

None.

Technical review

Best possible solution:

Keep Escape with the active input or page owner while preserving ordinary dismissal and the existing blur-save contract.

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

Yes: current-main handlers expose the reported paths, and supplied browser scenarios cover composition flags, legacy key code 229, sibling Escape, and ordinary Tab saving. This read-only review did not execute them.

Is this the best way to solve the issue?

Yes: the patch guards the existing keyboard owners with the shared IME predicate rather than adding competing navigation or save behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This repairs bounded settings keyboard failures that clear composing text, dismiss plugin details, or save unfinished edits.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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-and-after browser images demonstrate the changed sidebar and plugin-page handlers retaining Japanese search text and preserving plugin details. Supplied browser request assertions additionally cover composing-Escape write suppression and ordinary Tab saving; no stored-data model changes occur.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before-and-after browser images demonstrate the changed sidebar and plugin-page handlers retaining Japanese search text and preserving plugin details. Supplied browser request assertions additionally cover composing-Escape write suppression and ordinary Tab saving; no stored-data model changes occur.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before-and-after browser images demonstrate the changed sidebar and plugin-page handlers retaining Japanese search text and preserving plugin details. Supplied browser request assertions additionally cover composing-Escape write suppression and ordinary Tab saving; no stored-data model changes occur.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • NianJiu: Raw commit f48a9d3 adds ui/src/lib/ime.ts:16 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f48a9d33104d; files: ui/src/lib/ime.ts)

Rank-up moves

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

  • Record per-file local wall time and CI seconds for the three changed E2E files in the PR body.

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 (1 earlier review cycle)
  • reviewed 2026-10-04T20:43:49.549Z sha c17bcf5 :: needs changes before merge. :: none

@steipete
steipete merged commit 9c330a3 into main Oct 4, 2026
144 of 148 checks passed
@steipete
steipete deleted the fix/w8-j5 branch October 4, 2026 21:20
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 5, 2026
…penclaw#165100)

* fix(ui): preserve settings search during IME composition

Keep composing Escape with the input method, including legacy keyCode 229. Browser regressions retain Japanese search text and the current Settings route.

* fix(ui): keep plugin Escape handling within its keyboard scope

Let the Settings sidebar own Escape without closing plugin details. Preserve page-level dismissal when focus is on the document and existing dropdown dismissal order.

* fix(ui): avoid saving plugin edits on composing Escape

Return before forced blur while an input method owns Escape. Browser regressions prove that composing Escape sends no config.set and that ordinary Tab still saves the edited value.

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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. 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: S 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