Skip to content

fix(web): Esc in ignored file search clears it without closing Add to another machine - #43559

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-add-project-machine-search-escape
Nov 26, 2026
Merged

juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-add-project-machine-search-escape

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Pressing Esc in the Search ignored files box of Add to another machine closed the whole dialog. That threw away the search, the ignored files you had checked and the clone setup, instead of just clearing what you typed. Holding Esc, or pressing it while an IME was composing, could do the same.

The search box now works like the other dialog searches (#41856, #41764, #42130, #42158, #42129). The first Esc clears a non-empty search and keeps focus there. A second Esc on the empty box closes the dialog. Held-Esc repeats can't close it, and Esc during IME composition is left to the IME. The input is type="text" with role="searchbox" and enterKeyHint="search", because a native search input clears itself on Escape even during composition. The existing Enter guard stays, so Enter still doesn't submit the clone.

Setup

Web on Linux (Chrome), dev build with no seeded data. One test server ("Test machine") holds a sample repo with 230 git-ignored files, so the ignored-file list is cut off at 200 and the search box shows. A second paired server ("Second machine") is the clone target. Composer → Run on → Add to another machine → Second machine.

Steps

  1. Check build-001.log, then type build-21 in Search ignored files.
  2. Press Esc.
Before (387d1c1) After (4535ddc)
Typed build-21, 2 of 200 checked Before: build-21 typed, 2 of 200 files checked After: build-21 typed, 2 of 200 files checked
After one Esc Before: the Add to another machine dialog closed After: the search cleared, the dialog stayed open and build-001.log is still checked

Pressing Esc again with the search empty closes the dialog.

Tests

  • A new case in AddProjectToMachineDialog.browser.test.tsx covers IME Esc, the first Esc clearing (with focus and the checked file kept), a held-Esc repeat, and the second Esc closing. It fails on main (the dialog closes on the first Esc) and passes here. Each guard was also removed one at a time (the key-repeat check, the composition check before clearing, the clear itself, and type="text"), and the test fails for each.
  • vp run check:changed passes.

An AI agent ran each of these checks. Mobile is not affected: it has no Add to another machine dialog. Desktop renders this same web component.

Generated with Claude Opus 5.5 in T3 Code Nightly

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The ignored-file search field now uses text input semantics and handles Escape based on query state, repeat state, and IME composition. Browser tests cover query clearing, focus retention, and dialog closure.

Changes: Ignored-file search

Layer / File(s) Summary
Search input Escape handling
apps/web/src/components/AddProjectToMachineDialog.tsx, apps/web/src/components/AddProjectToMachineDialog.browser.test.tsx
The search field uses a text input with searchbox semantics and a search key hint. Escape clears a nonempty query and prevents propagation unless the input is composing. Tests cover composition-related Escape presses, focus retention, and dialog closure after subsequent Escape presses.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: stienswout

Merge Risk: Minimal · up to 29f3f

This change makes Escape in the ignored-file search clear the query before closing the dialog. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Esc in the ignored-file search now clears the query without closing the Add to another machine dialog. It uses the conventional commit form and matches the objectives …
Description check Passed The description follows the template well. It has a clear problem statement with reproduction steps and environment. It explains the change and why the input uses type="text" with role="searchbox". It…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: Esc in the ignored-file search now clears the query without closing the Add to another machine dialog. It uses the conventional commit form and matches the objectives and the file summaries. It is 85 characters, a little long, but still clear.

Full details: Description check

Explanation

The description follows the template well. It has a clear problem statement with reproduction steps and environment. It explains the change and why the input uses type="text" with role="searchbox". It gives scope context by referencing related dialog searches, though it does not link a specific issue that shows the bug. Verification is detailed: a new browser test, guard-removal checks, the check:changed run, and before/after screenshots. It also names the agent and model. The Scope section lacks an issue link or a note on why none is needed, so the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4535ddc and 29f3fab.

Files selected for processing: 1

  • apps/web/src/components/AddProjectToMachineDialog.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 26, 2026
juliusmarminge and others added 2 commits November 26, 2026 15:04
…er searches

Base UI's dialog already ignores Escape during IME composition, so the
input only needs the shared guard used by the theme and model searches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Steps: Seed a synthetic repository with 250 ignored build files, tracked build/KEEP.md, and .env; pair a second server; open a new-thread draft → Run on → Add to another machine; select SSH and build/build-1.txt; search build-21; wait for filtered results; press Escape.

Environment for all captures: Chromium on Linux, light theme, 1440×1000, fresh isolated dev servers and synthetic state. Source host path hidden with capture-only CSS.

Proven: the scenario fails on base d78106d5cc and passes on head 29f3fabc88.

Before After
Commit d78106d5cc 29f3fabc88
Result Dialog absent after Escape; visibility assertion fails Search empty and focused; SSH and both selected files preserved
Before Escape Before: filtered search and clone setup After: same filtered search and clone setup
After Escape Before: dialog closed After: query cleared, focus and selections retained
Recording Base interaction Head interaction
Subsequent Escape After: subsequent Escape closes dialog

Recordings exclude pairing and play at one-third speed.

Scenario driver and synthetic seed

Not shown:

  • IME composition was not exercised with a real IME; the scenario uses ordinary browser keyboard input.
  • Held-Escape native key repeats were not exercised; the scenario sends separate Escape keypresses.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 26, 2026
@juliusmarminge
juliusmarminge merged commit 98f2a92 into pingdotgg:main Nov 26, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 26, 2026
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
… another machine (pingdotgg#43559)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 98f2a92)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants