deckhearth/pages
varutasu e6e778080a
feat(design-system): redesign v2 #3 — TopSearchBar + Cmd+K + sweep page-header-glass (#105)
Sub-convoy #3 from .convoys/redesign-v2-from-mockups.md (umbrella
§ 7.3 — locked: sweep to ALL authenticated pages this convoy).

What ships:

- components/ui/TopSearchBar.js — the top horizontal chrome strip
  from the mockup. Layout: prominent search input on left (with
  magnifier icon + Cmd+K/Ctrl+K hint pill that adapts to platform)
  + notification bell with red badge (hidden when count=0) + mail
  icon + compact user-menu chip (gradient-tile avatar + display name
  + chevron). Avatar reads user.username with a fallback initial.
  Renders null for unauthenticated visitors (public marketing pages
  use their own header).

- components/ui/CommandPaletteModal.js — the surface that opens on
  ⌘K / Ctrl+K. Single search input, auto-focused. Enter submits to
  /cards?q=<query>. 3 quick-action buttons (Dashboard / Cards /
  Scanner) below the input. Eschews live-result preview, recent-
  search storage, and federated-search ranking; those are deferred
  to a follow-up convoy per umbrella § 7.2.

- components/Layout.js: TopSearchBar mounted in the main-content
  column ABOVE <main> for authenticated users (drops the legacy
  showSearch prop dependency — the prop stays for back-compat but
  no longer drives the header's visibility). Global keydown listener
  attached at Layout scope, toggles the CommandPaletteModal on
  ⌘K/Ctrl+K (preventDefault on the shortcut so the browser's native
  bookmark/search shortcut doesn't fire). The legacy <header>
  block that rendered an inline search input is removed; that
  surface is replaced by TopSearchBar + CommandPaletteModal.

- page-header-glass call-site sweep (umbrella § 7.3 contract:
  "no call site references it after this convoy"):
  - pages/dashboard.js
  - pages/my-cards.js
  - pages/community/collections.js
  - components/CollectionsPageView.js
  - components/CollectionPageView.js
  - components/CardsPageView.js
  Each `page-header-glass p-4 sm:p-6` is replaced with plain content
  padding (`px-4 sm:px-6 pt-6 pb-2`). Page titles + actions stay
  exactly where they were inside the content area; the glass chrome
  that previously framed them is now provided by TopSearchBar above.
  The .page-header-glass utility class stays in styles/globals.css
  (a downstream sweep convoy can remove it once the unused-CSS lint
  catches it).

- components/ui/index.js: barrel export updated with TopSearchBar +
  CommandPaletteModal.

Lint fix:
- CommandPaletteModal initially used useEffect(setQuery(''), [open])
  to reset the input on open; that hits the react-hooks/set-state-
  in-effect rule (we added the rule in fix-auth-bypass Brief 5). Use
  the "during render with previous-state tracking" pattern that
  NavigationContent uses (lines 168-178 of components/Layout.js)
  for the same purpose. No useEffect required.

Tests:
- npm run test:run: 113/113 (was 110; +3 new — implicit Layout
  tree-render coverage of the new TopSearchBar mount paths).
- npm run lint: clean (1 pre-existing unused-disable warning).
- npm run build: green.

Next: sub-convoy #6 (card-grid outer-glow), #7 (dashboard layout
rebuild), #8 (right-rail Card Spotlight).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 11:14:50 -05:00
..
admin feat(design-system): sweep authenticated body-content panels to glass (#97) 2026-06-03 21:28:52 -05:00
api refactor(auth): add withAdmin() wrapper for admin API routes. (#68) 2026-06-02 12:42:22 -05:00
card feat(design-system): finish Liquid Glass — close all remaining sub-convoys (#96) 2026-06-03 20:34:06 -05:00
collection refactor(collection): useCollectionView + view (Brief 3) (#88) 2026-06-03 17:10:20 -05:00
community feat(design-system): redesign v2 #3 — TopSearchBar + Cmd+K + sweep page-header-glass (#105) 2026-06-04 11:14:50 -05:00
deck fix(lint): clear ESLint baseline in pages/ (#62) 2026-06-02 01:03:39 -05:00
invite feat(design-system): finish Liquid Glass — close all remaining sub-convoys (#96) 2026-06-03 20:34:06 -05:00
_app.js refactor(auth): collapse lib/auth-context.js + lib/admin-auth.js onto lib/use-auth.js (#31) 2026-05-26 22:58:08 -05:00
cards.js Extract AuthenticatedCards into hook + view (cards Brief 3). (#79) 2026-06-03 12:49:25 -05:00
collections.js refactor(collections): useCollectionsPage + view (Brief 3) (#87) 2026-06-03 17:10:17 -05:00
dashboard.js feat(design-system): redesign v2 #3 — TopSearchBar + Cmd+K + sweep page-header-glass (#105) 2026-06-04 11:14:50 -05:00
deck-builder.js refactor(deck-builder): useDeckBuilder + DeckBuilderView (Brief 3) (#93) 2026-06-03 18:18:28 -05:00
decks.js feat(design-system): finish Liquid Glass — close all remaining sub-convoys (#96) 2026-06-03 20:34:06 -05:00
index.js feat(design-system): finish Liquid Glass — close all remaining sub-convoys (#96) 2026-06-03 20:34:06 -05:00
login.js feat(design-system): Liquid Glass redesign portfolio — foundation + primitives + Layout (#95) 2026-06-03 20:12:33 -05:00
logout.js 🎨 Restructured Layout System 2025-07-25 11:28:04 -05:00
my-cards.js feat(design-system): redesign v2 #3 — TopSearchBar + Cmd+K + sweep page-header-glass (#105) 2026-06-04 11:14:50 -05:00
profile.js fix(lint): clear ESLint baseline in pages/ (#62) 2026-06-02 01:03:39 -05:00
scanner.js refactor(scanner): extract ScannerPageView component (page Brief 3) (#76) 2026-06-02 21:56:34 -05:00
settings.js feat(design-system): sweep authenticated body-content panels to glass (#97) 2026-06-03 21:28:52 -05:00
signup.js feat(design-system): Liquid Glass redesign portfolio — foundation + primitives + Layout (#95) 2026-06-03 20:12:33 -05:00