App Configurable Auto lock#905
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 723206ec5c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
iOS Simulator preview build is ready: https://github.com/stellar/freighter-mobile/releases/tag/untagged-d5fdcb2b109b40ea1426 (SDF collaborators only — install instructions in the release description) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b7d43caee
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 996b9a9c67
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 820f7dbbe3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…ed state mid-transaction
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14fcdc9f42
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba81a3c341
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44f10d969a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5cf10fd718
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98de964087
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8281249b68
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e781e130ca
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9053a4ed5e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08566bc35b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Code reviewFound 2 issues:
freighter-mobile/src/ducks/auth.ts Lines 2202 to 2226 in 08566bc
freighter-mobile/src/components/screens/HomeScreen/HomeScreen.tsx Lines 292 to 298 in 08566bc 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Code review (follow-up)Following up on the prior comment, which surfaced 2 of the 4 must-fix items below. This pass adds 2 more must-fix, 7 should-fix, and 4 optional findings from a deeper recall-mode review against the same commit TL;DRMust-fix (4 total, 2 already raised):
Should-fix (7): UX/correctness bugs that don't compromise the security model but produce visibly broken or wedged states. Optional (4): Edge-case timing races and theoretical attacks; worth filing as follow-up issues. Must-fix #3 (new) — SendCollectibleReview missing isWalletUnlocked guard
Trigger: user opens the collectible review sheet, taps Confirm; in the same tick an IMMEDIATELY auto-lock fires. The closure already captured Must-fix #4 (new) — softLock storage write swallowed
freighter-mobile/src/ducks/auth.ts Lines 2216 to 2226 in 08566bc Trigger: IMMEDIATELY auto-lock fires when the user backgrounds. softLock() sets in-memory LOCKED, then Should-fix (7)
Optional (4) — file as follow-up issues
🤖 Generated with Claude Code |
Cross-platform default consistencyWorth flagging before this lands: extension PR stellar/freighter#2802 shipped We've already discussed and settled on 12h as the default. Mobile should match — change 🤖 Generated with Claude Code |
…re activity recording actions
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c80f6024c7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a5e9e21c3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@piyalbasu thanks for posting the review Applied some extra security checks and data handling there. Mostly was edge cases (e.g. going to background -> foreground -> background -> foreground in quick succession) and checks to actively block signing if the app is locked The DEV flags were intentional to have them enabled on the TestFlight build. but ran one more build and removed them afterwards also adjusted the default timers from the extension to keep it more in line. hadnt changed it due to regression |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6d05add9e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // PrivacyShield native module — lets JS dismiss the iOS privacy shield once | ||
| // the auto-lock decision has finished, so a soft-lock overlay can mount | ||
| // before the wallet is revealed on return from the background. | ||
| // | ||
| // Packaged as a local pod (separate compilation module), so it can't | ||
| // reference the app target's AppDelegate directly. It decouples via | ||
| // NotificationCenter: AppDelegate owns the shield window (it's alive from | ||
| // launch and shows the shield reliably on every background) and observes this | ||
| // notification to dismiss it. |
There was a problem hiding this comment.
@leofelix077 nice improvement with this Privacy Shield, would you mind exposing it on the PR description?
There was a problem hiding this comment.
Added there a short description as well
for Added privacy, on the native layer it also adds a Privacy shield -> When app is in background, only the splash screen is shown, and on the native app switcher carousel menu, it does not show any information. When the app goes to background, it waits for the native JS layer to be ready (auth state and storage hydrated) to show again the lock screen or the home screen, avoiding exposing any info during this in-between state
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e0f538828
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fa28e85d0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if ( | ||
| isSoftLocked && | ||
| !( | ||
| options.toastId && SOFT_LOCK_ALLOWED_TOAST_IDS.includes(options.toastId) | ||
| ) |
There was a problem hiding this comment.
Allow lock-screen auth errors through the filter
When a soft-locked user unlocks and signIn sets a non-inline auth error (for example failedToLoadAccount after the password is accepted), AuthErrorToastListener emits AUTH_ERROR_TOAST_ID (auth-error) and clears the store error, but this new filter drops it because the allow-list only contains unlock-wallet-error. Fresh evidence: the biometric path now uses the allowed id, but the app-wide auth listener still emits auth-error for lock-screen/account-load failures, so the overlay shows neither an inline error nor a toast; route these lock-screen errors through an allowed id before clearing them.
Useful? React with 👍 / 👎.
Closes #627
Adds a configurable Auto-Lock to Settings → Security, so users decide how quickly the wallet re-locks itself; Immediately, 1 minute, 15 minutes, 30 minutes, 1 hour, 12 hours, 24 hours, or None (default 24h, matching today's behavior). After the chosen time the user is asked for their password (or biometrics) again
It locks on inactive time. either being on background or foreground without any actions. tracking is done via gestures, presses and navigation. for "Immediately" the app locks as soon as it goes to background
The lock itself is a soft lock: the screen you were on stays mounted underneath a lock overlay, so after unlocking you land back exactly where you were instead of getting bounced to a reloaded home screen. The existing 24 hash--key expiry stays as a hard security backstop — if key material ages out, you get a full re-authentication rather than the fast unlock path.
biometric prompt only triggers when coming from background. signing is blocked until unlocked , toasts wait for loading+state to be rehydrated before deciding on showing or not to avoid false positive errors
for Added privacy, on the native layer it also adds a Privacy shield -> When app is in background, only the splash screen is shown, and on the native app switcher carousel menu, it does not show any information. When the app goes to background, it waits for the native JS layer to be ready (auth state and storage hydrated) to show again the lock screen or the home screen, avoiding exposing any info during this in-between state
📱 Tested iOS Build 1.19.26 (1781721439)
Android smoke tests:
Screen.Recording.2026-06-17.at.12.20.45.mov
Screen.Recording.2026-06-17.at.12.24.16.mov
Ios Tests:
Send flow / login with biometric / background / state preservation on reunlock / demonstration with timers
ScreenRecording_06-17-2026.14-07-55_1.mov
no timer / more lock and unlock / privacy shield preservation
ScreenRecording_06-17-2026.16-55-18_1.mov
no biometrics tests with swap and collectible flows
ScreenRecording_06-17-2026.16-59-12_1.MP4
One small addition post last build to reset the default timers on sing up / reimport
Screen.Recording.2026-06-17.at.18.06.29.mov
Checklist
PR structure
Testing
Release