[PR #268·273·276·279·281] Customer App Task Screens: So Customers Don't Believe Something Wrong
These five PRs built the Detail 4 (quests, routines, head office review) customer app screens one after another: the parts the screens use (PR 268), today’s tasks and the home card (PR 273), doing a task (PR 276), progress and head office replies (PR 279), and my device input and refill records (PR 281). One thread ties them together: don’t let the customer believe something wrong. Not that there is nothing to do, not a wrong number, and not that something unsaved is done.
All five PRs were worked on by the same models, all on my Windows computer.
- PR 268·273·276·279·281: The customer app lead session (a Claude Code session that hands out work, Claude Opus 5.5) wrote the work orders, tests, reviews, docs, and PRs. Codex (
gpt-6.1-terra) wrote the code, and the final review (codex exec review) was also Codex (gpt-6.1-terra). - PR 276·279: For problems the review found, the lead session wrote a test first and fixed a few lines itself.
- PR 281: Codex fixed the problem the review found. Decisions outside the plan were made by the Detail 4 development lead session (Claude Opus 5.5).
In all five PRs, the side that writes tests (Claude) and the side that implements (Codex) were kept separate. Tests went in first, and implementation was handed off only after seeing them fail.
| PR | What was done | Who wrote it | Result |
|---|---|---|---|
| 268 | Parts for the screens (display and request functions) | Claude (tests), Codex (implementation) | 75 related tests passed; review found nothing to fix |
| 273 | Today’s tasks and the home card | Claude (tests), Codex (implementation) | 121 related tests passed; review found nothing to fix |
| 276 | Doing a task | Claude (tests, review fix), Codex (implementation) | 98 related tests passed; 1 review finding applied |
| 279 | Progress and head office replies | Claude (tests, review fix), Codex (implementation) | 89 related tests passed; 1 of 2 review findings applied |
| 281 | My device input and refill records | Claude (tests), Codex (implementation, review fix) | 82 related tests passed; 1 review finding applied |
PR 268: Parts for the screens
What was done and why
The parts that the today’s-tasks and doing-a-task screens would use came first. Pure functions (functions that only turn values into values, with no screen or network) cover status text, picking the action buttons, which cards fold under “Show completed,” empty-tab messages, the home badge count, and skip-reason text. Four request functions were added: a today’s-tasks tab, one task, processing a task, and the input and refill record list.
The most important part was blocking two cases the spec marked as “critical gaps” (something wrong that the user can’t see).
- When there is no head-office-approved quest list, the app shows “Head office is preparing your task list,” not “No quests today.” The point is that the customer shouldn’t believe there is truly nothing to do.
- If even one of the two tabs (quests, routines) fails to load, the home badge count is hidden. No number is better than a wrong one.
Chosen approach and rejected alternatives
| Chosen | Rejected alternative | Why it was rejected |
|---|---|---|
| Carry the current state the server sends inside the error value | Load the task again after the error | One more request, and that request can fail too |
- Use the server’s numbers as is: Progress counts and badge counts add up the numbers the server sends. The app doesn’t recount the list. If the app counted, it could count tasks “under head office review” as done. The tests deliberately give a list and numbers that disagree, to check that the app uses the numbers.
- Dates that ignore the phone’s time zone: To count past days,
YYYY-MM-DDis read as midnight UTC and subtracted. In Detail 3, dates had shifted because of the phone’s time zone (PR 259). - When two people process the same task: The current state the server sends with its “already processed” error is kept in the app’s error value, so the app can show “This task was already processed” and who did it right away.
- Rejected — loading the task once more after the error: one more request, and that request can fail too.
How it was checked
- With only the tests in, the new tests failed (no display-function file; 8 request-function tests failed).
- After Codex’s implementation, the 75 related tests, the app type check, and lint (code rule check) passed.
- The lead session compared the four changed files line by line with the work order’s text and rules, and
codex exec reviewfound nothing to fix. The fullnpm run verifypassed.
PR 273: Today’s tasks and the home card
What was done and why
This is the screen where customers see today’s tasks at a glance. It has two tabs, quests and routines, each with “Done n / Total m” and a one-line hint. Cards appear in the order the server sends, and finished cards fold under “Show completed (n).” A “Today’s tasks” button was added to the Care start screen, and a “n tasks today” card to home (with “n under head office review” if there are any).
The two gaps from PR 268 were blocked here with screen tests. If only the routine tab request fails, the quest tab still shows, and only the routine tab shows “Couldn’t load routines” with a retry. In that case the home card hides its number and shows only “Today’s tasks.”
Chosen approach and rejected alternatives
| Chosen | Rejected alternative | Why it was rejected |
|---|---|---|
| A separate request per tab | One request for both tabs | A failure on one side would hide both tabs |
- One request per tab: Combining them into one request would let one failure hide both tabs. The home card shares the same request results.
- “Today” comes from the server’s date: Counting uses the tab date the server sends, not the phone clock, so “since N days ago” is right even in another time zone.
- Server numbers as is: Here too, the tests deliberately give a list and numbers that disagree.
- “See details” on folded cards: The plan only had buttons on to-do, recheck-requested, and under-review cards, which left no way to reach a completed task to undo it. So the button was added.
- Don’t draw other modules’ cards: If cards for a module other than the current one come back in the response, they are not drawn. Site-level cards are drawn.
How it was checked
- With only the tests in, they failed because the screen file didn’t exist; after Codex’s implementation, the 121 related tests, type check, and lint passed.
codex exec reviewfound nothing to fix, and the fullnpm run verifypassed.- During review, the lead session fixed one line. The tab error message was plain text, so screen readers (accessibility tools that read on-screen text aloud) didn’t announce it. Like other screens, it became alert text that is read out when it appears.
PR 276: Doing a task
What was done and why
This is the “do a task” screen that opens when you tap a card in today’s tasks. It’s where the customer sends a task as done, normal, or abnormal, skips it, or undoes it.
- For tasks with check items, the customer picks normal or abnormal for each item. If any item is “abnormal,” the buttons change to a single “Send as abnormal,” and nothing can be sent until every item is picked.
- Skipping requires a reason, and “Other” needs 1–200 characters of text. Tasks head office asked to recheck have no skip.
- Undo appears only when the server says the task can be undone (not after head office has reviewed it).
- Head office quests show the product and recommended amount and ask for the “amount actually used.”
The spec’s critical gap “done shown before saving” was blocked too. “Done” appears only after the server reports success. On success, the app returns to today’s tasks and reloads both tabs. On failure, it keeps the picked values and note and shows “Couldn’t save” with “Send again.”
Chosen approach and rejected alternatives
| Chosen | Rejected alternative | Why it was rejected |
|---|---|---|
| Keep the request number only inside the screen | Keep it in phone storage, as in Detail 3 | Not needed: when the app reopens, the server shows whether the task was handled |
- Request IDs follow the Detail 3 rule: After a failure, the same ID if the values are unchanged, a new ID if anything changed. The server counts the same ID received twice as one.
- Request IDs stay inside the screen: Processing a task doesn’t create a new record; it changes the state of an existing task. When the app reopens, the server shows whether that task was processed.
- Rejected — keeping them in phone storage as in Detail 3: not needed in this case.
- Skip reasons in an expanding panel: A panel that opens below the button instead of a pop-up. It’s easier to handle in tests and with screen readers.
- Already processed tasks: Using the current state kept in the error value from PR 268, the app shows “This task was already processed” with who did it and when, right away.
- Both readings-record shortcuts open the same record screen: Opening a specific tab would have meant changing the record screen, so that was left out.
How it was checked
- With only the tests in, they failed; after Codex’s implementation, the 97 related tests, type check, and lint passed. The lead session compared the screen line by line with the work order.
codex exec reviewfound one issue. After a failed save, even if the note or items were changed, “Send again” sent the old values. If that succeeded, the screen closed and the changes could silently vanish. The lead session added a test first and saw it fail, then made “Send again” disappear as soon as any value changes. After the fix, the 98 related tests passed.- The full
npm run verifypassed. - The lead session fixing a review finding itself broke the “the side that writes tests doesn’t implement” split, so the PR asked for that fix to be reviewed separately.
PR 279: Progress and head office replies
What was done and why
This screen shows how far a task the customer sent as “abnormal” has come and what head office replied. History runs oldest first, and each line shows who and when, what, check-item results, note, skip reason, amount used, and head office’s reply. If head office is still reviewing, “Head office is reviewing this” appears at the bottom. You get there through “See progress” on the do-a-task screen and on under-review cards in today’s tasks.
Notes only head office sees and admin names are not drawn. The server doesn’t put them in customer responses, but the app also doesn’t read those fields at all. That way nothing leaks to the customer even if the server makes a mistake. The tests deliberately put those fields into the fake responses (server answers the tests set in advance) to check.
Chosen approach and rejected alternatives
| Chosen | Rejected alternative | Why it was rejected |
|---|---|---|
| Use the same request as the task screen | A separate request for history only | The server has no such request, and sharing one response means no refetch when moving between the screens |
- The same request as the do-a-task screen: No separate history-only request. The server has no such request, and with both screens sharing one response, going back and forth doesn’t reload.
- Re-sort by time: The server’s order isn’t trusted as is; lines are re-sorted by processing time. Equal times keep the order received.
- Lines without a name: Head office review, recheck request, and head office cancel show as “Head office”; no record and cycle ended show as “System.”
- New action text for customers: Wording like “Sent as normal” matches the spec’s customer tone. The admin web’s short table-cell labels were not reused.
How it was checked
- With only the tests in, they failed; after Codex’s implementation, the 89 related tests, type check, and lint passed.
codex exec reviewfound two issues.- If you went to “See progress” while saving, then after the save finished, going back closed only the progress screen and left the user on the wrong screen. A fair point, so the lead session added one line to a test, saw it fail, and locked that button while saving.
- The point that the progress screen has no visible back button was not fixed. All screens under Care work the same way (hidden header, the phone’s back action), so this screen alone wasn’t changed.
- The full
npm run verifypassed. - After this PR, the lead session settled the approach: from now on, for review findings, the lead session only writes the test and hands the fix to Codex with a short follow-up work order. PR 276 and this one were exceptions before that.
PR 281: My device input and refill records
What was done and why
This screen lets customers see device input and refill records left at the site in one place. It shows the last 30 days, newest first, and each line has the date and time (Korea time), which device, the input amount or the amount after refill, who recorded it, and “Missing record” for missed records. At the top is a device filter (All / A / B / C / D). Even if the device list fails to load, records can still be seen under “All.” When empty it says “No records in the last 30 days,” and on failure it shows “Try again.” Saving an input or refill reloads the list too.
What changed from the plan
The plan said “tapping a line goes to Detail 3’s existing edit and history screen.” But the customer app had no such screen. Detail 3 only built screens for new records. It was a mistake made while writing the plan. The customer app lead session talked it over with the Detail 4 development lead session, and this time the list stays a list: tapping a line goes nowhere.
Chosen approach and rejected alternatives
| Chosen | Rejected alternative | Why it was rejected |
|---|---|---|
| Rows are a list only | Also build edit and history screens | Outside the plan, and it would need my approval |
| Redraw the inner screen when the module changes | Reset the filter value after drawing | One wrong request would go out with the previous site’s device number |
- Lines are list-only: The rejected option was building the edit and history screens now. It was outside the plan and needed my approval, so it was left out.
- Switching to another site’s module resets the filter to “All”: When the module changes, the inner part of the screen is drawn fresh.
- Rejected — resetting the value after drawing: one bad request would go out with the previous site’s device number.
- The app sorts once more: The server already sends newest first, but in line with PR 279 the app sorts again.
How it was checked
- The lead session wrote 9 tests first and confirmed they failed. To check that the tests themselves were right, it made them pass once with a throwaway implementation, then deleted it. Codex implemented.
codex exec reviewfound one issue: after switching to another site’s module, the filter stayed and the request failed. The lead session had seen the same point. Following the new approach, the lead session wrote just one test and confirmed it failed, and Codex made the fix from a short follow-up work order.- The 82 related tests, format check, and lint (0 errors) passed, and the 10 new tests each passed when run again one by one. The full
npm run verifypassed. - The first Codex run stopped with an alarm that the repository’s settings file changed during the run. At the same moment, the admin web session had added its own branch setting. The lead session checked the contents, and since Codex had only changed allowed files, its result was accepted.
What was learned
- If you don’t know, show “don’t know” instead of a wrong value. If the list is being prepared, say so; if even one tab fails to load, hide the badge number. Showing “none” and “unknown” the same way makes the customer believe there is none.
- Use the numbers the server counted, as is. If the app recounts, the rules in two places drift apart. Only tests with deliberately mismatched lists and numbers reveal which one the app uses.
- Show “done” only after the server reports success. On failure, keep what the customer picked.
- Test a button that remembers old values against every field that can change. The review found “Send again” sending the values from before a fix. Had the work order spelled out this case, the first implementation would have caught it.
- Fields the customer must not see, the app doesn’t even read. Don’t stop at trusting that the server won’t send them; make sure nothing leaks even if the server slips.
- When a plan says “existing screen,” check the files that the screen really exists. This time, a screen that didn’t exist was written down as if it did.