Skip to content

feat: sidebar instance filter with / shortcut#11

Open
Teamingzooper wants to merge 1 commit into
feat/instance-hibernatefrom
feat/sidebar-search
Open

feat: sidebar instance filter with / shortcut#11
Teamingzooper wants to merge 1 commit into
feat/instance-hibernatefrom
feat/sidebar-search

Conversation

@Teamingzooper

Copy link
Copy Markdown
Owner

Summary

Adds a text input at the top of the sidebar that filters visible instances by substring match against the instance name. Particularly useful for users with 8+ instances where scanning the sidebar gets slow.

Branch base: `feat/instance-hibernate` — sixth in the stack. Merge order: #6#7#8#9#10 → this.

UX

  • `/` key focuses the filter from anywhere in the app (skipped when typing in another input, textarea, or contenteditable so it doesn't steal slashes mid-sentence).
  • `Esc` in the filter clears the text; if already empty, blurs the input.
  • `Enter` activates the first matching instance and blurs the input.
  • `×` clear button appears when there's text.
  • Filter is hidden in compact-sidebar mode (sidebar is too narrow to render it usefully).

Filter semantics

  • Match is substring, case-insensitive, on `instance.name`.
  • While a filter is active, groups with no matching instances are hidden — so the user sees only the matches.
  • When the filter is empty, all groups stay visible — including empty ones, so the "Drop an instance here" affordance for new groups still works.

Implementation

Purely renderer-side. Local React state in `Sidebar.tsx`, no store changes, no IPC, no main-process changes, no schema additions.

Test plan

  • `npm run typecheck` — clean
  • `npm run test` — 178/178 passing
  • `npm run build` — renderer + main both clean
  • Manual smoke: with several instances open, press `/` → filter focuses. Type a few characters → instance list shrinks to matches. Hit Enter → first match activates. Hit `/` again → refocuses with current text selected. Type "xx" (no matches) → all groups hide, no instances show.
  • Manual smoke: try `/` while typing in a rename input or in the embedded Gmail webview — it should NOT steal focus.

🤖 Generated with Claude Code

Adds a text input at the top of the sidebar that filters visible
instances by substring match against the instance name
(case-insensitive). Particularly useful for users with 8+ instances
where scanning the sidebar gets slow.

- Global "/" key focuses the filter (skipped while typing in another
  input/textarea/contenteditable so it doesn't steal mid-sentence).
- Esc in the filter clears the text; if already empty, blurs the
  input.
- Enter activates the first matching instance and blurs the input.
- "×" clear button appears when there's text.
- Groups with no matching instances are hidden while a filter is
  active (so the user sees only what they searched for); when the
  filter is empty, empty groups stay visible so the
  "Drop an instance here" affordance still works.
- The filter input is hidden in compact-sidebar mode (sidebar is
  too narrow to render it usefully there).

Purely renderer-side — no IPC, no main-process changes, no schema
additions. 178/178 tests still pass, typecheck + build clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants