Repository navigation
Description
Parent plan: #286.
User request and observed behavior
P2 small interaction improvement. The user supplied an ArcZip search screenshot with a trailing close button and requested the equivalent in Stow. A screenshot establishes the control's appearance; native ArcZip 1.2.1 (336) inspection additionally confirmed that opening Search exposes Close Search, and activating it collapses the field back to the Search icon. Query entry was Pro-gated, so nonempty-query behavior is not claimed as ArcZip evidence.
Stow main 33d533e, App/Browser/BrowserChrome.swift / ToolbarSearchField, currently renders Clear Search only for a nonempty query. It clears and refocuses the text field. Escape clears, releases the field and lets Browser collapse it; IME composition is explicitly protected. The user wants a visible way to close search even while empty.
Functional contract
- While search is expanded, expose an always-available, meaningfully named Close Search / 关闭搜索 action. It ends search, clears the active query/filter, collapses to the Search icon and returns keyboard focus to the file view in one action. Do not leave an invisible active filter.
- Preserve a separate Clear Search action if retained by the design: clear text while keeping search open and focused. Do not have one unlabeled × silently alternate meanings. Claude Code may choose compact placement, but Close must remain reachable in empty and nonempty states.
- Reuse the existing focus-release and query-change paths, cancel pending focus requests and prevent the surrounding capsule tap gesture from immediately reopening/refocusing search when its close control is clicked.
- Retain Command-F reopen, Escape semantics and the IME guard (Escape cancels composition before closing search). Explicit close during composition must not commit half-composed text as a query or leave a late query update after close.
- Clearing/closing stops or invalidates obsolete search result publication and restores the current folder/view mode without changing the archive or discarding staged edits. Preserve safe selection/Details consistency and no automatic opening of omitted encrypted/nested archives.
- Preserve the current trailing-toolbar order and leftward search expansion; view/delete/save controls stay stable. Respect immediate keyboard actions and reduced motion/display preferences. No mockup-fidelity requirement.
Acceptance and ownership
Codex / Grok Bot owns close/clear/focus semantics, race tests and a functional control. Claude Code owns button treatment/placement and collapse motion. Verify empty/query/no-result/indexing states, Grid/List/Columns, clicked close with focus inside/outside search, repeated Command-F/close, late search completion, keyboard activation, Pinyin/Kana composition, small windows and English/zh-Hans. A Close label with only a clear-text implementation does not satisfy this issue. Follow-up to #242/#215, not a replacement toolbar redesign.
Ownership and delivery
Codex / Grok Bot owns functional state, routing, security, cancellation, errors, tests and accessibility semantics. Claude Code owns layout, hierarchy, copy presentation, materials and motion. Functional controls may be implemented before visual review. No collaborator session or visual approval is claimed; no unknown GitHub account is assigned. Preserve basic keyboard/focus access, meaningful names, Reduce Motion/Transparency and Increase Contrast; dedicated VoiceOver acceptance remains deferred under #93. Every new user-facing string needs zh-Hans. Run relevant tests, localization and generated-plist checks for implementation; coordinate installed/registered signed artifacts with the existing release owner (#32/#38).
Dependencies and integration
Independent small change, preserving #242 layout and #215 keyboard/search semantics. Claude Code visual review is linked through #104.
Activity
skyswordw commentedon Nov 5, 2026
PR #295 adds an explicit Close Search alongside the distinct Clear behavior. Close clears/collapses/releases focus, pending refocus is cancelled, and the background gesture no longer intercepts the close button. The text field is explicitly named Search. Native checks confirmed no-result filtering→Close→restored files, arrow-key file selection and Command-F reopening. IME composition/system-display coverage remains unverified. Claude Code owns final control treatment and motion.
Implementation: #295
Functional handoff: https://github.com/Beastry/stow/blob/codex/tray-functional-followups/Handoff/286-functional-followups.md
skyswordw commentedon Nov 5, 2026
Claude Code visual treatment: #298 (stacked on #295).
Still unverified natively: hover/press feedback, a clicked Close in the running app, IME composition and Increase Contrast. This is not VoiceOver testing (#93). Leaving the issue open for the functional owner's acceptance.
Merge pull request #298 from Beastry/claude/294-search-close-design
skyswordw commentedon Nov 6, 2026
Delivered by #295 and #298. Clear and Close have separate labels and controls. In the integrated running app, Command-F opened Search; Clear removed a no-result query while retaining Search focus; Close on a nonempty query cleared the filter, collapsed the field and restored arrow-key selection. The Search snapshot was inspected and existing search/focus tests passed. Closing the explicit Close Search implementation. Actual Pinyin/Kana composition and the complete view-mode/system-display matrix remain explicitly tracked in #38; this does not claim those native checks passed.
Validation for the integrated #295–#300 tree: 687 tests in 102 suites passed, zero failures/skips; localization export found 0/1,261 missing zh-Hans strings; generated plists are unchanged. Codex reviewed functional state/routing/security; Claude Code owns the visual/motion work in the linked design PRs. Native checks below used an isolated ad-hoc bundle without Finder/Quick Look plugins and are CUA/AX evidence, not VoiceOver testing. Signed/system-wide acceptance remains in #38/#32; #93 remains deferred and open.