Skip to content

Conversation

Rohit3523
Copy link
Collaborator

@Rohit3523 Rohit3523 commented Sep 27, 2025

Proposed changes

Issue(s)

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • Bug Fixes
    • Corrected passcode setup flow to clear the initial entry when restarting, preventing accidental clearing of the confirmation step.
    • Resolved a state handling typo that could cause inconsistent behavior during passcode entry.
    • Improves reliability and clarity when creating a new passcode.

Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

Caution

Review failed

The head commit changed during the review from 0d0c594 to 3203886.

Walkthrough

Fixes a state setter typo and updates the first-step behavior to clear the choose screen ref instead of the confirm screen ref in PasscodeChoose.tsx.

Changes

Cohort / File(s) Summary
Passcode flow fixes
app/containers/Passcode/PasscodeChoose.tsx
- Rename setPreviouPasscode → setPreviousPasscode and update its usage
- In firstStep flow, call chooseRef?.current?.clearPasscode() instead of confirmRef?.current?.clearPasscode()

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor U as User
    participant PC as PasscodeChoose
    participant CH as chooseRef
    participant CF as confirmRef

    U->>PC: Enter passcode (first step)
    PC->>PC: setPreviousPasscode(p)
    Note right of PC: Store first entry for confirmation
    PC->>CH: clearPasscode()
    Note over CH,PC: Choose screen is reset for next input

    U->>PC: Enter passcode (confirm step)
    PC->>PC: Compare with previous
    alt match
        PC-->>U: Proceed
    else mismatch
        PC->>CH: clearPasscode()
        PC-->>U: Prompt retry
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • diegolmello
  • OtavioStasiak

Poem

I nudge the keys with twitchy ears,
A typo hops away—no fears.
The choose ref clears, the flow aligned,
Two taps agree, in tidy kind.
Thump-thump! My paws approve the code—
Onward down the secure abode. 🐇🔐

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly identifies the primary change as fixing the issue where the confirm passcode input failed to reset, succinctly describing the bug and the intent to fix it in a single sentence. It is concise, specific, and uses a conventional “fix:” prefix to indicate the nature of the change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Rohit3523 Rohit3523 temporarily deployed to experimental_android_build September 27, 2025 08:16 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 temporarily deployed to experimental_ios_build September 27, 2025 08:16 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 marked this pull request as ready for review September 27, 2025 08:19
@Rohit3523 Rohit3523 changed the title fix: confirm passcode not getting reset fix: input in confirm passcode not getting reset Sep 27, 2025
Copy link

iOS Build Available

Rocket.Chat Experimental 4.65.0.107462

@Rohit3523 Rohit3523 had a problem deploying to upload_experimental_android September 27, 2025 08:47 — with GitHub Actions Error
Copy link

Android Build Available

Rocket.Chat Experimental 4.65.0.107461

Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNSEn9luRZflwl-Cxlg3p9AE20MmKd9r2QsHDV_15tpnouPuIRlrYq2WMLpWm3pBTXcCLd2YEHZVJs7Cjjdf

Copy link
Member

@diegolmello diegolmello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a regression or the bug was always there?
What's the behavior?

I'm missing CI jobs passing.

@Rohit3523
Copy link
Collaborator Author

CI is passing...

Screenshot 2025-09-29 at 7 16 24 PM

@Rohit3523
Copy link
Collaborator Author

Seems like a bug, so when we try to set a new screen lock and enter the password first time, in the confirm screen the password is prefilled and to continue we have to clear the password and enter it again to confirm

@Rohit3523 Rohit3523 requested a deployment to official_android_build September 29, 2025 13:51 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build September 29, 2025 13:51 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build September 29, 2025 13:51 — with GitHub Actions Waiting
@diegolmello diegolmello merged commit ce36d1d into develop Sep 29, 2025
6 of 16 checks passed
@diegolmello diegolmello deleted the passcode-confirm-fix branch September 29, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants