Skip to content

Add searchable filtering to the settings navigator#40

Open
DragonnZhang wants to merge 2 commits into
mainfrom
loop/settings-search
Open

Add searchable filtering to the settings navigator#40
DragonnZhang wants to merge 2 commits into
mainfrom
loop/settings-search

Conversation

@DragonnZhang

Copy link
Copy Markdown
Collaborator

Closes #39

What & why

The settings navigator rendered a flat, unfilterable list of 16 sections
(General, Appearance, App, AI, Input, Shortcuts, Memory, MCP Servers, Hooks,
Extensions, Permissions, Labels, Messaging, Server, Workspace, Preferences).
Comparable desktop apps (Claude Code Desktop, VS Code, Codex desktop) all let
you search settings; OpenWork's session list, sources list, model picker and
tools list already have search, so settings was the conspicuous gap.

This adds a search box at the top of SettingsNavigator that filters sections
by title + description (case-insensitive substring), with:

  • the existing session-search styling (search icon, clear button, focus ring),
  • a "No results found" empty state,
  • Esc to clear.

Frontend-only — the navigator already holds all section metadata in the
renderer, so filtering is pure React state. No backend / qwen-code change.
Reuses the existing common.search and common.noResultsFound i18n keys, so
no locale strings are added or reordered.

Changes

  • SettingsNavigator.tsx — search box + client-side filter + empty state.
  • LeftSidebar.tsx — emit data-testid={link.id} on nav buttons so the
    Settings entry point is addressable from e2e (per the harness README's "add a
    data-testid in the same PR" guidance).
  • e2e/assertions/settings-search.assert.ts — new CDP assertion (below).
  • e2e/app.ts — harness robustness so more than one assertion can run
    headless: each launch gets its own profile dir (keyed on the unique debug
    port), and on headless Linux the app launches under setsid so teardown
    reaps the whole xvfb-run tree. Previously a lingering Electron instance held
    the single-instance lock and the second assertion's launch could never find a
    renderer target.

Verification (DoD)

  • bun run typecheck:all — ✅ passes.
  • bun test — no new failures vs. main (the repo has pre-existing, unrelated
    failures — e.g. BrowserCDP, BrowserPaneManager, i18n locale parity
    sorted checks; this change introduces none and touches none of them).
  • Electron build — ✅ (electron:build).
  • App boots — ✅ (app-boots assertion).
  • Feature CDP assertion — ✅ 2/2 passed:
🧪 Running 2 e2e assertion(s)
  • app boots and main window renders ... ✅ (2599ms)
  • settings navigator search filters sections ... ✅ (2924ms)
✅ 2/2 passed

The settings-search assertion drives the real built app over CDP: opens
Settings from the sidebar, types the first section's title and asserts the list
narrows to exactly the predicted matches (every visible row contains the query
and the list shrinks), types a no-match query and asserts the empty state with
zero rows, then clears and asserts the full list is restored.

🤖 Generated with Claude Code


Generated by Claude Code

The settings navigator rendered a flat, unfilterable list of 16 sections.
Add a search box at the top that filters sections by title and description
(case-insensitive substring), mirroring the existing session-list search
styling — search icon, clear button, focus ring, Esc-to-clear, and a
"No results found" empty state. This matches the searchable-settings
affordance in comparable desktop apps.

Implementation is frontend-only and reuses existing i18n keys
(common.search, common.noResultsFound), so no locale strings change.

Also:
- LeftSidebar: emit data-testid={link.id} on nav buttons so the settings
  entry point (and other nav items) are addressable from e2e.
- e2e/app.ts: give each launch its own profile dir (keyed on the debug
  port) and launch under setsid on headless Linux so teardown reaps the
  whole xvfb-run tree. Without this, a lingering Electron instance held
  the single-instance lock and the next assertion could never get a
  renderer target — which blocked running more than one CDP assertion.
- e2e/assertions/settings-search.assert.ts: drives the real app over CDP
  to verify the filter narrows, shows the empty state, and restores.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Searchable/filterable settings navigation

2 participants