Fix password reminder after settings unlock - #6176
Open
j0ntz wants to merge 1 commit into
Open
Conversation
Contributor
Author
j0ntz
force-pushed
the
jon/fix-password-reminder-after-username-change
branch
from
August 28, 2026 01:26
d9326c8 to
4da9777
Compare
j0ntz
marked this pull request as ready for review
August 28, 2026 01:26
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description
The password reminder ("Security Check: Tap to verify password") stopped
reappearing after a user visited Account Settings, which is what QA hit while
following the Change Username repro in
https://app.asana.com/0/1215088146871429/1213821580712784.
One password entry at the unlock modal reached the reducer as two or three
separate password uses:
sequenceDiagram autonumber actor User participant Scene as SettingsScene participant Settings as SettingsActions participant Acct as AccountActions participant Reducer as PasswordReminderReducer User->>Scene: tap "Change Username" while locked Scene->>Settings: showUnlockSettingsModal() Settings->>Acct: validatePassword() Acct->>Acct: account.checkPassword(pw) succeeds Acct->>Reducer: PASSWORD_USED Note over Reducer: passwordUseCount 0 to 1<br/>(correct, kept) Settings->>Reducer: SET_SETTINGS_LOCK false Note over Reducer: translateAction mapped this<br/>to PASSWORD_USED: 1 to 2<br/>(removed by this PR) Scene->>Reducer: SET_SETTINGS_LOCK false again Note over Reducer: third PASSWORD_USED: 2 to 3<br/>(dispatch removed by this PR)Step 5 is the correct count. Step 6 double-counts it, and step 7 both counts it
a third time and re-dispatches an unlock that step 6 already performed. Every
path that unlocks Account Settings goes through
validatePassword, so theSET_SETTINGS_LOCKtranslation added no coverage the canonical dispatch lacked.The reminder thresholds are
4 ** passwordUseCount, so one visit to AccountSettings moved the next reminder far out of reach:
The username change itself was incidental. Account Settings is the trigger, and
the same escalation applied to Change Password, Change PIN, 2FA, Recovery and
Delete Account, which all go through
hasLock.The fix makes one password entry count exactly once. The backoff design is
unchanged. Adds a regression test covering the unlock dispatch sequence.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have: