Skip to content

fix(ui): file search skips the first match when Enter confirms IME input in Safari - #196151

Merged
obviyus merged 3 commits into
openclaw:mainfrom
masatohoshino:fix/ui-file-search-ime-enter
Nov 9, 2026
Merged

obviyus merged 3 commits into
openclaw:mainfrom
masatohoshino:fix/ui-file-search-ime-enter

Conversation

@masatohoshino

@masatohoshino masatohoshino commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #196150

What Problem This Solves

Fixes: Search in file in the Control UI chat file viewer skips the first match when the Enter that confirms IME composition arrives in WebKit's event order (seen in Safari).

User Impact

User impact: in Safari, a search typed with an input method (Japanese, Chinese, Korean and similar) now starts on the first match, and a plain Enter still moves to the next match. iOS browsers use WebKit too and should get the same fix; that was not tested on a device.

Why This Change Was Made

WebKit can deliver the committing Enter after compositionend with both composition flags cleared, so the file search keydown handler treated it as a plain Enter and ran Next match. The Control UI already handles this order in its shared IME helper (ui/src/lib/ime.ts), as the Usage query field does since #195087. The file search now uses the same helper: the keydown handler leaves composition Enters alone, and the desktop and mobile search inputs record compositionend for it.

In Chrome the old behavior was not visible, because the commit's input event resets the search to the first match after the composing Enter; the change keeps that path as it was.

Evidence

Tested at 2651428ed6e9553f266c628e656d139238226b9e (base upstream/main 333dc30679c956a334d3ae1fc9222581a2be323a).

Real Safari 27.0 on macOS 15.8.1 with the macOS Japanese Romaji input method; keys sent as real key events through the input method (no synthetic DOM or devtools events). An isolated Gateway with its own state directory and port served a Control UI built from the base or from this branch; the served bundles' source maps were checked against both commits. Flow: chat Details file viewer, search.json with three lines containing 雪, File actions, Search in file. Steps: type yuki (composes 雪), Return (confirms it), Return, Return. Each side ran twice with the same counters.

Safari before and after

Before (base 333dc30679c), runs 1 and 2:

composing 雪: 1/3   confirming Enter: 2/3   plain Enter: 3/3   plain Enter: 1/3

Before, run 1: 1/3, 2/3, 3/3, 1/3

After (this PR), runs 1 and 2:

composing 雪: 1/3   confirming Enter: 1/3   plain Enter: 2/3   plain Enter: 3/3

After, run 1: 1/3, 1/3, 2/3, 3/3

Observed result: on the base the confirming Enter skips to the second match; with the fix it stays on the first, and plain Enters still step through the matches.

Checks: the touched browser test file, plus the repository's format check, oxlint and tsgo -p tsconfig.ui.json on the touched files; the broad suites run in this PR's CI. The new test fails on the base and passes on this branch (both desktop and mobile cases).

Test file Wall time (pnpm test <file> --maxWorkers=1) CI seconds
ui/src/pages/chat/components/chat-sidebar-file-view.browser.test.ts 15.8 s end to end (Vitest duration 12.2 s; whole file, 25 tests, browser mode, 2 of them new) from this PR's CI once it runs

Not covered: iOS Safari and other iOS browsers were not run on a device (they share WebKit's order but were not observed). The Safari event order is read from the shared IME helper's note and matches the counters; the raw key events were not logged in Safari.

Supporting replay and change size

A Chrome replay with trusted input-method events, desktop and mobile layouts, each scenario twice per side: with the events sent in WebKit's order the base went 1/3, 2/3, 3/3 and this branch 1/3, 1/3, 2/3; in Chrome's own order both sides went 1/3, 1/3, 2/3. This is supporting only; the Safari run above is the proof.

Change size against the merge base: production +12 lines in 3 files (one guard, two input handlers each), test +36 lines in 1 file. A simplify pass removed one comment that restated the guard; the guard and both inputs' composition handlers stay because the mobile and desktop search fields are separate inputs.

Maintainer follow-up

Re-proved in Playwright WebKit with a real input method composition on a built Gateway and Control UI (desktop and mobile, main twice, this head twice, plus controls). The new test was folded into existing tests (test lines net -2), and main was merged. Details and screenshots: #196151 (comment)

Maintainer proof (built Control UI, real Gateway, WebKit IME)

Before (main, desktop): the confirming Enter lands on 2/3.

Before: main desktop lands on match 2 of 3

After (desktop): it stays on 1/3.

After: desktop stays on match 1 of 3

Before (main, mobile): 2/3.

Before: main mobile lands on match 2 of 3

After (mobile): 1/3.

After: mobile stays on match 1 of 3

…earch match

The Find in file search of the chat Details file viewer moved to the next match on every Enter, including the Enter that confirms IME composition, so CJK input started at the second match. The search keydown handler now lets composition Enters through with the shared IME helper, and both the desktop and mobile search inputs record compositionend for it. A plain Enter still moves to the next match.
@clawsweeper

clawsweeper Bot commented Nov 9, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. 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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR prevents Enter used to confirm IME input from advancing file-search matches on desktop and mobile.

Example: Search search.json for 雪 using Japanese IME when three lines match.

  • Before: Confirming the composition advances the counter from 1/3 to 2/3.
  • After: Confirmation leaves the counter at 1/3; the next plain Enter advances to 2/3.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, correct repair with strong runtime evidence and useful consolidated regressions; broad exact-head CI remains incomplete.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected native Safari before/after screenshots show composition confirmation retaining match 1/3 and subsequent Enter advancing normally; obviyus documents the exact head on built Gateway and Control UI with desktop/mobile WebKit and Chromium controls, while production hunks are unchanged from the Safari-proven revision.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Confirming Japanese or similar IME input skips the first matching line in Safari file search.
Reason: The change restores established IME confirmation behavior through an existing owner, and collaborator runtime verification supports the direction.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR fixes a current file-search bug with a small, coherent patch and convincing runtime evidence; no actionable code defects were found, but exact-head CI has not completed successfully.

Priority: P2
Reviewed head: 666c3bec3a4c778541f34d3fb89eb91d73e32c92

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI file reader passes desktop and mobile search events to shared presentation actions, which update the selected match and editor highlighting.

flowchart LR
  A[Desktop search input] --> C[Shared IME helper]
  B[Mobile search input] --> C
  C --> D[File presentation actions]
  D --> E[Match selection and highlighting]
Loading

Technical review

Best possible solution:

Land the existing shared-helper integration after the required CI gate succeeds.

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

Current main exposes the unguarded Enter path, and supplied Safari screenshots plus exact-head WebKit reports establish the failure and correction; no target code was executed during this review.

Is this the best way to solve the issue?

This is the smallest complete production fix: retain the existing search owner, reuse its shared IME policy, and wire both independently rendered inputs.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • File-search Enter handling keeps the original intent (9e2c766: The reader-controls change provides search navigation while preserving file preview and draft lifecycle; this commit carries the current handler, without proving its earliest origin.)
  • Shared IME event policy keeps the original intent (f48a9d3: Prevent Safari composition confirmation from submitting inputs while permitting subsequent deliberate Enter through input-local lifecycle cleanup.)
  • Browser regression consolidation keeps the original intent (6457db9: Existing tests protect displayed line endings and clean draft/reload behavior; consolidation retains their meaningful assertions and adds desktop and mobile IME checks.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 9e2c766 adds ui/src/pages/chat/components/chat-detail-file-presentation.ts:162 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9e2c766d84ab; files: ui/src/pages/chat/components/chat-detail-file-presentation.ts)

PR surface

Source +12, Tests -2. Total +10 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 12 0 +12
Tests 1 12 14 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 24 14 +10

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test LOC Production +12/-0; tests +12/-14 Necessary wiring covers two separate inputs while existing browser tests absorb both regressions without net test growth.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #196150
Summary: This PR implements the linked file-search report; the merged Usage repair supplies a shared-helper precedent rather than fixing this search path.

Members:

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: IME confirmation skips a search result in Safari, but users can recover through reverse navigation or wrapping.
  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

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

  • Obtain successful required CI for the reviewed head after the missing or abandoned lanes are resolved.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-09T17:40:39.268Z sha 2651428 :: needs maintainer review before merge. :: none

Reviewed November 9, 2026, 1:28 PM ET / 18:28 UTC (Revision 2).

@obviyus

obviyus commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Proof on a real Gateway (secretless Docker, node 24.22.1, built Gateway serving the built Control UI). A chat file link opens search.json (three lines with 雪) in the file viewer; desktop (1440 px, File actions > Search in file) and mobile (400 px, Search in file). main 4c08df2 (two runs), candidate 666c3be (two runs).

WebKit (Playwright WebKit, headed under Xvfb): the query is typed through a real GTK input method composition (Ctrl+Shift+U 96ea), and the native Return ends it (compositionend). Then a trusted Enter keydown arrives right after compositionend with isComposing: false and keyCode 13, which is the Safari order (28 to 79 ms after compositionend in these runs).

main, both runs candidate, both runs
Enter that confirms the IME input 2/3 (first match skipped) 1/3
next plain Enter 3/3 2/3

Same on desktop and mobile.

Controls, same on both refs in every run:

  • Plain Enter without IME: 1/3 to 2/3, and Shift+Enter goes back to 1/3.
  • Clearing the field: 0/0 on desktop, and the counter is hidden on mobile.
  • Escape closes search. Focus goes to More file actions on desktop and to Search in file on mobile.
  • Chromium IME (CDP Input.imeSetComposition, Enter while composing with isComposing: true, then commit): both end at 1/3 after the commit and 2/3 after a plain Enter. main briefly shows 2/3 between the composing Enter and the commit, and the commit's input event resets it. The candidate stays at 1/3 the whole time.

Control UI gzip (repo performance check, candidate against main): chat boot +0 B and startup +0 B. Served gzip, which includes hash noise: +139 B in total.

Changes on top of the contributor's fix (production code unchanged): I replaced the new 36-line test with IME steps inside existing tests. The search keyboard test now covers the mobile input, and the desktop SVG search step covers the desktop input. I also removed a few redundant lines. Both folded steps fail on main (3/3 instead of 2/3, and the Enter is prevented) and pass on this head. Test lines net -2. I also merged current main.

Screenshots: main and candidate right after the IME-confirming Enter, desktop and mobile.

main desktop: 2/3 after IME-confirming Enter

candidate desktop: 1/3 after IME-confirming Enter

main mobile: 2/3 after IME-confirming Enter

candidate mobile: 1/3 after IME-confirming Enter

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 9, 2026
@obviyus
obviyus merged commit e2320c3 into openclaw:main Nov 9, 2026
76 of 79 checks passed
@obviyus

obviyus commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Landed in e2320c3. Thanks @masatohoshino. Confirming an IME word with Enter in Safari no longer skips the first file search match.

github-actions Bot pushed a commit to superAlex0071379/openclaw that referenced this pull request Nov 9, 2026
…put in Safari (#196151)

fix(ui): file search skips the first match when Enter confirms IME input in Safari

In the chat file viewer's Search in file, Safari sends the Enter that confirms an IME word after the composition has ended, with the composition flags already cleared. The search treated it as a plain Enter and jumped to the second match. The desktop and mobile search inputs now use the existing ime.ts guard, so the confirming Enter keeps the first match and the next plain Enter advances.

Evidence: a built Gateway and Control UI on node 24.22.1 in Docker, opening a real chat file link. Playwright WebKit typed 雪 through a real GTK input method, then a trusted Enter arrived 28 to 79 ms after the composition ended (Safari's order). On main the confirming Enter jumped to 2/3 on desktop and mobile (two runs). With this change it stays on 1/3 and a plain Enter moves to 2/3. Plain Enter, Shift+Enter, clearing and Escape are identical on both, and Chromium ends at the same match on both. Control UI gzip: +0 B. Details: openclaw/openclaw#196151 (comment).

Before (main, desktop): the confirming Enter lands on 2/3.

![Before: main desktop lands on match 2 of 3](https://github.com/user-attachments/assets/98769f35-1fb3-4067-8a70-42c27465f3ba)

After (desktop): it stays on 1/3.

![After: desktop stays on match 1 of 3](https://github.com/user-attachments/assets/c7d979e4-e341-4a69-8f6d-e8bcd5c63fe0)

Before (main, mobile): 2/3.

![Before: main mobile lands on match 2 of 3](https://github.com/user-attachments/assets/f64e1b6f-189e-4c1c-b7f1-3221ce9fcfdd)

After (mobile): 1/3.

![After: mobile stays on match 1 of 3](https://github.com/user-attachments/assets/6e104989-a0b7-4eea-a51c-b7c438d3508a)

Thanks @masatohoshino.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to u12ebauer/openclaw that referenced this pull request Nov 9, 2026
…put in Safari (#196151)

fix(ui): file search skips the first match when Enter confirms IME input in Safari

In the chat file viewer's Search in file, Safari sends the Enter that confirms an IME word after the composition has ended, with the composition flags already cleared. The search treated it as a plain Enter and jumped to the second match. The desktop and mobile search inputs now use the existing ime.ts guard, so the confirming Enter keeps the first match and the next plain Enter advances.

Evidence: a built Gateway and Control UI on node 24.22.1 in Docker, opening a real chat file link. Playwright WebKit typed 雪 through a real GTK input method, then a trusted Enter arrived 28 to 79 ms after the composition ended (Safari's order). On main the confirming Enter jumped to 2/3 on desktop and mobile (two runs). With this change it stays on 1/3 and a plain Enter moves to 2/3. Plain Enter, Shift+Enter, clearing and Escape are identical on both, and Chromium ends at the same match on both. Control UI gzip: +0 B. Details: openclaw/openclaw#196151 (comment).

Before (main, desktop): the confirming Enter lands on 2/3.

![Before: main desktop lands on match 2 of 3](https://github.com/user-attachments/assets/98769f35-1fb3-4067-8a70-42c27465f3ba)

After (desktop): it stays on 1/3.

![After: desktop stays on match 1 of 3](https://github.com/user-attachments/assets/c7d979e4-e341-4a69-8f6d-e8bcd5c63fe0)

Before (main, mobile): 2/3.

![Before: main mobile lands on match 2 of 3](https://github.com/user-attachments/assets/f64e1b6f-189e-4c1c-b7f1-3221ce9fcfdd)

After (mobile): 1/3.

![After: mobile stays on match 1 of 3](https://github.com/user-attachments/assets/6e104989-a0b7-4eea-a51c-b7c438d3508a)

Thanks @masatohoshino.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to caoyuanchenxicaoyuanchenxi3238/openclaw that referenced this pull request Nov 9, 2026
…put in Safari (#196151)

fix(ui): file search skips the first match when Enter confirms IME input in Safari

In the chat file viewer's Search in file, Safari sends the Enter that confirms an IME word after the composition has ended, with the composition flags already cleared. The search treated it as a plain Enter and jumped to the second match. The desktop and mobile search inputs now use the existing ime.ts guard, so the confirming Enter keeps the first match and the next plain Enter advances.

Evidence: a built Gateway and Control UI on node 24.22.1 in Docker, opening a real chat file link. Playwright WebKit typed 雪 through a real GTK input method, then a trusted Enter arrived 28 to 79 ms after the composition ended (Safari's order). On main the confirming Enter jumped to 2/3 on desktop and mobile (two runs). With this change it stays on 1/3 and a plain Enter moves to 2/3. Plain Enter, Shift+Enter, clearing and Escape are identical on both, and Chromium ends at the same match on both. Control UI gzip: +0 B. Details: openclaw/openclaw#196151 (comment).

Before (main, desktop): the confirming Enter lands on 2/3.

![Before: main desktop lands on match 2 of 3](https://github.com/user-attachments/assets/98769f35-1fb3-4067-8a70-42c27465f3ba)

After (desktop): it stays on 1/3.

![After: desktop stays on match 1 of 3](https://github.com/user-attachments/assets/c7d979e4-e341-4a69-8f6d-e8bcd5c63fe0)

Before (main, mobile): 2/3.

![Before: main mobile lands on match 2 of 3](https://github.com/user-attachments/assets/f64e1b6f-189e-4c1c-b7f1-3221ce9fcfdd)

After (mobile): 1/3.

![After: mobile stays on match 1 of 3](https://github.com/user-attachments/assets/6e104989-a0b7-4eea-a51c-b7c438d3508a)

Thanks @masatohoshino.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 10, 2026
…put in Safari (openclaw#196151)

fix(ui): file search skips the first match when Enter confirms IME input in Safari

In the chat file viewer's Search in file, Safari sends the Enter that confirms an IME word after the composition has ended, with the composition flags already cleared. The search treated it as a plain Enter and jumped to the second match. The desktop and mobile search inputs now use the existing ime.ts guard, so the confirming Enter keeps the first match and the next plain Enter advances.

Evidence: a built Gateway and Control UI on node 24.22.1 in Docker, opening a real chat file link. Playwright WebKit typed 雪 through a real GTK input method, then a trusted Enter arrived 28 to 79 ms after the composition ended (Safari's order). On main the confirming Enter jumped to 2/3 on desktop and mobile (two runs). With this change it stays on 1/3 and a plain Enter moves to 2/3. Plain Enter, Shift+Enter, clearing and Escape are identical on both, and Chromium ends at the same match on both. Control UI gzip: +0 B. Details: openclaw#196151 (comment).

Before (main, desktop): the confirming Enter lands on 2/3.

![Before: main desktop lands on match 2 of 3](https://github.com/user-attachments/assets/98769f35-1fb3-4067-8a70-42c27465f3ba)

After (desktop): it stays on 1/3.

![After: desktop stays on match 1 of 3](https://github.com/user-attachments/assets/c7d979e4-e341-4a69-8f6d-e8bcd5c63fe0)

Before (main, mobile): 2/3.

![Before: main mobile lands on match 2 of 3](https://github.com/user-attachments/assets/f64e1b6f-189e-4c1c-b7f1-3221ce9fcfdd)

After (mobile): 1/3.

![After: mobile stays on match 1 of 3](https://github.com/user-attachments/assets/6e104989-a0b7-4eea-a51c-b7c438d3508a)

Thanks @masatohoshino.

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Nov 15, 2026
fix(ui): keep Ask OpenClaw drafts when Enter confirms IME input

In Ask OpenClaw (the Custodian), the composer checked only `event.isComposing`, so an Enter that confirms Chinese or Japanese IME input and arrives as keyCode 229 or right after `compositionend` (the Safari/WebKit order) submitted the unfinished instruction and cleared the draft. The composer now uses the shared `ui/src/lib/ime.ts` guard, as the chat composer and the earlier fixes #195983 and #196151 do. The setup screen's sensitive composer gets the same guard; the current wizard always sends a step there, so that path has no live route and only its unit contract is covered. No new text. Control UI gzip grows by +416 B (startup + chat boot), within the bug-fix allowance; override receipt on the PR.

Evidence: Control UI served from source by an isolated loopback Gateway; Playwright Chromium composing CJK text through CDP, twice per side, plus one WebKit 27.2 run per side (harness-only PushAPIEnabled=false). Base: the confirming Enter (keyCode 229, and Enter right after compositionend) sends the unfinished text and clears the draft; this change keeps the draft, and a following plain Enter sends it once. Gateway request counts confirm both. Plain Enter and Shift+Enter behave the same on both. Unit: three cases fail on base, 30 pass here. Screenshots and receipts: #199638 (comment).

Thanks @zhangguiping-xydt.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 16, 2026
…w#199638)

fix(ui): keep Ask OpenClaw drafts when Enter confirms IME input

In Ask OpenClaw (the Custodian), the composer checked only `event.isComposing`, so an Enter that confirms Chinese or Japanese IME input and arrives as keyCode 229 or right after `compositionend` (the Safari/WebKit order) submitted the unfinished instruction and cleared the draft. The composer now uses the shared `ui/src/lib/ime.ts` guard, as the chat composer and the earlier fixes openclaw#195983 and openclaw#196151 do. The setup screen's sensitive composer gets the same guard; the current wizard always sends a step there, so that path has no live route and only its unit contract is covered. No new text. Control UI gzip grows by +416 B (startup + chat boot), within the bug-fix allowance; override receipt on the PR.

Evidence: Control UI served from source by an isolated loopback Gateway; Playwright Chromium composing CJK text through CDP, twice per side, plus one WebKit 27.2 run per side (harness-only PushAPIEnabled=false). Base: the confirming Enter (keyCode 229, and Enter right after compositionend) sends the unfinished text and clears the draft; this change keeps the draft, and a following plain Enter sends it once. Gateway request counts confirm both. Plain Enter and Shift+Enter behave the same on both. Unit: three cases fail on base, 30 pass here. Screenshots and receipts: openclaw#199638 (comment).

Thanks @zhangguiping-xydt.

Co-authored-by: Ayaan Zaidi <[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 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: 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.

[Bug]: Control UI file search skips the first match when Enter confirms IME input in Safari

2 participants