[PR #271·275·280·282·284·287] Turning the Save-Screen Gaps Review Found One at a Time into a Checklist: Six Admin Web Screens
Six admin web screens for Detail 4 (quests, routines, head office review) were built one after another in a single day: issue report review (PR 271), routines (PR 275), viewing and approving quest list versions (PR 280), editing drafts (PR 282), moving a cycle to a new version (PR 284), and sending head office quests (PR 287). The server requests didn’t exist yet, so all of them were built first against mock responses (MSW, server answers set in advance by the tests).
The thread of this post is less the screens than the save flow. The first screen went through four rounds of review, and each round turned up one more gap in the save screen. Those gaps were gathered into a checklist and put into the first version of the next task brief (the document handed over when implementation is assigned), and the list grew by a line with each task.
All six PRs worked the same way. A Claude Code session on my Windows computer (Claude Opus 5.5, the lead session for the admin web track) handled the briefs, tests, verification, docs, and PRs, and Codex (gpt-6.1-terra) wrote the code. The final review was done by this session and codex exec review (Codex’s code review).
- PR 271: Codex wrote it in four rounds (reasoning medium in rounds 1 and 3, low in 2 and 4). Four reviews.
- PR 275: Codex wrote it in two rounds (medium, then low). Two reviews.
- PR 280: Codex wrote it in three rounds (medium, then low twice). Three reviews.
- PR 282: Codex wrote it in two rounds (medium, then low). Two reviews.
- PR 284: Codex wrote it in two rounds (medium). Two reviews.
- PR 287: Codex wrote it in two rounds (medium). Two reviews.
In every PR, Claude committed the tests first and confirmed they failed before implementation. Codex couldn’t start the test runner (vitest) in its own clone, so Claude ran the tests in the work folder.
| PR | What was done | Who wrote it | Result |
|---|---|---|---|
| 271 | Issue report review screen | Claude (tests), Codex (implementation) | 35 related tests passed; four reviews |
| 275 | Routines screen | Claude (tests), Codex (implementation) | 35 related tests passed; two reviews |
| 280 | Viewing and approving quest list versions | Claude (tests), Codex (implementation) | 34 related tests passed; three reviews |
| 282 | Editing drafts | Claude (tests), Codex (implementation) | 16 tests failed first, then 41 passed; two reviews |
| 284 | Moving a cycle to a new version | Claude (tests), Codex (implementation) | 13 tests failed first, then 58 passed; two reviews |
| 287 | Sending head office quests | Claude (tests), Codex (implementation) | 89 admin web tests passed; two reviews |
PR 271: Issue report review, four reviews
What was done and why
When a customer picks “abnormal” in a routine or quest, that task becomes “head office checking.” This screen lets head office gather those reports and judge them one by one. The four admin web menus (tasks to review, routines, quest lists, head office quests) were added at the same time.
- Tasks to review: Filter by site, module, and type, with the filters kept in the address. The longest-waiting come first, and rows over 24 hours get red text plus the words “over 24 hours,” so the difference isn’t shown by color alone.
- Reviewing: See the task text, the customer’s result for each check item, the customer’s note, and the history, then choose “checked” or “ask to recheck” and save. Above the fields it says “visible to the customer” or “head office only.”
What was chosen, and what was dropped
| Chosen | Dropped alternative | Why it was dropped |
|---|---|---|
| Don’t refetch the detail on window focus or reconnect | Remember the first rev read and allow refetching | If a refetch changes the state, the fields still disappear |
- If the history is missing, judging is locked. So no one judges without seeing the history, it shows “Couldn’t load the history” and a retry.
- If another admin handled it first, the written answer isn’t cleared. It shows “Another admin already handled this” and the current state the server returned. It doesn’t refetch automatically, because refetching would clear the fields and the written answer.
- Review round 2: no silent refetch when the window regains focus. The tool that manages screen data (React Query) refetches details in the background when the window regains focus or the connection comes back. Then an answer written against an old report could go out with a new rev (data revision number) and be accepted without a conflict, or the field being typed in could disappear. So details are no longer refetched at those moments. Following the brief, Codex also turned off “refetch when the screen opens,” but then reopening the same task within a few minutes showed old values, so Claude reverted just that one line.
- Dropped alternative — remember the first rev read and allow refetching: if a refetch changes the state, the fields still disappear.
- Review round 3: old values on a reopened screen. Reopening the same task within a few minutes showed remembered old values first, and while fresh data loaded in the background, an answer could be written against the old rev. Details are now forgotten when the screen closes, and the answer field, choice, and save are locked while loading.
- Review round 4: two more locks. When the history is missing, the answer field is locked too (so an old answer doesn’t attach to a new rev after a retry), and while saving, the choice and answer field are locked (so text edited after sending doesn’t stay on screen when it never reached the customer).
- One small point from round 4 (leaving for another screen during a save pulls you back to the list when the save finishes) wasn’t fixed in this PR and was carried into the next task brief.
How it was checked
- 35 related tests passed; admin web type check and lint (code rule checks) passed.
- Full
npm run verifypassed in 397 s;npm run e2epassed 10 tests. codex exec reviewfour times: round 1 found saving with a different rev on window focus, round 2 old values on a reopened task, round 3 two lock gaps, and round 4 leaving during a save.- In the first full verify, one test that counts menu links failed. It was Claude’s mistake — updating the menu tests but missing the test in another file — and only the test was fixed.
PR 275: Routines, two reviews with the checklist up front
What was done and why
A screen for head office to view and edit routines (recurring tasks shown to customers daily, on certain weekdays, or every other week). The list shows the name, schedule text (“daily,” “Mon·Thu,” “every other week (from Dec 7)”), unit, and whether it’s in use. The edit screen changes the name, check items (up to 10), schedule, unit, twice-a-day option, in-use flag, and reason. It carries the note “Tasks already created stay as they are; changes apply from the next tasks created.”
What was chosen, and what was dropped
- The save flow learned in PR 271 went into the brief from the start: fields can’t be used until this visit’s values arrive, no silent refetch on window focus or reconnect, every field locked while saving, and leaving during a save doesn’t pull you back to the list when it finishes. This round of review raised no points of this kind.
- If another admin changed it first, “latest values” and “your values” are shown side by side, with no automatic refetch.
- Review round 2: Fixed sending response-only fields to the server when editing, and the save button staying locked after a failed save. Claude’s tests had already caught both. The lock while saving was switched to the built-in HTML feature that locks a whole group of fields (
<fieldset disabled>). - That made a test that checked each field’s
disabledattribute no longer fit: when a group is locked, each field’s attribute stays the same and it’s only locked in effect. Since the brief allowed this approach, the test was changed to check whether the field is actually locked.
How it was checked
- 35 related tests passed; full
npm run verifypassed in 405 s;npm run e2epassed 10 tests. codex exec review: the two points from round 1 were fixed in round 2, and round 2 found nothing.
PR 280: Quest list versions, two more lines on the checklist
What was done and why
A screen for head office to view quest list versions (draft / approved / past), approve a draft, and see cycle warnings. Above the list are three warnings (cycles with no approved version, tasks that can’t be created because there’s no planned end date, and quests not created because the date isn’t pinned yet). The version screen shows the item table, and a draft can be approved with a reason. If it can’t be approved, the problems the server returned are listed with their items.
What was chosen, and what was dropped
| Chosen | Dropped alternative | Why it was dropped |
|---|---|---|
| Add a problem-list field to the error and use the shared request function | Skip the shared request function and request directly (first implementation) | The new-tab sign-in prompt did not appear when the login expired |
- If cycle warnings fail to load, they aren’t silently left empty. It shows “Couldn’t load cycle warnings” and a retry, because the spec says hiding “no approved version” is a critical gap.
- If the version arrives but its items are missing, approval is locked.
- Review round 2: use the shared request function. To receive the server’s problem list, the first implementation skipped the shared request function and made the request directly, because the brief didn’t allow changing the shared function’s file. As a result, the new-tab login notice that should appear when a login expires didn’t show. A problem-list field was added to the error so the shared function could be used. The reason field is also locked while approving.
- Review round 3: don’t pull users along after they leave, and keep written values when a refetch fails. If you leave while a new draft is being created, you aren’t pulled to the new version’s screen when it finishes. It’s the same rule as the routine screen, but it was left out of this brief. If a background refetch of the list fails, the list already shown, the open dialog, and written values stay as they are.
- Two small points from round 3 (after an approval conflict, a failed refetch hides the notice; reopening the approval dialog keeps the old reason and error) were carried into the next task, which works on the same screen.
How it was checked
- 34 related tests passed; full
npm run verifypassed in 472 s;npm run e2epassed 10 tests. codex exec reviewthree times: the two points from round 1 and the two from round 2 were each fixed in the following round.
PR 282: Editing drafts — “Is the value on screen after saving the value that was saved?”
What was done and why
A screen for head office to edit quest items in a draft version directly in the admin web. Pressing “Edit” on a draft screen opens an editor in place of the item table; items can be changed, reordered, removed, and added, then saved all at once with a label and reason. Things like duplicate codes and empty titles are blocked on screen in advance, with text saying what to fix. The two approval-dialog points carried over from PR 280 were on the same screen, so they were fixed too.
What was chosen, and what was dropped
| Chosen | Dropped alternative | Why it was dropped |
|---|---|---|
| Swap the editor in for the table on the same screen | Give the editor its own address | Anyone could open the editor for an approved version by address, so more blocking code is needed |
| Put the values the server returned straight onto the screen after saving | Rely only on the refetch | If the refetch fails, the old values stay, and saving again overwrites what was just saved |
- The editor swaps in for the table on the same screen instead of being its own screen. A separate address would let someone open the editor for an approved version just by URL, which needs more blocking code.
- The “Approve” button is hidden while editing. This prevents approving while unsaved values differ from what’s on screen.
- If a response is missing its items, “Edit” is locked. Opening the editor with an empty list and saving would lose every item.
- After saving, the values the server returned go straight onto the screen. The first implementation only waited for a refetch; if that failed, the old values stayed, and editing and saving again would overwrite what had just been saved. Relying only on the refetch was dropped.
- If a refetch fails, the screen, editor, and approval dialog already shown aren’t cleared. A full-screen error appears only when the first load fails.
How it was checked
- 17 tests were committed first, and 16 failed (the one saying an approved version has no “Edit” passed from the start).
- After Codex’s round 1, 40 tests passed. Claude read the code, and
codex exec reviewfound the same point (old values after saving). One test was added and Codex’s round 2 fixed it — 41 passed, and round 2 of review found nothing. - Full
npm run verifypassed in 457 s;npm run e2epassed 10 tests.
PR 284: Moving a cycle to a new version — mock servers and focus
What was done and why
Even when a new quest list version is approved, a cycle in progress keeps the version it was first pinned to. The “Move to the new version” button is for when head office says a cycle in progress should change right away. In a dialog you see preview numbers (items that change, new ones, ones that will no longer be created, ones already created), write a reason, and move it. The server doesn’t touch tasks already created.
What was chosen, and what was dropped
| Chosen | Dropped alternative | Why it was dropped |
|---|---|---|
| Put the button inside the cycle warning area | Build a separate cycle table | The warning area already shows cycle rows, and a cycle to move is something to look at, so the same spot fits |
| Send the version the preview reported | Send the “approved version” the screen knows | If another version is approved while the window is open, the move could go to a version other than the numbers the user saw |
- The button lives in the cycle warning area. No separate cycle table was made. The warning area already shows cycle rows, and a cycle to move is “something to look at,” so the same place fits.
- Cycles with no pinned version have no button. They follow the current approved version on their own, so a button would only get rejected by the server.
- The version sent is the one the preview reported. If the screen sent the “approved version” it knows about, and another version was approved while the dialog was open, the cycle could move to a version different from the numbers the user saw. Sending the previewed version lets the server block that case.
- After success, the row the server returned goes straight onto the screen. That’s the checklist line added in PR 282.
- The preview is fetched fresh each time the dialog opens and isn’t refetched when the window regains focus, so the numbers being looked at don’t change on their own.
How it was checked
- 14 tests were committed first, and 13 failed.
- After Codex’s round 1, one test failed — a bug in the test, not the code. The mock server kept returning the old version in the list after the move. The test was fixed, and 55 passed.
- Round 1 of
codex exec reviewfound two points, which Claude confirmed in the code: after a conflict with another admin, the version list wasn’t refetched, so labels and buttons were wrong; and after success, the button that opened the dialog disappeared and keyboard focus (where keyboard input currently goes) was lost. Three tests were added and Codex’s round 2 fixed them — 58 passed. - After round 2, a full verify run that took 954 s had two tests fail under load; rerunning them one by one, all passed.
npm run e2epassed 10 tests.
PR 287: Sending head office quests, checklist from the start
What was done and why
A screen head office uses to order a separate action after checking an issue report. “Checked” and “problem solved” are kept apart, and actions are sent as head office quests. One screen holds a send form (site → module, date, title and body, and optionally a product display name and recommended amount) and the list of sent quests (task status text, cancel).
What was chosen, and what was dropped
| Chosen | Dropped alternative | Why it was dropped |
|---|---|---|
| Put the row the server returned straight onto the first page of the list | Rely only on the refetch | If the refetch fails, the sent quest does not show |
| After success, clear only the title, body, product, and amount | Clear everything | Several quests are often sent to the same module |
- The default and earliest date is today in Korea. It uses the lower bound of the browser’s built-in date field, and if a past date is typed by hand, a text notice appears and sending is locked. Calculating in UTC (universal time) would make yesterday “today” before 9 a.m. in Korea, so that case is in the tests.
- After success, the row the server returned goes straight onto the first page of the list. Relying only on a refetch means the sent quest doesn’t show if that fails.
- After success, only the title, body, product, and amount are cleared. Several quests are often sent to the same module, so site, module, and date stay. Clearing everything was dropped.
- Rows with no task yet say “not visible yet.” For dates from tomorrow on, the task appears on that day, so there’s no status. A blank would look like an error.
- Where focus goes when a button disappears was in the brief from the start. After sending, focus goes to the “Sent” line; after cancelling, to the “Cancelled” line; and closing the dialog after a conflict goes to the list heading.
How it was checked
- 19 tests were committed first and failed because the screen didn’t exist; after Codex’s round 1, all 19 passed.
- Round 1 of
codex exec reviewpointed out “the server request doesn’t exist yet,” which was left as planned. “Closing the dialog after a conflict, before the list arrives, loses focus” was confirmed in the code; one test was added, seen to fail, and fixed in Codex’s round 2. Round 2 of review found nothing to fix. - 89 admin web tests passed; full
npm run verifypassed in 487 s;npm run e2epassed 10 tests.
Lessons
- Writing the gaps review would find into the brief up front cuts the rounds. The review screen went to four rounds; the routine screen, with the checklist in from the start, finished in two.
- The checklist grew a line with each task. By the end it looked like this:
- Fetch fresh only when the screen opens; no silent refetch on window focus or reconnect.
- Lock input while loading and while saving.
- If the user leaves during a save, don’t pull them back when it finishes.
- Use the shared request function (so shared behavior like the login notice isn’t lost).
- If a background refetch fails, keep the written values and the screen as they are.
- After a successful save, check that the value on screen is the value saved (put the server’s returned value in right away).
- Decide where focus goes when a button disappears.
- Send exactly the version that was previewed.
- A mock server has to change state like the real one. In a flow that refetches the list after success, if the mock server returns old values, correct code looks wrong in the test.
- Decide where focus goes from facts already known. Deciding by “is the button still in the refetched list?” goes wrong when the list arrives late. It has to be decided from what’s already known, like “a conflict response came back.”
- Don’t tell things apart by color alone. Reports over 24 hours get red text plus the words “over 24 hours.”