-
Notifications
You must be signed in to change notification settings - Fork 60
Replace 24h absolute auto-lock with configurable idle timer #2802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
3578408
Replace 24h absolute auto-lock with configurable idle timer
Copilot 54aa0b8
Address PR review feedback from Copilot reviewer
Copilot e710fa1
Address PR review feedback: treat shortened-timeout save as activity;…
Copilot 0c1d6ca
Strengthen shortened-timeout regression test
Copilot b00599b
Flip popup to unlock screen when idle auto-lock fires
Copilot ecf489b
Preserve interrupted route context across auto-lock
Copilot 6b22e3a
Address PR review feedback: idle auto-lock cross-surface consistency
Copilot f3e4598
Address internal review: require hasPrivateKey in useGetAppData cache…
Copilot 2013aad
Make SessionLockListener handler synchronous to avoid claiming runtim…
Copilot ece5971
Move post-unlock navigation from SessionLockListener to UnlockAccount
Copilot a5ed79d
Reset idle alarm when a new Freighter surface mounts unlocked
Copilot b3868f9
Fire surface-mount activity ping unconditionally; gate on lock state …
Copilot 69ab958
TEMP: instrument auto-lock path for diagnosis (will be reverted)
Copilot c0f2e16
Accept extension-origin tab senders in popupMessageListener gate
Copilot 7b3e4dd
Drop surface-mount USER_ACTIVITY ping; only user input resets the idl…
Copilot 7793c28
Address review feedback: scope-drift cleanup and small hardening
Copilot 5038039
Address PR review feedback from @piyalbasu
Copilot c9487e6
Drop loadSettings cast using generic sendMessageToBackground
Copilot 8a1376f
Add dedicated Auto-Lock Timer settings page under Security
Copilot 191f6cf
Change 4h option to 6h, add 12h option, default to 12h
Copilot bc00233
Restore saveSettings error envelope check
Copilot 4c3ca0b
Merge branch 'master' into plan-do-review/issue-2082
piyalbasu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Single source of truth for the idle auto-lock timeout feature. | ||
| * | ||
| * The browser session is locked after this many minutes of user | ||
| * inactivity across all extension surfaces (popup, sidebar, standalone | ||
| * signing windows, grant-access windows). Any user interaction inside | ||
| * an extension page resets the timer. | ||
| */ | ||
| export const VALID_AUTO_LOCK_TIMEOUT_MINUTES = [1, 5, 15, 30, 60] as const; | ||
|
|
||
| export type AutoLockTimeoutMinutes = | ||
| (typeof VALID_AUTO_LOCK_TIMEOUT_MINUTES)[number]; | ||
|
|
||
| export const DEFAULT_AUTO_LOCK_TIMEOUT_MINUTES: AutoLockTimeoutMinutes = 15; | ||
|
JakeUrban marked this conversation as resolved.
Outdated
|
||
|
|
||
| export const isValidAutoLockTimeoutMinutes = ( | ||
| value: unknown, | ||
| ): value is AutoLockTimeoutMinutes => | ||
| typeof value === "number" && | ||
| (VALID_AUTO_LOCK_TIMEOUT_MINUTES as readonly number[]).includes(value); | ||
|
|
||
| export const coerceAutoLockTimeoutMinutes = ( | ||
| value: unknown, | ||
| ): AutoLockTimeoutMinutes => | ||
| isValidAutoLockTimeoutMinutes(value) | ||
| ? value | ||
| : DEFAULT_AUTO_LOCK_TIMEOUT_MINUTES; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this type of casting is a code smell. address this type properly