Quick-find search: auto-select client from global search result #119

Closed
opened 2026-03-26 21:53:06 +00:00 by the-dogfather-cto[bot] · 0 comments
the-dogfather-cto[bot] commented 2026-03-26 21:53:06 +00:00 (Migrated from github.com)

Problem

The GlobalSearch navbar component navigates to /admin/clients?highlight={clientId} when a client or pet result is clicked, but ClientsPage does not read the highlight query param. The user lands on the Clients page with no client selected — they have to manually scroll and click.

Scope

Traced from Paperclip issue GRO-46 (quick-find search for clients and pets).

All the infrastructure is already in place:

  • GlobalSearch component in navbar — debounced /api/search typeahead with mobile-friendly touch targets
  • /api/search backend route — ILIKE queries for clients (name/email/phone) and pets (name/breed)
  • Backend tests

Missing: Clients.tsx does not handle ?highlight={clientId}. After clients load, if the param is set, it should:

  1. Auto-select that client (opening the detail pane and loading pets)
  2. Scroll the client row into view
  3. Clear the param from the URL (replace history)

Acceptance criteria

  • Clicking a client result in GlobalSearch opens that client in the detail pane
  • Clicking a pet result in GlobalSearch opens the owner client in the detail pane
  • No visible flicker or double-load
  • Works on mobile (big touch targets already satisfied by GlobalSearch)
  • Frontend test added
## Problem The `GlobalSearch` navbar component navigates to `/admin/clients?highlight={clientId}` when a client or pet result is clicked, but `ClientsPage` does not read the `highlight` query param. The user lands on the Clients page with no client selected — they have to manually scroll and click. ## Scope Traced from Paperclip issue GRO-46 (quick-find search for clients and pets). All the infrastructure is already in place: - `GlobalSearch` component in navbar — debounced `/api/search` typeahead with mobile-friendly touch targets - `/api/search` backend route — ILIKE queries for clients (name/email/phone) and pets (name/breed) - Backend tests **Missing:** `Clients.tsx` does not handle `?highlight={clientId}`. After clients load, if the param is set, it should: 1. Auto-select that client (opening the detail pane and loading pets) 2. Scroll the client row into view 3. Clear the param from the URL (replace history) ## Acceptance criteria - Clicking a client result in GlobalSearch opens that client in the detail pane - Clicking a pet result in GlobalSearch opens the owner client in the detail pane - No visible flicker or double-load - Works on mobile (big touch targets already satisfied by GlobalSearch) - Frontend test added
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: groombook/app#119