Skip to content

Conversation

OtavioStasiak
Copy link
Contributor

@OtavioStasiak OtavioStasiak commented Sep 15, 2025

Proposed changes

Improve reset e2e key flow.

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-1316

How to test or reproduce

  • Open the app without enter your e2e password;
  • Navigate to E2EEnterYourPasswordView;
  • Click on Forgot E2EE password? button;
  • Click on Reset E2EE Password button;

Screenshots

E2EEnterYourPasswordView before E2EEnterYourPasswordView after
Simulator Screenshot - iPhone 16 - 2025-09-25 at 16 13 54 Simulator Screenshot - iPhone 16 - 2025-09-25 at 16 12 58
Simulator Screenshot - iPhone 16 - 2025-09-25 at 16 13 16

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

  • New Features

    • Added a Reset E2EE Password screen and enhanced the Enter E2EE Password flow with actions: Enable encryption, Forgot/Reset password, and Do it later.
  • Translations

    • Added and updated E2EE-related UI strings across many locales; clarified the enter-password description to mention viewing/sending encrypted messages and per-device entry.
  • Tests

    • Added an end-to-end test covering E2EE password entry, enablement, reset (via settings and enter-password), and logout/login cycles.

Copy link
Contributor

coderabbitai bot commented Sep 15, 2025

Walkthrough

Adds E2EE password discovery and reset UI flows: new Maestro E2E test, many i18n keys and description updates, a new Reset Password view, navigation/stack type additions, and updates to the Enter E2EE Password view to expose “Forgot E2EE password?” and “Do it later” actions.

Changes

