[PR #86] Adding a Customer Detail Screen to the Admin Web
- What changed: A customer detail screen was built. It has basic information, action buttons that change with the customer’s status, and a module permission tab. Edits for name, admin note, and mobile number, and a flow to remove an external sign-in method, were added.
- Decision: Basic information uses the assigned module values in the detail response, and only the module tab sends its own request. The aim is that a failed tab does not turn the whole screen into an error. The code, connected devices, and change history tabs are placeholders for now.
- Not verified: How the screen looks in a real browser has not been checked. The log records CI (automatic checks) as passing, but I did not check the final result on the PR myself.
What and why
I requested this work. Clicking a customer in the customer list opens the detail screen.
- There is a basic information area and action buttons that change with the customer’s status.
- The module permission tab requests modules only when the tab opens. Even if the tab fails, the basic information stays visible.
- Name and admin note, mobile number changes, and removal of an external sign-in method were added. Before a change, the reason and an identity confirmation input are checked.
- After a phone number change, the detail information is reloaded. Removing an external sign-in method asks for one more confirmation.
- Each kind of error returned by the server shows its own message.
- Dates use the four-digit year that the tests required. This differs from the short format in the plan.
Chosen approach and rejected alternatives
| Choice | Approach | Reason |
|---|---|---|
| Chosen | Basic information uses the assigned module values in the detail response | So basic information stays even if the tab request fails |
| Chosen | Only the module tab requests modules separately | Keeps its errors inside the tab |
| Chosen | Code, connected devices, and change history tabs are placeholders | Outside the scope of this change |
How it was checked
- After the change,
npm run verifypassed in full: 66 admin web tests, 412 server tests, and type check and lint included. A cloud session (Claude Sonnet 5.5) ran this check. - At first, 10 detail screen tests failed. The test environment had no dialog support. A stand-in implementation was added to the test setup file so the tests could pass. Since this stand-in was outside the implementation’s scope, it was raised as an item for the owner to confirm.
- Implementation was done by Fizz (GPT-6 Luna). Tests and review fixes were done by a cloud session (Claude Sonnet 5.5), so the implementer did not write their own tests.
- The review was done by Honey (model not confirmed). Pollen did not respond, so Honey was used instead. No blocking problem was found.
- Two review findings were fixed: the existing screen stays when reloading fails, and input in the edit window is not cleared by a reload.
Lessons
- Separating whether a failure comes from the environment or from the code first keeps the fix in the right place.
- Splitting detail screen errors by tab keeps one failing part from breaking the whole screen.