Files
nuzlocke-tracker/.beans/nuzlocke-tracker-mmre--admin-global-search-bar.md
2026-03-22 08:56:06 +01:00

1.5 KiB

title, status, type, priority, created_at, updated_at, parent
title status type priority created_at updated_at parent
Admin global search bar draft feature normal 2026-03-21T21:59:20Z 2026-03-21T22:04:08Z nuzlocke-tracker-9i9m

Add a search bar to the admin layout header that searches across all admin entities (games, routes, encounters, pokemon, evolutions, runs) and lets you jump directly to the relevant page.

Approach

  • Add a search input to AdminLayout.tsx above the nav
  • Use a debounced search that queries multiple endpoints (or a single backend search endpoint)
  • Show results in a dropdown grouped by entity type (Games, Routes, Encounters, Pokemon, Runs)
  • Each result links directly to the relevant admin page (e.g., clicking a route goes to /admin/games/:gameId/routes/:routeId)
  • Keyboard shortcut (Cmd/Ctrl+K) to focus the search bar

Files to modify

  • frontend/src/components/admin/AdminLayout.tsx — Add search bar UI
  • frontend/src/components/admin/AdminSearchBar.tsx — New component
  • frontend/src/hooks/useAdminSearch.ts — New hook for search logic
  • backend/src/app/api/search.py — New unified search endpoint (required — client-side search across 5+ entity types is too slow)

Checklist

  • Search bar component with debounced input
  • Search across games, routes, encounters, pokemon, runs
  • Results dropdown grouped by entity type
  • Click result navigates to correct admin page
  • Keyboard shortcut (Cmd/Ctrl+K) to focus
  • Empty state and loading state