FiCl Dev Blog한국어

[PR #106] Customer App Task 3: Keeping the Login After the App Restarts

Work completed 2026-10-25 08:39 KST · Published 2026-10-25 09:30 KST · AI model used for the work Claude Sonnet 5.5

[PR #106] Customer App Task 3: Keeping the Login After the App RestartsSummary. Making the customer app keep its login across restarts, and applying the review's race fixes and the session-revoked handling I decided in the same PRPR #106Customer App Task 3Keeping the LoginA late request cannot overwrite the new sessionI decided 4AClaude builtOpus reviewedBuildReviewDecisionChecksⅠBuildLogin survivesa restart1Where keys liveRefresh key in secure storage,access token in memory only2Refresh onceOn expiry, refresh onceand resend the requestⅡReviewOpus read thecode: 2 required3Retry screen hiddenThe splash keptcovering it4Late refresh revived keyA session number nowdrops old resultsⅢDecisionHandling arevoked session5Chose 4AEnd the session and goto the login screenⅣChecksConfirmed with CI6PassedNot run on areal deviceKey: test the case where a later-finishing request overwrites state.FiCl Dev Blog · Post summary figure
[PR #106] Customer App Task 3: Keeping the Login After the App RestartsSummary. Making the customer app keep its login across restarts, and applying the review's race fixes and the session-revoked handling I decided in the same PRPR #106Customer App Task 3Keeping the LoginA late request cannot overwrite the new sessionI decided 4AClaude builtOpus reviewedBuildReviewDecisionChecksⅠBuildLogin survivesa restart1Where keys liveRefresh key in secure storage,access token in memory only2Refresh onceOn expiry, refresh onceand resend the requestⅡReviewOpus read thecode: 2 required3Retry screen hiddenThe splash keptcovering it4Late refresh revived keyA session number nowdrops old resultsⅢDecisionHandling arevoked session5Chose 4AEnd the session and goto the login screenⅣChecksConfirmed with CI6PassedNot run on areal deviceKey: test the case where a later-finishing request overwrites state.FiCl Dev Blog · Post summary figure

I requested this work.

Item Content
Built Login that survives a restart, one refresh on expiry, a “try again” screen
Fixed after review Retry screen hidden; late refresh reviving the key after logout
What I decided On a revoked-session answer (session_revoked), end the session and go to the login screen (4A)
Checks CI (verify, e2e) passed; app tests passed
Not done Running on a real device or simulator

Problems Found in Review

In the final review where PL (Claude Opus 5.5) only read the code, 2 required findings came up, and the cloud session fixed them in the same PR.

What I Decided

The review asked what to do when a normal request gets a 401 session_revoked (the server’s answer that it ended that session), and I chose 4A, the recommended option. When this answer arrives, the session ends (the key and access token are deleted) and the app goes to the login screen, while an expired token (token_expired) is still refreshed once as before. Fizz wrote new tests for this, and before the implementation 2 of the 3 failed saying the user was still signed in (the expected failure). They passed after the implementation.

Who Did What

What Was Chosen and What Was Left

What Could Not Be Checked

Lessons Learned

Where asynchronous requests overlap, as in login persistence, the case where a request that finishes later overwrites the current state needs its own test. A review that read the code caught this race, and the session number and tests were added after it.