Cohort / File(s) Summary
E2E Maestro test
.maestro/tests/E2EEncryption/enter-e2ee-encryption.yaml
New end-to-end test covering entering, resetting, and re-entering E2EE password via Settings and Enter screens; includes setup/teardown hooks, login/logout cycles and UI validations.
i18n updates (E2EE keys + description)
app/i18n/locales/.../*.json
app/i18n/locales/en.json, ar.json, bn-IN.json, cs.json, de.json, es.json, fi.json, fr.json, hi-IN.json, hu.json, it.json, ja.json, nl.json, nn.json, no.json, pt-BR.json, pt-PT.json, ru.json, sl-SI.json, sv.json, ta-IN.json, te-IN.json, tr.json, zh-CN.json, zh-TW.json
Add keys Do_it_later, E2EE_password, Enable_encryption_button_label, Forgot_E2EE_password, Reset_E2EE_Password; update Enter_E2EE_Password_description wording/format across many locale files.
E2E Enter stack updates
app/stacks/InsideStack.tsx, app/stacks/types.ts
Register new E2EResetYourPasswordView screen in E2EEnterYourPassword stack and add its param type to the stack param list.
MasterDetail modal additions
app/stacks/MasterDetailStack/index.tsx, app/stacks/MasterDetailStack/types.ts
Expose E2EResetYourPasswordView as a modal route and add its param to ModalStack and MasterDetail Drawer types.
Enter Password view updates
app/views/E2EEnterYourPasswordView.tsx
Component now accepts a typed navigation prop, uses useFocusEffect for toast handling, updates layout/styles and testIDs, and adds “Enable encryption”, “Forgot E2EE password?” and “Do it later” actions with separators.
New Reset Password view
app/views/E2EResetYourPasswordView.tsx
New screen with Reset/Cancel actions; Reset shows confirmation, calls Services.e2eResetOwnKey(), dispatches logout on success, handles errors with alerts, sets header and testIDs.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant EnterView as Enter E2EE Password View
  participant Nav as Navigator
  participant ResetView as Reset E2EE Password View
  participant Services as Services.e2eResetOwnKey
  participant Store as Redux Store

  User->>EnterView: Open Enter E2EE Password
  EnterView->>User: Show description + password input + actions

  alt Enable encryption (normal)
    User->>EnterView: Tap "Enable encryption"
    EnterView->>EnterView: Validate & submit password (existing flow)
  end

  alt Forgot password path
    User->>EnterView: Tap "Forgot E2EE password?"
    EnterView->>Nav: navigate(E2EResetYourPasswordView)
    Nav->>ResetView: Present Reset View
    User->>ResetView: Tap "Reset"
    ResetView->>ResetView: Show confirm alert
    alt Confirmed
      ResetView->>Services: e2eResetOwnKey()
      Services-->>ResetView: success/failure
      opt success
        ResetView->>Store: dispatch(logout())
      end
      opt failure
        ResetView->>ResetView: Show error alert
      end
    else Cancel
      ResetView->>Nav: goBack()
    end
  end

  alt Do it later
    User->>EnterView: Tap "Do it later"
    EnterView->>Nav: goBack()
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • diegolmello

Poem

In my burrow I guard a tiny key,
I press "Enable" then nibble with glee. 🐇
Forgot it? A friendly reset I show,
"Do it later" hops — the flow lets you go.
Secure hops, soft words — across tongues they grow. ✨🔐

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues Check ❓ Inconclusive The PR adds the required “Forgot E2EE Password?” and “Do it later” buttons on the Enter E2EE Password screen, introduces a dedicated reset-password view with a Cancel option, and updates on-screen text and localization keys to match the new designs. However, it no longer routes the “Forgot E2EE Password?” action to the Settings → Security and privacy → End-to-end encryption section as originally specified, and the diff does not expose any explicit accessibility attributes. Without confirmation of the intended navigation target and accessibility compliance, it is unclear if all linked issue requirements are fully satisfied. Please verify whether the “Forgot E2EE Password?” button should navigate to the existing settings encryption screen or remain on the custom reset view and ensure any required accessibility labels or roles are added to meet the issue’s acceptance criteria.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly communicates the main feature of the changeset by signaling an enhancement to the E2EE key reset flow and follows conventional commit formatting without extraneous detail.
Out of Scope Changes Check ✅ Passed All modifications focus on enhancing the E2EE key reset discovery flow—including UI updates to the Enter Password screen, a new Reset Your Password view, navigation stack adjustments, i18n additions across locales, and matching end-to-end tests—and no unrelated modules or features have been altered.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat.reset-e2ee-key-flow-improvement

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (22)
app/i18n/locales/ar.json (1)

153-153: Arabic grammar: prefer “كلمة مرور” over “كلمة المرور”.

Use the idiomatic construct for compound nouns.

-  "E2EE_password": "كلمة المرور E2EE",
+  "E2EE_password": "كلمة مرور E2EE",
app/i18n/locales/te-IN.json (1)

250-251: Unify “పాస్‌వర్డ్” spelling across keys.

Keep one spelling to avoid UI inconsistency.

-  "E2EE_password": "E2EE పాస్వర్డ్",
+  "E2EE_password": "E2EE పాస్‌వర్డ్",
app/i18n/locales/ta-IN.json (1)

278-279: Add “E2EE” to the description for clarity and parity with other locales.

Current text omits “E2EE”.

-  "Enter_E2EE_Password_description": "உங்கள் கடவுச்சொல்லைப் பதிவு செய்து குறியாக்கச் செய்திகளைப் பார்க்கவும் மற்றும் அனுப்பவும். \n\nஒவ்வொரு சாதனத்திலும் கடவுச்சொல்லை உள்ளிட வேண்டும்.",
+  "Enter_E2EE_Password_description": "உங்கள் E2EE கடவுச்சொல்லை உள்ளிட்டு குறியாக்கப்பட்ட செய்திகளைப் பார்க்கவும் மற்றும் அனுப்பவும்.\n\nஒவ்வொரு சாதனத்திலும் கடவுச்சொல்லை உள்ளிட வேண்டும்.",
app/i18n/locales/ru.json (1)

199-199: Natural Russian phrasing for “Do it later”.

“Sделать позже” reads better in UI.

-  "Do_it_later": "Сделай это позже",
+  "Do_it_later": "Сделать позже",
app/i18n/locales/sv.json (1)

207-207: Tighten “Forgot E2EE password” phrasing (shorter button).

Suggested Swedish is more idiomatic/compact for UI buttons.

-  "Forgot_E2EE_password": "Glömt lösenordet för E2EE?",
+  "Forgot_E2EE_password": "Glömt E2EE-lösenordet?"

Also applies to: 231-231, 246-246, 257-257, 298-298, 590-590

app/i18n/locales/zh-CN.json (1)

139-139: Chinese spacing around English acronym in prose.

Add a thin space around “E2EE” for consistency with other zh-CN strings (e.g., “E2EE 密码”).

-  "Enter_E2EE_Password_description": "输入您的E2EE密码以查看和发送加密消息.\n\n每台设备都需要输入密码。",
+  "Enter_E2EE_Password_description": "输入您的 E2EE 密码以查看和发送加密消息。\n\n每台设备都需要输入密码。"

Also applies to: 162-162, 176-176, 185-185, 220-220, 442-442

app/i18n/locales/sl-SI.json (1)

185-185: Slight word-order tweaks for natural Slovenian.

“Slo-fication” reads more naturally with noun after acronym.

-  "E2EE_password": "Geslo E2EE",
+  "E2EE_password": "E2EE geslo",-  "Reset_E2EE_Password": "Ponastavi geslo E2EE",
+  "Reset_E2EE_Password": "Ponastavi E2EE geslo"

Also applies to: 209-209, 224-224, 234-234, 275-275, 559-559

app/i18n/locales/pt-BR.json (1)

248-248: Shorter CTA for button width.

“Faça isso mais tarde” can truncate on smaller devices. Suggest a shorter, common phrasing.

-  "Do_it_later": "Faça isso mais tarde",
+  "Do_it_later": "Depois",

If you prefer, “Deixar para depois” is another option; validate with UI snapshot for truncation.

Also applies to: 273-273, 289-289, 305-305, 350-350, 685-685

app/i18n/locales/tr.json (1)

143-143: Minor Turkish naturalness and button brevity.

  • Make CTA shorter.
  • Use simpler passive for “must be entered”.
-  "Do_it_later": "Daha sonra yap",
+  "Do_it_later": "Daha sonra",-  "Enter_E2EE_Password_description": "Şifreli mesajları görüntülemek ve göndermek için E2EE şifrenizi girin.\n\nHer cihazda şifre girişi yapılmalıdır.",
+  "Enter_E2EE_Password_description": "Şifreli mesajları görüntülemek ve göndermek için E2EE şifrenizi girin.\n\nHer cihazda şifre girilmelidir.",

Also applies to: 166-166, 180-180, 189-189, 225-225, 461-461

app/i18n/locales/fi.json (2)

207-207: Shorter Finnish CTA for button fit.

“ Myöhemmin” is concise and common on buttons.

-  "Do_it_later": "Tee se myöhemmin",
+  "Do_it_later": "Myöhemmin",

Also applies to: 231-231, 247-247, 258-258, 300-300, 591-591


258-258: Typo/consistency check: punctuation style.

Ensure full stops are consistent (some lines use “.” vs “.” with spacing). Current line is fine; just flagging for locale-wide consistency as you touch this block.

app/i18n/locales/no.json (1)

238-238: Minor wording nits (NB): consider hyphenation.

  • Prefer “E2EE‑passord” over “E2EE passord” for consistency with NN/DE.
  • Current text is otherwise clear.

Also applies to: 265-265, 281-281, 301-301, 338-338, 661-661

app/i18n/locales/nn.json (1)

114-114: Fix NN grammar in password description.

Use NN forms “skrivast”/“kvar eining”.

Apply this diff:

-"Enter_E2EE_Password_description": "Skriv inn E2EE-passordet ditt for å vise og sende krypterte meldinger.\n\nPassordet må skrives inn på hver enhet.",
+"Enter_E2EE_Password_description": "Skriv inn E2EE‑passordet ditt for å vise og sende krypterte meldingar.\n\nPassordet må skrivast inn på kvar eining."

Also applies to: 119-119, 128-128, 138-139, 283-284

app/i18n/locales/hu.json (1)

227-227: Tighten HU phrasing for “Do it later”.

“Csak később tedd meg” sounds imperative; concise buttons usually use “Később”.

-"Do_it_later": "Csak később tedd meg",
+"Do_it_later": "Később",

Also applies to: 251-251, 266-266, 278-279, 320-320, 629-629

app/views/E2EResetYourPasswordView.tsx (1)

40-56: Handle non-successful responses explicitly.

If success !== true, show an error (current code silently does nothing).

- if (res?.success === true) {
-   dispatch(logout());
- }
+ if (res?.success) {
+   dispatch(logout());
+ } else {
+   showErrorAlert(I18n.t('E2E_encryption_reset_error'));
+ }
app/views/E2EEnterYourPasswordView.tsx (1)

95-101: Screen reader announces the wrong message on E2EE auth failure.

Announcing Invalid_URL is misleading. Announce the encryption/password error instead.

Apply:

-			AccessibilityInfo.announceForAccessibility(I18n.t('Invalid_URL'));
+			AccessibilityInfo.announceForAccessibility(I18n.t('Encryption_error_title'));
.maestro/tests/E2EEncryption/enter-e2ee-encryption.yaml (1)

106-110: Brittle selector: case mismatch vs locale; prefer testIDs.

The UI string is “Reset E2EE Password” (capital P). This step taps 'Reset E2EE password' (lowercase), which may fail. Use the view’s testID and include the confirmation.

-# Reset E2EE password from Enter E2EE password view
 ...
 - tapOn:
     id: 'e2e-enter-your-password-view-forgot-password'
-- tapOn:
-    text: 'Reset E2EE password'
-#- tapOn: 'Enter E2EE password'
-#- tapOn: 'Forgot E2EE password?'
-#- tapOn:
-#    id: 'e2e-reset-your-password-view-reset-password'
-#- tapOn: 'Yes, reset it'
+- tapOn:
+    id: 'e2e-reset-your-password-view-reset-password'
+- tapOn: 'Yes, reset it'
app/i18n/locales/en.json (1)

314-315: Fix grammar and align with test strings.

  • Grammar: “Password need to be entered...” → “The password must be entered on each device.”
  • Ensure tests and UI use the same casing for “Reset E2EE Password” (tests currently use lowercase ‘password’).
-  "Enter_E2EE_Password_description": "Enter your E2EE password to view and send encrypted messages.\n\nPassword need to be entered on each device.",
+  "Enter_E2EE_Password_description": "Enter your E2EE password to view and send encrypted messages.\n\nThe password must be entered on each device.",

Also applies to: 700-700

app/i18n/locales/es.json (1)

122-122: ES additions LGTM; consider voice consistency.

Strings read well. Minor: file mixes “tú” (e.g., ¿Ya tienes...?) and formal “usted” (Ingrese su..., ¿Olvidó...?). Consider aligning to one voice across E2EE strings for consistency.

Also applies to: 126-126, 136-136, 139-140, 170-170, 313-313

app/i18n/locales/it.json (1)

154-154: IT translations OK; tweak “Forgot…” for natural phrasing.

Prefer “Hai dimenticato la password E2EE?” over “Dimenticato la password E2EE?”.

-  "Forgot_E2EE_password": "Dimenticato la password E2EE?",
+  "Forgot_E2EE_password": "Hai dimenticato la password E2EE?",

Also applies to: 177-177, 191-191, 200-201, 237-237, 478-478

app/i18n/locales/nl.json (1)

547-547: Natural NL phrasing for reset label.

Use “E2EE-wachtwoord resetten” (or “opnieuw instellen”) instead of “Wachtwoord voor E2EE Resetten”.

-  "Reset_E2EE_Password": "Wachtwoord voor E2EE Resetten",
+  "Reset_E2EE_Password": "E2EE-wachtwoord resetten",
app/i18n/locales/bn-IN.json (1)

251-251: Fix BN typos and keep “E2EE” consistent.

  • Prefer keeping “E2EE” in Latin across strings.
  • Correct misspelling “ই2ইইই/পাসওয়ার্ড”.
-  "E2EE_password": "এন্ড-টু-এন্ড এনক্রিপ্টেড পাসওয়ার্ড",
+  "E2EE_password": "E2EE পাসওয়ার্ড",
-  "Enter_E2EE_Password_description": "আপনার ই2ইইই পাসওয়ার্ড প্রবেশ করান গোপন বার্তা দেখতে এবং পাঠানোর জন্য।\n\nপ্রতিটি যন্ত্রে পাসওয়ার্ড প্রবেশ করতে হবে।",
+  "Enter_E2EE_Password_description": "গোপন বার্তা দেখতে ও পাঠাতে আপনার E2EE পাসওয়ার্ড লিখুন।\n\nপ্রতিটি ডিভাইসে এই পাসওয়ার্ড লিখতে হবে।",

Also applies to: 278-279

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13d264f and 5028210.

📒 Files selected for processing (30)
  • .maestro/tests/E2EEncryption/enter-e2ee-encryption.yaml (1 hunks)
  • app/i18n/locales/ar.json (6 hunks)
  • app/i18n/locales/bn-IN.json (6 hunks)
  • app/i18n/locales/cs.json (6 hunks)
  • app/i18n/locales/de.json (6 hunks)
  • app/i18n/locales/en.json (6 hunks)
  • app/i18n/locales/es.json (4 hunks)
  • app/i18n/locales/fi.json (6 hunks)
  • app/i18n/locales/fr.json (6 hunks)
  • app/i18n/locales/hi-IN.json (6 hunks)
  • app/i18n/locales/hu.json (6 hunks)
  • app/i18n/locales/it.json (6 hunks)
  • app/i18n/locales/ja.json (6 hunks)
  • app/i18n/locales/nl.json (6 hunks)
  • app/i18n/locales/nn.json (5 hunks)
  • app/i18n/locales/no.json (6 hunks)
  • app/i18n/locales/pt-BR.json (6 hunks)
  • app/i18n/locales/pt-PT.json (6 hunks)
  • app/i18n/locales/ru.json (6 hunks)
  • app/i18n/locales/sl-SI.json (6 hunks)
  • app/i18n/locales/sv.json (6 hunks)
  • app/i18n/locales/ta-IN.json (6 hunks)
  • app/i18n/locales/te-IN.json (6 hunks)
  • app/i18n/locales/tr.json (6 hunks)
  • app/i18n/locales/zh-CN.json (6 hunks)
  • app/i18n/locales/zh-TW.json (6 hunks)
  • app/stacks/InsideStack.tsx (2 hunks)
  • app/stacks/types.ts (1 hunks)
  • app/views/E2EEnterYourPasswordView.tsx (4 hunks)
  • app/views/E2EResetYourPasswordView.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
app/views/E2EResetYourPasswordView.tsx (5)
app/stacks/types.ts (1)
  • E2EEnterYourPasswordStackParamList (272-275)
app/theme.tsx (1)
  • useTheme (29-29)
app/lib/methods/helpers/info.ts (2)
  • showConfirmationAlert (30-54)
  • showErrorAlert (5-6)
app/lib/methods/helpers/log/index.ts (1)
  • logEvent (35-42)
app/lib/services/index.ts (1)
  • Services (4-7)
app/views/E2EEnterYourPasswordView.tsx (3)
app/stacks/types.ts (1)
  • E2EEnterYourPasswordStackParamList (272-275)
app/containers/TextInput/ControlledFormTextInput.tsx (1)
  • ControlledFormTextInput (11-19)
app/containers/List/List.stories.tsx (1)
  • Separator (64-68)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ESLint and Test / run-eslint-and-test
🔇 Additional comments (11)
app/i18n/locales/ja.json (1)

142-176: LGTM: keys and placeholders are consistent with other locales.

app/i18n/locales/zh-TW.json (1)

145-192: LGTM: updated keys and multiline description look correct.

app/i18n/locales/cs.json (1)

244-294: LGTM: Czech additions read naturally; placeholders and newlines are correct.

app/i18n/locales/hi-IN.json (1)

227-227: E2EE additions look good — 'पासवर्ड' spelling is consistent.
Searched app/i18n/locales/hi-IN.json with the suggested regex; all matches use "पासवर्ड" (no "पासवॉर्ड" variants found).

app/i18n/locales/de.json (1)

222-222: LGTM on added/updated DE strings.

Terminology and punctuation are consistent with existing locale.

Also applies to: 246-246, 261-261, 272-272, 314-314, 616-616

app/stacks/InsideStack.tsx (1)

63-63: Route registration looks correct.

Import + screen added to E2EEnterYourPassword stack aligns with types.

Also applies to: 293-294

app/stacks/types.ts (1)

272-275: Type addition is correct.

The new route is properly typed for navigation.

app/views/E2EResetYourPasswordView.tsx (1)

28-29: Confirm RN version supports gap in styles.

gap requires modern RN. If unsupported, replace with margin spacers.

Would you confirm the app’s RN version? If <0.71, I’ll suggest a compatible spacing refactor.

app/views/E2EEnterYourPasswordView.tsx (3)

118-131: Use handleSubmit on onSubmitEditing for consistency.

Directly calling submit skips react-hook-form’s submission path. Use handleSubmit here as you did on the button.

[ suggest_optional_refactor ]

-						onSubmitEditing={submit}
+						onSubmitEditing={handleSubmit(submit)}

83-87: Confirm toast on closing without enabling E2EE.

This shows e2ee_disabled whenever the screen is not focused and encryption isn’t enabled (e.g., closing with Do it later). If that’s noisy UX, gate it behind an explicit “dismissed” action.


32-37: Gap OK — repo uses [email protected]

gap/rowGap/columnGap were added in RN 0.71 (number/pixel values supported); your use gap: 32 is supported. Percentage gaps require RN 0.75+ and the New Architecture. (reactnative.dev)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (9)
app/i18n/locales/te-IN.json (4)

226-226: Polish phrasing for button label

Prefer polite/imperative for consistency across UI: use “తర్వాత చేయండి”.

-  "Do_it_later": "తర్వాత చెయ్యి",
+  "Do_it_later": "తర్వాత చేయండి",

250-250: Unify “password” term spelling within Telugu locale

Elsewhere this file uses “పాస్‌వర్డ్”; align this key to match.

-  "E2EE_password": "E2EE పాస్వర్డ్",
+  "E2EE_password": "E2EE పాస్‌వర్డ్",

265-265: Use consistent term for “encryption”

Other keys use “ఎన్క్రిప్షన్”; align label for consistency.

-  "Enable_encryption_button_label": "గూఢీకరణను ప్రారంభించు",
+  "Enable_encryption_button_label": "ఎన్క్రిప్షన్‌ను ప్రారంభించండి",

319-319: Clarify prompt with possessive

Add “మీ” for natural phrasing.

-  "Forgot_E2EE_password": "E2EE పాస్‌వర్డ్ మర్చిపోయారా?",
+  "Forgot_E2EE_password": "మీ E2EE పాస్‌వర్డ్ మర్చిపోయారా?",
app/i18n/locales/pt-PT.json (5)

138-138: Short, button-friendly phrasing

Prefer “Fazer mais tarde” (concise, neutral).

-  "Do_it_later": "Faça isso mais tarde",
+  "Do_it_later": "Fazer mais tarde",

145-148: Normalize to pt‑PT style (avoid “você”, improve flow)

Update to pt‑PT register and grammar.

-  "E2E_How_It_Works_info2": "Isto é  *criptografia ponto a ponto* portanto a chave para codificar/descodificar as suas mensagens não será salva no servidor. Por essa razão *você precisa armazenar esta palavra-passe em algum lugar seguro* que você posa aceder mais tarde, se precisar.",
+  "E2E_How_It_Works_info2": "Isto é *encriptação ponto a ponto*; a chave para codificar/descodificar as suas mensagens não é guardada no servidor. Por essa razão, *deve guardar esta palavra‑passe num local seguro* ao qual possa aceder mais tarde, se necessário.",
-  "E2E_How_It_Works_info3": "Se você prosseguir, uma palavra-passe E2E será gerada automaticamente.",
+  "E2E_How_It_Works_info3": "Se prosseguir, será gerada automaticamente uma palavra‑passe E2E.",
-  "E2E_How_It_Works_info4": "Você também pode configurar uma nova palavra-passe para sua chave de criptografia a qualquer momento a partir de qualquer navegador que você tenha inserido a palavra-passe existente do E2E.",
+  "E2E_How_It_Works_info4": "Também pode definir uma nova palavra‑passe para a sua chave de encriptação a qualquer momento, em qualquer navegador onde tenha introduzido a palavra‑passe E2E existente.",

162-162: Orthography consistency (“Activar” vs “Ativar”)

File mixes “Activar/Desactivado” elsewhere; align this key accordingly or standardize the entire file to the 1990 AO form. Suggest aligning to current file usage here.

-  "Enable_encryption_button_label": "Ativar encriptação",
+  "Enable_encryption_button_label": "Activar encriptação",

Please confirm whether the project prefers pre‑AO (“Activar/Desactivar”) or AO90 (“Ativar/Desativar”) and standardize across keys accordingly. Based on learnings


171-171: Natural pt‑PT phrasing

“deve ser introduzida” reads better than “precisa ser introduzida”.

-  "Enter_E2EE_Password_description": "Introduza a sua palavra-passe E2EE para ver e enviar mensagens encriptadas.\n\nA palavra-passe precisa ser introduzida em cada dispositivo.",
+  "Enter_E2EE_Password_description": "Introduza a sua palavra‑passe E2EE para ver e enviar mensagens encriptadas.\n\nA palavra‑passe deve ser introduzida em cada dispositivo.",

404-404: Article placement and hyphenation

Slightly more natural ordering.

-  "Reset_E2EE_Password": "Repor Palavra-passe de E2EE",
+  "Reset_E2EE_Password": "Repor a palavra‑passe E2EE",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5028210 and b4e7f40.

📒 Files selected for processing (4)
  • .maestro/tests/E2EEncryption/enter-e2ee-encryption.yaml (1 hunks)
  • app/i18n/locales/pt-PT.json (8 hunks)
  • app/i18n/locales/te-IN.json (6 hunks)
  • app/views/E2EResetYourPasswordView.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .maestro/tests/E2EEncryption/enter-e2ee-encryption.yaml
🧰 Additional context used
🧬 Code graph analysis (1)
app/views/E2EResetYourPasswordView.tsx (5)
app/stacks/types.ts (1)
  • E2EEnterYourPasswordStackParamList (272-275)
app/theme.tsx (1)
  • useTheme (29-29)
app/lib/methods/helpers/info.ts (2)
  • showConfirmationAlert (30-54)
  • showErrorAlert (5-6)
app/lib/methods/helpers/log/index.ts (1)
  • logEvent (35-42)
app/lib/services/index.ts (1)
  • Services (4-7)
🔇 Additional comments (9)
app/views/E2EResetYourPasswordView.tsx (2)

61-63: Cancel must pop only the current screen

navigation.getParent()?.goBack() dismisses the whole parent stack, so “Cancel” closes the modal instead of returning to Enter Password.

-	const cancel = () => {
-		navigation.getParent()?.goBack();
-	};
+	const cancel = () => {
+		navigation.goBack();
+	};

79-80: Reset view still shows “Enter password” copy

This screen needs the reset-specific description; reusing the enter-password text violates the design requirement.

-					<Text style={[styles.info, { color: colors.fontDefault }]}>{I18n.t('Enter_E2EE_Password_description')}</Text>
+					<Text style={[styles.info, { color: colors.fontDefault }]}>{I18n.t('E2E_encryption_reset_description')}</Text>
app/i18n/locales/te-IN.json (1)

277-277: Resolved prior {{E2EE}} issue; minor Telugu orthography nits

The interpolation token was removed. Recommend small phrasing fixes.

-  "Enter_E2EE_Password_description": "ఎన్‌క్రిప్ట్ చేయబడిన సందేశాలను వీక్షించడానికి మరియు పంపడానికి మీ E2EE పాస్‌వర్డ్‌ని నమోదు చెయ్యండి.\n\nప్రతీ పరికరంలో పాస్‌వర్డ్‌ని నమోదు చేయాల్సి ఉంటుంది.",
+  "Enter_E2EE_Password_description": "ఎన్‌క్రిప్ట్ చేయబడిన సందేశాలను వీక్షించడానికి మరియు పంపడానికి మీ E2EE పాస్‌వర్డ్‌ను నమోదు చేయండి.\n\nప్రతి పరికరంలో పాస్‌వర్డ్‌ను నమోదు చేయాలి.",
app/i18n/locales/pt-PT.json (6)

85-85: LGTM: term standardized

“Código ou palavra-passe inválidos” looks correct for pt-PT.


206-206: LGTM

Correct and idiomatic: “Esqueceu-se da palavra-passe E2EE?”


226-226: LGTM

Good pt‑PT phrasing: “Guardei a minha palavra‑passe E2E”.


489-489: LGTM

Certificate prompt reads correctly for pt‑PT.


90-90: pt‑PT possessive: “a sua” (and avoid duplicate keys clash)

Use “a sua” for pt‑PT; also prefer keeping only one of Confirm_password/Confirm_Password for consistency.

-  "Confirm_Password": "Confirme sua palavra-passe",
+  "Confirm_Password": "Confirme a sua palavra-passe",

502-502: pt‑PT possessive

Use “A sua” instead of Brazilian “Sua”.

-  "Your_Password_Must_Have": "Sua palavra-passe deve ter:"
+  "Your_Password_Must_Have": "A sua palavra‑passe deve ter:",

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
app/views/E2EEnterYourPasswordView.tsx (2)

78-81: Don’t perform navigation/toast side-effects during render

Calling displayEncryptionEnabled() in render can fire twice under StrictMode and cause unstable behavior. Move it into an effect tied to encryptionEnabled.

Apply this diff:

-	if (encryptionEnabled) {
-		displayEncryptionEnabled();
-	}
+	useEffect(() => {
+		if (encryptionEnabled) {
+			displayEncryptionEnabled();
+		}
+	}, [encryptionEnabled, displayEncryptionEnabled]);

103-110: Incorrect accessibility announcement message

Announcing 'Invalid_URL' on E2EE password failure is misleading. Announce the incorrect password error instead.

-			AccessibilityInfo.announceForAccessibility(I18n.t('Invalid_URL'));
+			AccessibilityInfo.announceForAccessibility(I18n.t('Error_incorrect_password'));
🧹 Nitpick comments (4)
app/views/E2EEnterYourPasswordView.tsx (4)

83-94: Blur toast logic is brittle; avoid route-inspection

Relying on navigation.getState().routes to detect “navigating to reset” is fragile. Use a local ref set on the “Forgot password” button, then read it in the blur cleanup.

Apply this diff to the effect:

 useFocusEffect(
-		useCallback(
-			() => () => {
-				const navigatingToResetPassword = navigation.getState().routes.some(route => route.name === 'E2EResetYourPasswordView');
-
-				if (!encryptionEnabled && !navigatingToResetPassword) {
-					showToast(I18n.t('e2ee_disabled'));
-				}
-			},
-			[navigation, encryptionEnabled]
-		)
+		useCallback(
+			() => () => {
+				if (!encryptionEnabled && !navigatedToResetRef.current) {
+					showToast(I18n.t('e2ee_disabled'));
+				}
+				navigatedToResetRef.current = false;
+			},
+			[encryptionEnabled]
+		)
 	);

And update the “Forgot password” button handler:

-						<Button
+						<Button
 							type='secondary'
-							onPress={() => navigation.navigate('E2EResetYourPasswordView')}
+							onPress={() => {
+								navigatedToResetRef.current = true;
+								navigation.navigate('E2EResetYourPasswordView');
+							}}
 							title={I18n.t('Forgot_E2EE_password')}
 							testID='e2e-enter-your-password-view-forgot-password'
 							style={styles.forgotE2EEPasswordButton}
 						/>

Add this ref near other refs:

const navigatedToResetRef = useRef(false);

32-34: Verify React Native support for style “gap”

gap is only supported on newer RN versions; older versions ignore it (no spacing). Confirm RN version supports it across iOS/Android. If not, replace with explicit spacing (e.g., wrap groups and apply marginTop or insert spacers).


132-135: Use handleSubmit on keyboard submit for consistency

Ensure the same submit flow/validation runs when using the keyboard submit.

-						onSubmitEditing={submit}
+						onSubmitEditing={handleSubmit(submit)}

122-125: Prefer style arrays to avoid object spreads in JSX

This reduces re-renders from new object identities and follows common RN patterns.

-				contentContainerStyle={{ ...sharedStyles.containerScrollView }}>
-				<SafeAreaView style={{ ...styles.content, backgroundColor: colors.surfaceRoom }} testID='e2e-enter-your-password-view'>
+				contentContainerStyle={sharedStyles.containerScrollView}>
+				<SafeAreaView style={[styles.content, { backgroundColor: colors.surfaceRoom }]} testID='e2e-enter-your-password-view'>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b4e7f40 and 1686600.

📒 Files selected for processing (1)
  • app/views/E2EEnterYourPasswordView.tsx (5 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
app/views/E2EEnterYourPasswordView.tsx (4)
app/stacks/types.ts (1)
  • E2EEnterYourPasswordStackParamList (272-275)
app/lib/methods/helpers/showToast.ts (1)
  • showToast (4-4)
app/containers/TextInput/ControlledFormTextInput.tsx (1)
  • ControlledFormTextInput (11-19)
app/containers/List/List.stories.tsx (1)
  • Separator (64-68)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ESLint and Test / run-eslint-and-test
🔇 Additional comments (2)
app/views/E2EEnterYourPasswordView.tsx (2)

43-48: Typed navigation prop looks good

Switch to typed navigation via NativeStackNavigationProp improves safety and clarity.


141-146: Primary action wiring LGTM

handleSubmit(submit) wiring and i18n/title/testID look consistent.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (3)
app/i18n/locales/hu.json (1)

232-232: Prefer more idiomatic Hungarian for the CTA

UI buttons usually avoid the prefixed "Csak" formulation. Suggest using a shorter, natural imperative such as "Majd később".

-"Do_it_later": "Csak később tedd meg",
+"Do_it_later": "Majd később",
app/i18n/locales/de.json (1)

277-277: Verify consistent line break formatting in description.

The updated German translation uses \n\n for line breaks while other locales use a single \n. Consider aligning the formatting for consistency across locales.

-  "Enter_E2EE_Password_description": "Geben Sie Ihr E2EE-Passwort ein, um verschlüsselte Nachrichten anzuzeigen und zu senden.\n\nDas Passwort muss auf jedem Gerät eingegeben werden.",
+  "Enter_E2EE_Password_description": "Geben Sie Ihr E2EE-Passwort ein, um verschlüsselte Nachrichten anzuzeigen und zu senden.\nDas Passwort muss auf jedem Gerät eingegeben werden.",
app/views/E2EEnterYourPasswordView.tsx (1)

86-86: Consider extracting route name as a constant.

The hard-coded route name 'E2EResetYourPasswordView' could be extracted to a constant to maintain consistency with the navigation call on Line 148.

Consider defining route names as constants:

// At the top of the file or in a separate constants file
const ROUTES = {
  E2E_RESET_PASSWORD: 'E2EResetYourPasswordView'
} as const;

// Then use it consistently:
const navigatingToResetPassword = navigation.getState().routes.some(route => route.name === ROUTES.E2E_RESET_PASSWORD);
// And in the navigation call:
onPress={() => navigation.navigate(ROUTES.E2E_RESET_PASSWORD)}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1686600 and a9e8fbc.

📒 Files selected for processing (26)
  • app/i18n/locales/ar.json (6 hunks)
  • app/i18n/locales/bn-IN.json (6 hunks)
  • app/i18n/locales/cs.json (6 hunks)
  • app/i18n/locales/de.json (6 hunks)
  • app/i18n/locales/en.json (6 hunks)
  • app/i18n/locales/es.json (4 hunks)
  • app/i18n/locales/fi.json (6 hunks)
  • app/i18n/locales/fr.json (6 hunks)
  • app/i18n/locales/hi-IN.json (6 hunks)
  • app/i18n/locales/hu.json (6 hunks)
  • app/i18n/locales/it.json (6 hunks)
  • app/i18n/locales/ja.json (6 hunks)
  • app/i18n/locales/nl.json (6 hunks)
  • app/i18n/locales/nn.json (5 hunks)
  • app/i18n/locales/no.json (6 hunks)
  • app/i18n/locales/pt-BR.json (6 hunks)
  • app/i18n/locales/pt-PT.json (8 hunks)
  • app/i18n/locales/ru.json (6 hunks)
  • app/i18n/locales/sl-SI.json (6 hunks)
  • app/i18n/locales/sv.json (6 hunks)
  • app/i18n/locales/ta-IN.json (6 hunks)
  • app/i18n/locales/te-IN.json (6 hunks)
  • app/i18n/locales/tr.json (6 hunks)
  • app/i18n/locales/zh-CN.json (6 hunks)
  • app/i18n/locales/zh-TW.json (6 hunks)
  • app/views/E2EEnterYourPasswordView.tsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
  • app/i18n/locales/te-IN.json
  • app/i18n/locales/no.json
  • app/i18n/locales/ja.json
  • app/i18n/locales/fr.json
  • app/i18n/locales/tr.json
  • app/i18n/locales/sv.json
  • app/i18n/locales/nn.json
  • app/i18n/locales/es.json
  • app/i18n/locales/zh-CN.json
  • app/i18n/locales/cs.json
  • app/i18n/locales/sl-SI.json
👮 Files not reviewed due to content moderation or server errors (7)
  • app/i18n/locales/ta-IN.json
  • app/i18n/locales/ar.json
  • app/i18n/locales/ru.json
  • app/i18n/locales/fi.json
  • app/i18n/locales/bn-IN.json
  • app/i18n/locales/nl.json
  • app/i18n/locales/zh-TW.json
🧰 Additional context used
🧬 Code graph analysis (1)
app/views/E2EEnterYourPasswordView.tsx (4)
app/stacks/types.ts (1)
  • E2EEnterYourPasswordStackParamList (272-275)
app/lib/methods/helpers/showToast.ts (1)
  • showToast (4-4)
app/containers/TextInput/ControlledFormTextInput.tsx (1)
  • ControlledFormTextInput (11-19)
app/containers/List/List.stories.tsx (1)
  • Separator (64-68)
🔇 Additional comments (18)
app/i18n/locales/it.json (1)

243-243: Fix Italian auxiliary in forgot-password prompt

Current string drops the auxiliary verb, so it reads awkwardly. Please adjust the translation to a full interrogative form.

-  "Forgot_E2EE_password": "Dimenticato la password E2EE?",
+  "Forgot_E2EE_password": "Hai dimenticato la password E2EE?",

Likely an incorrect or invalid review comment.

app/i18n/locales/hu.json (5)

256-256: Terminology consistency looks good

Keeps the “E2EE” term intact, matching other locales.


271-271: CTA translation aligns with Hungarian UX phrasing

"A titkosítás engedélyezése" is clear and action-oriented.


283-283: Description reads naturally

Sentence structure and punctuation work well in Hungarian while preserving the original meaning.


325-325: Question form matches the source

The translation mirrors the English prompt cleanly.


634-634: Reset action translation is clear

Accurately conveys the reset action without ambiguity.

app/i18n/locales/de.json (1)

227-227: LGTM! German translations added correctly.

The new E2EE-related German translations are consistent with the PR objectives and match the keys added in other locale files.

Also applies to: 251-251, 266-266, 319-319, 621-621

app/i18n/locales/en.json (2)

256-256: LGTM! English translations properly defined.

All new E2EE-related keys are correctly added and align with the PR objectives for improving the E2EE password reset flow.

Also applies to: 283-283, 299-299, 364-364, 705-705


319-319: Description accurately reflects per-device password requirement.

The updated description clearly communicates that the E2EE password needs to be entered on each device, which is essential for users to understand.

app/i18n/locales/pt-BR.json (2)

253-253: LGTM! Portuguese (Brazil) translations correctly added.

All E2EE-related translations are properly localized and consistent with the feature implementation.

Also applies to: 278-278, 294-295, 355-355, 690-690


310-310: Brazilian Portuguese translation maintains clear messaging.

The updated description appropriately conveys the per-device password requirement in Portuguese.

app/i18n/locales/hi-IN.json (2)

232-232: LGTM! Hindi translations properly localized.

The Hindi translations for E2EE features are well-localized and culturally appropriate.

Also applies to: 256-256, 271-271, 325-325, 633-633


283-283: Hindi translation clearly communicates E2EE password requirements.

The updated description properly explains the per-device password entry requirement in Hindi.

app/views/E2EEnterYourPasswordView.tsx (3)

43-46: Good addition of proper TypeScript interface for navigation prop.

The explicit typing of the navigation prop improves type safety and makes the component's dependencies clear.


83-94: Smart use of useFocusEffect for conditional toast notifications.

The implementation correctly checks if the user is navigating to the reset password view before showing the "E2EE disabled" toast, preventing confusing notifications during the reset flow.


141-153: Well-structured button layout for E2EE actions.

The button arrangement with primary "Enable encryption" and secondary "Forgot E2EE password?" follows good UX patterns, making the reset option discoverable without being prominent.

app/i18n/locales/pt-PT.json (2)

175-175: Use pt-PT verb “Introduza” instead of “Digite”

Line 175 still reads “Digite a palavra-passe E2EE”. We previously asked to switch Brazilian “Digite” to the pt-PT “Introduza”, but it hasn’t been updated yet.

-  "Enter_E2EE_Password": "Digite a palavra-passe E2EE",
+  "Enter_E2EE_Password": "Introduza a palavra-passe E2EE",

212-212: Keep the E2EE label consistent (missing an “E”)

Line 212 now renders “Esqueceu-se da palavra-passe E2E?”, dropping one “E”. The UI label should stay aligned with the feature’s name (“E2EE”). Please update the translation.

-  "Forgot_E2EE_password": "Esqueceu-se da palavra-passe E2E?",
+  "Forgot_E2EE_password": "Esqueceu-se da palavra-passe E2EE?",

Likely an incorrect or invalid review comment.

navigation: NativeStackNavigationProp<E2EEnterYourPasswordStackParamList, 'E2EResetYourPasswordView'>;
}

const E2EResetYourPasswordView = ({ navigation }: IE2EResetYourPasswordView): React.ReactElement => {
Copy link
Member

Choose a reason for hiding this comment

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

Are we intentionally duplicating this flow?
If you didn't discuss that with design, I'd say this is wrong.

I think they actually wanted to redirect to E2EEEncryptionSecurityView. Not create a new screen.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a9e8fbc and 1ce13f0.

📒 Files selected for processing (4)
  • app/stacks/MasterDetailStack/index.tsx (2 hunks)
  • app/stacks/MasterDetailStack/types.ts (1 hunks)
  • app/views/E2EEnterYourPasswordView.tsx (5 hunks)
  • app/views/E2EResetYourPasswordView.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
app/views/E2EResetYourPasswordView.tsx (5)
app/stacks/types.ts (1)
  • E2EEnterYourPasswordStackParamList (272-275)
app/theme.tsx (1)
  • useTheme (29-29)
app/lib/methods/helpers/info.ts (2)
  • showConfirmationAlert (30-54)
  • showErrorAlert (5-6)
app/lib/methods/helpers/log/index.ts (1)
  • logEvent (35-42)
app/lib/services/restApi.ts (1)
  • e2eResetOwnKey (943-949)
app/views/E2EEnterYourPasswordView.tsx (4)
app/stacks/types.ts (1)
  • E2EEnterYourPasswordStackParamList (272-275)
app/lib/methods/helpers/showToast.ts (1)
  • showToast (4-4)
app/containers/TextInput/ControlledFormTextInput.tsx (1)
  • ControlledFormTextInput (11-19)
app/containers/List/List.stories.tsx (1)
  • Separator (64-68)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: E2E Build Android / android-build
  • GitHub Check: ESLint and Test / run-eslint-and-test
🔇 Additional comments (5)
app/views/E2EResetYourPasswordView.tsx (2)

61-63: Cancel must only pop the reset screen

navigation.getParent()?.goBack() dismisses the parent navigator, so tapping Cancel closes the whole modal flow instead of returning to the password prompt. Please revert to popping just the current screen.

- const cancel = () => {
- 	navigation.getParent()?.goBack();
- };
+ const cancel = () => {
+ 	navigation.goBack();
+ };

79-79: Reset screen still shows Enter-password copy

The reset UI is still rendering Enter_E2EE_Password_description, so users see the wrong guidance. Please switch to the reset-specific copy that was added for this flow (and keep the new testID naming aligned with it).

-					<Text style={[styles.info, { color: colors.fontDefault }]}>{I18n.t('Enter_E2EE_Password_description')}</Text>
+					<Text style={[styles.info, { color: colors.fontDefault }]}>{I18n.t('E2E_encryption_reset_description')}</Text>
app/stacks/MasterDetailStack/index.tsx (2)

62-62: Hooking the reset screen into the stack looks good.

Importing E2EResetYourPasswordView here keeps the modal wiring consistent with the rest of the flow.


190-190: New modal route registration is spot on.

This keeps the reset screen discoverable from the existing E2EE password flow without disturbing other routes.

app/stacks/MasterDetailStack/types.ts (1)

194-194: Type registration matches the new screen.

Updating ModalStackParamList ensures the new reset route remains type-safe across navigation usage.

Comment on lines +148 to +152
type='secondary'
onPress={() => navigation.navigate('E2EResetYourPasswordView')}
title={I18n.t('Forgot_E2EE_password')}
testID='e2e-enter-your-password-view-forgot-password'
style={styles.forgotE2EEPasswordButton}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Forgot-password flow must route to Security → E2E settings

CORE-1316 calls for “Forgot E2EE password?” to send users to My Account → Settings → Security & privacy → End-to-end encryption. Creating a parallel reset screen breaks that requirement and bypasses the existing settings flow (which already handles edge cases like 2FA). Please navigate to the E2EEncryptionSecurityView instead (you’ll need to adjust the navigation typing accordingly).

-						<Button
-							type='secondary'
-							onPress={() => navigation.navigate('E2EResetYourPasswordView')}
-							title={I18n.t('Forgot_E2EE_password')}
-							testID='e2e-enter-your-password-view-forgot-password'
-							style={styles.forgotE2EEPasswordButton}
-						/>
+						<Button
+							type='secondary'
+							onPress={() => navigation.navigate('E2EEncryptionSecurityView')}
+							title={I18n.t('Forgot_E2EE_password')}
+							testID='e2e-enter-your-password-view-forgot-password'
+							style={styles.forgotE2EEPasswordButton}
+						/>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type='secondary'
onPress={() => navigation.navigate('E2EResetYourPasswordView')}
title={I18n.t('Forgot_E2EE_password')}
testID='e2e-enter-your-password-view-forgot-password'
style={styles.forgotE2EEPasswordButton}
<Button
type='secondary'
onPress={() => navigation.navigate('E2EEncryptionSecurityView')}
title={I18n.t('Forgot_E2EE_password')}
testID='e2e-enter-your-password-view-forgot-password'
style={styles.forgotE2EEPasswordButton}
/>
🤖 Prompt for AI Agents
In app/views/E2EEnterYourPasswordView.tsx around lines 148-152 the "Forgot E2EE
password?" button currently navigates to 'E2EResetYourPasswordView', which
bypasses the Settings → Security & privacy → End-to-end encryption flow; change
the onPress navigation target to 'E2EEncryptionSecurityView' instead and update
any navigation prop typing/imports to include that route so TypeScript
recognizes it (adjust the screen name in the navigator types or union for this
component). Ensure the testID remains appropriate or rename it to match the new
target if your test suite expects the settings flow.

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