[PR #194] Asking Headquarters to Check a Record: Writing an Inquiry in the App and "My Inquiries" on the Care Tab
This work lets a customer who is looking at a record in the app, and wants headquarters to check it, leave a draft inquiry and view it again on the Care tab. It connects the server feature for draft check requests built earlier (PR 175) to the app screens. Headquarters cannot actually receive or send these yet, so every screen shows “unsent draft” and avoids words like “received” or “sent”.
The work was split up on my Windows computer. Claude Code (Claude Opus 5.5) directed it, Codex (GPT-5.6 Luna) wrote the tests, and a Claude implementation session (Claude Sonnet 5.5) implemented it. The final review was done by the directing session and codex exec review (GPT-5.6 Luna). The implementation side did not change the test files.
- What was done:
- Two new screens: A screen to write an inquiry and a screen to view one.
- Entry points: A button to ask headquarters for a check was added to the save-complete screen and the record detail screen. On the detail screen the button is shown to anyone assigned to that module, whether or not they may edit the record.
- “My inquiries” on the Care tab: A list of my inquiries was added below the “coming soon” row on the Care tab.
- The writing screen: At the top it shows “the record to send along” (type, measured time, module, one-line summary, photos). It takes a title (1 to 100 characters, defaulting to “Please check this ○○ record”) and what you want checked (1 to 1,000 characters). The button is labelled “Keep inquiry draft”.
- Only one, even on retry: The request number is set once when the screen opens and reused on every retry. So even if the network drops and the request is sent again, the server creates only one inquiry. On failure the input stays and the screen shows “Could not keep it” with “Try again”. On success the stored copy of the inquiry list (the cache, data the app keeps after fetching) is discarded and the app moves to the Care tab.
- Viewing an inquiry: Shows the title, the content and an “unsent draft” label, with “View attached record” (the current record detail) and “View content at the time” (the version number, measured time, memo and photos as they were when the inquiry was made). There is no edit, delete or send.
- Chosen approach and rejected alternatives:
- Following the server’s actual response shape: The plan and the app’s list of requests described the create and list responses differently from the server. The server returns “the inquiry plus a flag for whether this was a resend of the same request” on create, and wraps the list under a different name. Before writing the instructions, the directing session read the server’s response code first and wrote “the server is the reference” into the instructions. The tests also built their fake responses in the server’s shape. Changing the server to match the plan was rejected because it would touch the server and admin web that were already merged.
- No path for a single inquiry: The server has no path that returns just one inquiry, so the view screen finds it in the first page of the list. Adding that path to the server was rejected as outside this work’s scope.
- Empty fields show a message instead of disabling the button: If the title or content is empty, the button stays on; an error message appears under the field and nothing is sent.
- How it was checked:
- On the commit that held only the tests, the 17 new tests (10 for writing, 7 for the Care tab) were confirmed, from Codex’s report and the type check, to fail for one reason only: “screen file does not exist”.
- After implementation the directing session reran 49 tests in 6 test files (writing an inquiry, Care, detail, new record, bottom menu and others), and all passed.
- The app type check passed, lint (a code-style check) had 0 errors, and the terminology check passed.
codex exec reviewanswered “no correctness problems worth fixing”.
At a glance
| What was done | Key method |
|---|---|
| Writing an inquiry | Show the record to send along at the top, take a title and content, keep it as a draft |
| Retry | Reuse the request number set when the screen opened, so only one inquiry is created |
| “My inquiries” on the Care tab | A list and a view screen; “View content at the time” shows the record as it was |
| Response shape | Tests and implementation follow the server’s actual response shape, not the plan |
Who did what
- Claude Code on my Windows computer (Claude Opus 5.5): As the directing session, wrote the instructions, reran the tests to confirm the results and did the final review.
- Codex (GPT-5.6 Luna): Wrote the tests first and did the final review with
codex exec review. - Claude implementation session (Claude Sonnet 5.5): Implemented the screens. It did not change the test files.
What could not be confirmed
- It was not checked on a real phone.
- If inquiries go beyond one page of the server’s list, older inquiries show “Inquiry not found” on the view screen, because only the first page of the list is fetched.
Lessons
- The response shape written in a plan can differ from the real server. Checking what the server actually returns before writing the instructions makes the tests and the implementation match the same shape from the start.
- To make retries create only one, set the request number once, when the screen opens.
- If one test empties two fields at once, it passes even without the check on one of them. The “blocked when the title is empty” test also left the content empty, so that is what happened. Empty only the field you mean to test.
- Do not promise a step that does not exist yet, even in screen text. With no real sending, the screens say “unsent draft” instead of “received” or “sent”.