[PR #110·#112] Customer App Task 5: Adding the Invite Flow and Login Methods, With Review Fixes
I requested this work.
- What was done: For the fifth task in the customer app plan, the invite flow was built. A person confirms with a phone number (or a linked social account) and an 8-digit code, checks their name, role and modules and agrees to the terms, then sets a password and is done. The path where someone who only used social login adds phone login, or a phone-number user links a social account (
add_method), uses the same screens. The terms text is fetched and shown as plain text, and the screen for requesting a new code is a text-only placeholder. The work was built in PR #110 and finished in the follow-up PR #112, which applied the Opus review findings. - Chosen approach:
- Whether the account is a social one was first decided by whether a
linkTicket(a temporary slip that ties a social account to a phone-number account) exists in the temporary store, because the tests set only that value and leave the route’smodealone. (After review this became stricter, as described below.) - Even when an error sends the user to another screen, the message is also shown on the current screen, because the tests look for the message there without any navigation. So that it also shows on the screen the user lands on, the error code is put into the temporary store (
notice) once and erased as soon as it is read. - After a network failure, “try again” calls the same submit function again. The request body is rebuilt from the temporary store and the password in screen state, so it is the same as the first time.
- If the response says the code was already used (409), the screen shows “Setup may already be finished” and a login button, and does not try to create a new account.
- Creating a new file was dropped because it was not among the files the instructions allowed, and the code was merged into an existing file.
- Whether the account is a social one was first decided by whether a
- Checks:
- Fizz’s tests were run first and failed before execution because the module did not exist. While reading them, the implementer found that one test contradicted the plan, so work stopped once, and it continued after Fizz fixed the test. The implementation side did not edit the test file.
- The first implementation passed 78 app tests (including 25 invite tests). After the Opus review findings were applied, 80 app tests passed, with 0 type-check and lint errors.
- When the work log was written, the root
npm run verifyfailed at the app type check (one error inside the test file). After Fizz fixed the test’s types, GitHub CIverifyande2eboth passed. This session has no Docker, so the full verify with the server tests could not be finished locally.
| Item | Details |
|---|---|
| Built | The invite flow (code check → info and terms → password → done) and the add-a-login-method path |
| Stopped | One test contradicted the plan, so work stopped once before implementation |
| Reviews | Pollen approved; Opus findings (1 high, 2 medium, 1 low) were applied in PR #112 |
| Checks | 80 app tests passed; 0 type-check and lint errors; CI (verify, e2e) passed |
| Still open | A message on the login screen, role names, back-button behavior |
Who Did What
- I: requested the work.
- Cloud session (Claude Sonnet 5.5): implemented the invite flow and fixed the Opus review findings. The model did not change during the session.
- Fizz (GPT-6 Luna): wrote the tests, and fixed both the test that contradicted the plan and the test’s type error.
- Claude (PL, Sonnet 5.5): coordinated and checked the work.
- Pollen (OpenCode free model glm-5.3-flash-free): did the general review.
- Claude (Opus): did the final review.
The Test That Clashed With the Plan
While reading the tests before implementing, a test covering the case of empty modules was found to contradict the plan. The test was not edited. Work stopped before implementation, the question was left in the log, and after Fizz fixed the test the implementation continued.
What the Reviews Found
- Pollen: approved. All 21 cases in the plan are covered by the 25 tests, no tests were skipped or weakened, and no files outside the allowed ones were changed.
- Fixed by the cloud session after the Opus review:
- High (H1): The add-a-login-method request returns a token pair without the server’s protection layer, but the app sent it like a protected request. The request settings and the response type were corrected, and both the social and phone paths now sign in and go to the app screen from one place.
- Medium (M1): The social path is accepted only when the route’s method is social and a
linkTicketalso exists. A leftoverlinkTicketalone no longer counts as social. Entering the code screen by the phone path discards the earlier ticket and provider, and the temporary store is cleared after a successful login, acceptance or method addition. - Medium (M2): If the request that fetches the invite details gets a code-ticket expired or invalid response, the app returns to code entry instead of offering a retry, keeping the phone number.
- Low (L3): An invalid code ticket returns to code entry, and a missing required consent returns to the info screen, with messages added.
What Still Needs the Owner’s Confirmation
- After a link ticket expires, the login screen does not show the “please log in with Kakao (Apple) again” message. The login screen file was not one this task’s instructions allowed editing, and during the review fixes
noticewas no longer used so that no unseen message is left behind. How the login screen should show this message has to be decided first in a follow-up. - Role names are shown as
대표(owner) and직원(staff) in place of the server valuesownerandstaff. These Korean names were chosen by the Claude that implemented this and are not in the plan. An unknown value is shown as the server sent it. - The tests require
router.replace(navigation that replaces the previous screen) when moving from the info screen to the password screen. So the back button on the password screen cannot return to the terms screen.
What I Learned
Reading the tests before running them can reveal where a test contradicts the plan, before implementing. This time one test showed that, so the implementation stopped and the test went back to its author.