[PR #157·159] Building the App's Paths: Straight to Home After Login, Switching Modules, and Five Bottom Tabs
I requested this work.
- What was done:
- Home after login (PR #157): The screen where you picked a module card after login is gone. If one or more modules are available, the app goes straight to home. The current module is the one chosen last (the first one if none was chosen). Module switching is a modal (a window that opens over the screen), and the last module and the last record tab are saved on the device. If a module request returns 403
module_forbidden, the app refetches the access list and, if the current module has disappeared, moves to the first module and tells the user. That handling lives in exactly one place (setModuleForbiddenHandler). Home stays a placeholder screen for the next task to fill in. - Bottom tabs (PR #159): Five bottom tabs. The first tab is home, and its button is round. Three tabs show only a title and a “coming soon” line. The fifth tab has an entry to
My info(the screen with deletion requests and unlinking of sign-in methods) and aLog outbutton that goes through a confirmation dialog.
- Home after login (PR #157): The screen where you picked a module card after login is gone. If one or more modules are available, the app goes straight to home. The current module is the one chosen last (the first one if none was chosen). Module switching is a modal (a window that opens over the screen), and the last module and the last record tab are saved on the device. If a module request returns 403
- Choices made:
- The access screen keeps its own fetch, because its tests render it without a module provider. As a result the access list is fetched twice, once there and once by the provider. Making both share one cache would have meant changing how the tests are built, so that was rejected.
- The redirect for the zero-module case is done from the home screen, not from the provider. If the provider sent the user to the access screen, the access screen could redirect to itself in a loop.
- Back navigation goes “to the tab seen just before, or to home if there is no history” (
backBehavior="history"). The other setting (firstRoute) goes to the first tab, not home. The basis is the type comments of the installed expo-router (the app’s screen-navigation library); the official documentation was unreachable from this session, so that is not confirmed. - Icons are text symbols. The repository has no icon library, and this task forbade adding packages.
- The tab buttons are custom-made with the screen-reader role set to
tab. The library givesbuttonon iOS, but the tests look the tabs up by thetabrole. The visible tab text is hidden from screen readers, because the button already has a name for reading aloud. - The “coming soon” screen is one shared component, to cut duplication across three screens.
- Review and fixes:
- For PR #157, the final review was done by a Claude Opus 5.5 helper agent, and its findings (the session cache, switching users, and an empty module list) were applied. For general review, Pollen did not answer, so Honey (Claude Haiku 5.5) took it over and flagged, as a defect that must be fixed (high severity), the loop where the access screen and home send each other back and forth.
- Honey also took over the general review of PR #159.
- Checks:
- PR #157 passed
npm run verify(204 app tests, 494 server tests, 0 lint errors). GitHub CI’sverifyande2ealso passed on the last commit. - PR #159’s 9 bottom-tab tests all pass, and CI
verifypassed. At first 1 of the 9, the logout test, failed, and the cause was on the test side (see Lessons).
- PR #157 passed
| Item | Detail |
|---|---|
| Built | Straight to home after login, remembering the current module, a module-switching modal, five bottom tabs, “coming soon” screens, entries for My info and logout |
| Prevented | The previous user’s screen data and selection showing for the next user; the access screen and home sending each other back and forth |
| Checks | 204 app tests and 494 server tests pass (#157), 9 bottom-tab tests pass (#159), CI verify and e2e pass |
The reason for the entry to My info is Apple’s App Review Guideline 5.1.1(v). It says an app that lets people create an account must also offer account deletion inside the app, and an app that uses a social network login must offer a way to revoke that connection inside the app. Logging out itself is not mentioned in that item. (Source: App Store Review Guidelines, checked directly in this session.)
Who did what
- I: requested the work.
- Claude (cloud session, Claude Sonnet 5.5): implemented the screens and the navigation structure.
- Claude (PL, Claude Sonnet 5.5): coordinated the work and checked review findings against the code.
- Fizz (GPT-6 Luna): wrote the tests and fixed the problems in the logout test.
- Claude (Opus 5.5, helper agent): did the final review of PR #157.
- Honey (Claude Haiku 5.5): took over the general review of both PRs from Pollen. Pollen did not answer in PR #157, and in PR #159 it did not answer within 30 minutes.
Lessons
- Traces of an ended session show up for the next user. After logout, the screen-data cache remained, so the previous user’s access list could appear for the next user. The cache is now cleared in full when a session ends.
- A saved choice should record whose it is. The chosen module is stored together with the user’s ID, and if it differs from the current user, it counts as not yet read. The next user starts from their own saved value (the first module if none).
- Watch for two screens that send each other back and forth. The access screen fetches the access list directly while home reads a shared cache. If the cache held an old empty result, home could send the user to the access screen and the access screen back to home, repeatedly. The access screen now puts the result it just received into the shared cache before going home, which prevents it.
- Write down the limits of the new tests too. The user-switch test only sees the final result, so it passes even with the user-ID check removed. It cannot catch the moment the old selection is drawn once, which is what the check prevents (confirmed by removing the check).
- Some failures were the test’s fault. The logout test tried to find the logo by text, but the logo’s name was attached only as a label for reading aloud, and the test setup erased the navigation behavior of the fake logout function. Fizz fixed it so the fake function navigates to the login screen and the test finds the logo by label. Because the test uses a fake function, it cannot confirm the real logout navigation; that part belongs to the session tests.
- Not confirmed: whether the tab role is read correctly by screen readers on a real iOS device, whether there is a test for back navigation, and whether the logout dialog’s wording matches the actual behavior.