Skip to content

fix(settings): ⌘K search tab-state/URL divergence + index gaps (closes #405) - #411

Merged
ruzin merged 3 commits into
mainfrom
fix/settings-search-405
Jul 24, 2026
Merged

fix(settings): ⌘K search tab-state/URL divergence + index gaps (closes #405)#411
ruzin merged 3 commits into
mainfrom
fix/settings-search-405

Conversation

@ruzin

@ruzin ruzin commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Closes #405 — follow-ups to the #399 settings ⌘K search.

Fixes

  1. Tab-state / URL divergence (main bug). The nav rail's onSelect={setTab} changed only local state, leaving ?tab= stale; a later ⌘K search that navigated to the stale tab hit router's unchanged-hash early-return and silently did nothing. Now the nav rail calls navigate('/settings?tab=<id>'), so the route is the single source of truth and the existing route→tab effect drives the visible tab. Deep-link/back and the transcriptionai alias unchanged.
  2. macOS-only entries on Windows. "Record system audio" and "Hide dock icon" are behind isMac in GeneralTab; the index now marks them macOnly and filters them out off macOS (reusing the same isMac from @/lib/utils) so they don't jump to a tab where the row is absent.
  3. Missing entries. Added Discord (About tab) and the menu-bar / system-tray control (General tab, with the platform-dependent label matching the rendered control).

Tests

Follow-up to @Vassista's #349#399.


Summary by cubic

Fixes the settings ⌘K search failing after a manual tab switch by making the URL the single source of truth for the active tab. Aligns the settings search index with platform-specific rows and adds missing items.

Written for commit 0ae9496. Summary will update on new commits.

Review in cubic

ruzin added 3 commits July 24, 2026 01:19
Nav-rail selection now navigates `/settings?tab=<id>` instead of calling
setTab directly, letting the existing route->tab effect drive the visible
tab. Previously a manual nav click left the URL's `?tab=` stale, so a later
⌘K search to that same tab bailed on router's unchanged-hash early-return
and silently did nothing (#405).
- Filter macOS-only settings ("Record system audio", "Hide dock icon")
  out of the search index off-mac, using the same `isMac` signal GeneralTab
  gates those rows on — they don't render on Windows/Linux.
- Add the missing "Discord" (AboutTab) and "Show in menu bar / system tray"
  (GeneralTab) entries, mirroring GeneralTab's platform-dependent label so the
  index title matches the rendered control (#405).
Adds the exact issue sequence (⌘K jump -> manual nav-rail switch -> ⌘K jump
back) asserting the visible tab actually switches, plus a drift guard that a
few index titles still match the labels their tabs render.
@ruzin
ruzin requested a review from Optic00 as a code owner July 24, 2026 00:20

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

You’re at about 92% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Re-trigger cubic

@ruzin
ruzin merged commit 619deb6 into main Jul 24, 2026
10 checks passed
@ruzin
ruzin deleted the fix/settings-search-405 branch July 24, 2026 00:35
ruzin pushed a commit that referenced this pull request Jul 24, 2026
Follow-up to #411: nav-rail clicks now push ?tab= entries onto the hash history, so browser Back can land on bare /settings - the route-sync effect previously ignored the absent param and left the old tab visible. Shares one tabFromRoute resolver between first-mount initialTab and the sync effect, and adds a T1 regression test.
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.

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

1 participant