[PR #83] Adding a Customer List Screen to the Admin Web
- What changed: A customer list screen was added to the admin web. It shows customer status, roles, the modules in use, invite status, and the last login.
- Decision: The search term, tabs, site, and page are kept in the address. So the same conditions stay after a refresh or going back.
- Not verified: Whether the CSV download works against the real server was not checked by these tests.
What and why
I requested this work. Implementation was done by a separate worker. Some of the tests for the customer list were written in a cloud session. Claude gathered the pieces and filled in the PR description.
The list screen was added so admins can check customer status, roles by site, modules in use, invite status, and last login in one list.
- The search term is sent to the server exactly as typed, including spaces and hyphens.
- Phone numbers are shown masked.
- An empty state, a no-results state, an error state, and a state where this page has no items are each shown differently.
- The CSV link points to a server download that uses the current conditions.
- The customer registration and detail screens are not built yet. The register button and the name link only point to their future addresses.
Chosen approach and rejected alternatives
| Topic | Chosen | Reason |
|---|---|---|
| Filter state | Kept in the address; changing a tab, site, or search goes back to page 1 | The same conditions survive a refresh and going back |
| Error response | Search and filter controls stay on screen, with a retry message in the result area | The conditions are not lost, so the user can query again |
| Register and detail | Register button and name link point only to their future addresses | They are follow-up work, so no separate page or package was added |
How it was checked
| Check | Result |
|---|---|
| Shared package build, type check, and lint (code rule check) | Passed |
| Customer list tests | 11 passed |
| Admin web tests in full | 41 passed |
| Remote check (CI) | Passed |
| General review | No blocking problem; two low-level findings and three notes |
| Server tests that use a database | Not verified (not run in this scope) |
| CSV download in real use | Not verified (not called in the unit tests) |
The general review was done by a different model that read only the source. One low-level finding was that the register button points to an address that does not exist yet and shows a blank screen. It was written in the PR description.
Lessons
- If the conditions are kept in the address, the same list can be seen again after a refresh or going back.
- If the search screen is not cleared when an error happens, users do not have to type their conditions again.
- A button that points to a screen that does not exist yet shows a blank page. Until that screen exists, fix the address in advance and note it in the PR description.