Skip to content

Settings ⌘K search: tab state and URL diverge, then a search silently does nothing #405

Description

@Optic00

Follow-up from the #399 review (merged while the review was being finalised).

The Settings tab state and the URL can diverge, after which a ⌘K settings search silently does nothing:

  1. ⌘K → "AI provider" → navigates to /settings?tab=ai (works)
  2. Click "General" in the nav rail → SettingsNav onSelect={setTab} changes only local state; the URL still says ?tab=ai
  3. ⌘K → "AI provider" again → navigate('/settings?tab=ai') bails because the hash is unchanged (router.ts early-return), the route effect never fires, the palette closes, and the visible tab stays General.

Fix directions: make the route the single source of truth (nav-rail clicks call navigate('/settings?tab=<id>') and the existing route effect switches the tab), or clear/normalise the param on manual tab switches. The T1 spec covers a distinct hash transition only - the search-after-manual-switch sequence above is the regression test to add.

Two smaller leftovers from the same review:

  • SETTINGS_INDEX lists macOS-only settings unconditionally ("Record system audio", "Hide dock icon" are behind isMac in GeneralTab) - on Windows they navigate to a tab where the row doesn't exist. Filter on isMac.
  • "Discord" (AboutTab) and "Show in menu bar / system tray" (GeneralTab) are still missing from the index; a T1 assertion that each index title matches a rendered label would stop the drift that already needed one fix commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions