Skip to content

Un-merge the stage top bar filter from the global command palette - #278

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-page-search
Aug 22, 2026
Merged

Un-merge the stage top bar filter from the global command palette#278
TheGreatAxios merged 3 commits into
mainfrom
cl-page-search

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

PR #246 replaced the top-bar magnifier's centered dialog with react-ui's CommandPaletteInline morphing out of the magnifier — a real fix, but it wired the magnifier straight into the global command palette. The owner has flagged this more than once (docs/DECISIONS.md → Search): the magnifier filters whatever page you're on; Cmd+K is the separate global palette. Neither should open the other.

  • StageSearch (the magnifier) is now a plain per-page filter: a page hands in its own value/onChange, and it morphs into a text input — it no longer touches the palette's open store at all.
  • StageTopBar renders it only when a page passes a filter prop, so a page with nothing to filter (Agents, Routines) shows no magnifier at all — no more controls that do nothing.
  • Files, Skills, and Plugins each already rendered their own filter input next to the (formerly global) magnifier. That duplicate is gone: the magnifier now drives each page's existing filter state directly, relabelled "Filter …" (never "Search …") so it never reads as a second search surface.
  • CommandPaletteProvider now renders react-ui's modal CommandPalette directly instead of handing data down through context to StageSearch, mounted once above AppShell in app.tsx. That also fixes Cmd+K being inert on a 404 — routeHasNoStageTopBar meant no StageTopBar (and so no palette) ever mounted for an unmatched route; the palette no longer depends on it.
  • Updated DESIGN.md → Search and docs/command-palette.md to describe the two separate surfaces.

Which pages now drive their existing filter from the magnifier: Files ("Filter files"), Skills ("Filter skills"), Plugins ("Filter plugins"/"Filter skills" by tab). Agents and Routines have no filter, so they show no magnifier.

Linear: CL-6565

Test plan

  • bun run typecheck (apps/web)
  • bunx eslint on every changed file
  • bun test ./src ./test (apps/web) — 833 pass, 0 fail
  • New stage-search-filter.test.tsx: typing in a page's filter never opens the global palette; Escape clears then collapses; a page with no filter renders no magnifier; 40px hit target intact
  • New global-command-palette.test.tsx: Cmd+K opens the palette from an ordinary route and from an unmatched one (404); route change closes it; result selection still navigates to the entity's own slug

The magnifier and Cmd+K were tested as one merged surface
(global-search-morph.test.tsx), matching the PR #246 behavior the owner
wants undone. Replaces it with two suites: one for the top-bar magnifier
as a per-page filter that never touches the palette's open store, and
one for Cmd+K as its own surface reachable from any route, including one
with no stage top bar. Updates plugins-page.test.tsx for the "Filter …"
labels replacing "Search …".
PR #246 replaced the magnifier's modal palette with an inline morph, but
in doing so wired the top-bar magnifier straight into the global command
palette — conflating "filter this page" with "search everywhere," which
the owner has now flagged more than once (docs/DECISIONS.md → Search).

StageSearch is now a plain per-page filter: it takes a page's own
value/onChange and morphs into a text input, never touching the palette's
open store. StageTopBar renders it only when a page passes a `filter`, so
a page with nothing to filter shows no magnifier at all.

CommandPaletteProvider now renders react-ui's modal `CommandPalette`
directly instead of handing data down to StageSearch through context, so
Cmd+K (and the existing context-menu item) work from any route, including
one that renders no stage top bar of its own — fixing the 404 dead end.

Files, Skills, and Plugins already rendered their own filter input next to
the magnifier; that duplicate is gone, and the magnifier now drives each
page's existing filter state directly (relabelled "Filter …", never
"Search …", so it never reads as a second search surface).
DESIGN.md's Search section and docs/command-palette.md described the
pre-fix state (one surface, two doors that resolve to the same UI).
Rewritten to match docs/DECISIONS.md: the magnifier filters the current
page, Cmd+K opens the global palette as its own surface, and neither
opens the other.
@TheGreatAxios
TheGreatAxios merged commit a91d10f into main Aug 22, 2026
5 checks passed
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.

1 participant