Skip to content

[FE-94] Wire the global command palette to the search API #1193

Description

@yusuftomilola

Overview

frontend/hooks/useCommandPalette.ts already exists but has no backend to query. With assets, users, departments, and locations all searchable, a palette is the fastest way to navigate.

Tasks

  • Wire the palette to the /search endpoint with debounced queries and React Query caching.
  • Group results by type (assets, users, departments, locations) with keyboard navigation and Enter to open.
  • Add quick actions ("New asset", "Import spreadsheet", "Go to reports").
  • Show recent searches and recently viewed assets when the query is empty.
  • Make it fully accessible: focus trap, aria-activedescendant, and screen-reader result announcements.
  • Add a full search results page for queries with many matches.

Acceptance Criteria

  • ⌘K / Ctrl+K opens the palette from any authenticated route.
  • Results appear as the user types without flooding the API.
  • The palette is fully keyboard-operable and screen-reader friendly.

Dependencies

Backend from [BE-105].

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions