Conversation
…ge survive backgrounding Surface: the mobile app (apps/mobile). Two defects the owner sees on a real device. Find the ONE cause if they share it, and fix both. 1. After the app has been backgrounded for a while, the profile screen fails to load when the app comes back to the foreground. A retry loads it. 2. The chosen language occasionally reverts to the device language. Restarting the app restores the chosen language. Reproduce both first. Background the app long enough for the OS to release resources, then foreground it and open the profile; repeat until the failure shows. For the language, set a language that differs from the device language, background and foreground the app several times, and watch for the revert. The owner's hunch is the local database: a handle that does not survive the background, a read that runs before the store is open, or a write that never lands. Test that hunch first, and say in the pull request what the cause actually was. Required behaviour after the fix: - Foregrounding after any background period loads the profile on the first try, with no manual retry. - The chosen language survives backgrounding, foregrounding and a cold start, and only the user changes it. - Whatever the shared cause is, the fix closes it once rather than patching each screen. Cover both with a test that fails without the fix, and prove each on a device with a capture of the screen after the foreground.
|
bot: Rejected, no code change (kwf Why: (already implemented, verified live: no change needed: The PR already routes every persisted read through one cross-platform helper and its only added expo-secure-store import is a Vitest test import, so the platform-fork finding is refuted. Finding refuted, no change made. (1) The only added `import * as SecureStore from 'expo-secure- |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Reviewed the mobile fix that routes persisted SecureStore reads (refresh token, request auth token, cold-start identity hint, database key, and secure-store preferences incl. language) through Files Reviewed (14 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
|
This description names a scenario the proof did not capture:
A repeated proof run rebuilds the same evidence, so no proof run is dispatched for a named gap. Merging with this gap open is your decision. |
Changelog for users
Changelog for maintainers
readStoredValueWithRetry, which retries only a rejection with 250/500/1000 ms backoff and returns immediately onnull.SecureStore.getItemAsynccall.vitest.setup.ts, which stubs@/lib/configfor the retry helper; the per-file config mocks are removed.E2E proof — log excerpts
/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-proof-c3a69a0-6eb4/e2e-mobile-app/e1-behavior.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-proof-c3a69a0-6eb4/e2e-mobile-app/e1-english.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-proof-c3a69a0-6eb4/e2e-mobile-app/e1-english-foreground.digest.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-proof-c3a69a0-6eb4/e2e-mobile-app/e1-coldstart-language-row.digest.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-proof-c3a69a0-6eb4/e2e-mobile-app/e1-linked-accounts.digest.logFollow-ups (not changed here)
Open findings (not fixed here)
mobile-device: spot skips 11 still(s) of missed scripted scene(s)
mobile-device: spot check clean
mobile-device: signed-in app data restored on emulator-5554
mobile-device: signed-in app data frozen on emulator-5554 (66540544 bytes)
mobile-device: shard1 judged by jev