# UJ-102 Look up customer account

Audience: AI coding agents first.

- Actor + entry point: Authenticated staff operator; `/users` (`admin-panel/src/App.tsx:153-155`).
- Priority: MUST-HAVE.
- Preconditions: Create customer through `POST /v1/auth/register`; do not seed DB.
- Test layer: L3.

## Steps

1. Open `/users` → `Users`, search field `Search by email...`, and customer rows render (`admin-panel/src/pages/UsersPage.tsx:130-166`).
2. Enter exact email → only matching row remains (`admin-panel/src/pages/UsersPage.tsx:61-63`).
3. Activate `View Details` → `/users/{id}` renders exact email and `User ID` (`admin-panel/src/pages/UsersPage.tsx:111-124`, `admin-panel/src/pages/UserDetailPage.tsx:154-167`).

## Failure branches

- Auth failure → redirect to `/login`; no account data disclosed.
- Rate limit `429` → visible retry/backoff state required; old panel silently empties list, which new dashboard MUST NOT copy (`admin-panel/src/pages/UsersPage.tsx:45-57`).
- Missing account → `No users found` or `User not found` renders (`admin-panel/src/pages/UsersPage.tsx:159-166`, `admin-panel/src/pages/UserDetailPage.tsx:143-149`).

## Backend touchpoints

`GET /v1/admin/users`; `GET /v1/admin/users/{userId}`.

