Skip to content

[BT-152] Migrate Settings - Security/Wallet/Subscription #83363

Closed

Description

@mjasikowski

Description

Current State:

  • 6 routes across Security, Wallet, and Subscription settings
  • These routes use backTo parameter for return navigation

Implementation:

  • Replace getRoute(..., backTo) with createDynamicRoute()
  • Add source screens to entryScreens array
  • Remove backTo parameter from route definitions
  • Test forward/back navigation

Scope

Routes (6):

Route Constant Path
SETTINGS_MERGE_ACCOUNTS_RESULT settings/security/merge-accounts/:login/result/:result
SETTINGS_DELEGATE_ROLE settings/security/delegate/:login/role/:role
SETTINGS_ADD_BANK_ACCOUNT settings/wallet/add-bank-account
SETTINGS_ADD_BANK_ACCOUNT_VERIFY_ACCOUNT settings/wallet/add-bank-account/verify-account
SETTINGS_SUBSCRIPTION settings/subscription
SETTINGS_SUBSCRIPTION_DOWNGRADE_BLOCKED settings/subscription/downgrade-blocked

Usages

SETTINGS_MERGE_ACCOUNTS_RESULT:

  • src/pages/settings/Security/SecuritySettingsPage.tsx:158
  • src/pages/settings/Security/MergeAccounts/AccountValidatePage.tsx:117,126,139
  • src/pages/settings/Security/MergeAccounts/AccountDetailsPage.tsx:106,122

SETTINGS_DELEGATE_ROLE:

  • src/pages/settings/Security/SecuritySettingsPage.tsx:233
  • src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx:53,75
  • src/pages/settings/Security/AddDelegate/AddDelegatePage.tsx:47

SETTINGS_ADD_BANK_ACCOUNT:

  • src/libs/actions/BankAccounts.ts:126
  • src/pages/workspace/invoices/WorkspaceInvoicesVerifyAccountPage.tsx:14

SETTINGS_ADD_BANK_ACCOUNT_VERIFY_ACCOUNT:

  • Search for usages in bank account flow

SETTINGS_SUBSCRIPTION:

  • src/pages/workspace/upgrade/GenericFeaturesView.tsx:32
  • src/pages/workspace/WorkspaceOverviewPlanTypePage.tsx:121
  • src/pages/settings/Subscription/FreeTrial.tsx:54
  • src/pages/settings/Subscription/CardSection/BillingBanner/EarlyDiscountBanner.tsx:90
  • src/pages/RestrictedAction/Workspace/WorkspaceOwnerRestrictedAction/index.native.tsx:26
  • src/pages/workspace/upgrade/UpgradeIntro.tsx:75
  • src/pages/workspace/upgrade/UpgradeConfirmation.tsx:31

SETTINGS_SUBSCRIPTION_DOWNGRADE_BLOCKED:

  • src/pages/settings/Subscription/SubscriptionPlan/SubscriptionPlanCardActionButton.tsx:70

Files to modify:

  • src/ROUTES.ts - Update route definitions
  • src/libs/Navigation/types.ts - Remove backTo from params
  • Components listed above

Migration Progress

  • SETTINGS_MERGE_ACCOUNTS_RESULT
  • SETTINGS_DELEGATE_ROLE
  • SETTINGS_ADD_BANK_ACCOUNT
  • SETTINGS_ADD_BANK_ACCOUNT_VERIFY_ACCOUNT
  • SETTINGS_SUBSCRIPTION
  • SETTINGS_SUBSCRIPTION_DOWNGRADE_BLOCKED
Issue OwnerCurrent Issue Owner: @suneox

Activity

  1. added
    InternalRequires API changes or must be handled by Expensify staff
    on Feb 24, 2026
  2. changed the title [-][BT-P2-004] Settings - Security/Wallet/Subscription[/-] [+][BT-104] Migrate Settings - Security/Wallet/Subscription[/+] on Feb 24, 2026
  3. huult commented on Feb 26, 2026

    @huult
    Contributor

    Hi @mjasikowski @collectioneur I’m running into a case with SETTINGS_ADD_BANK_ACCOUNT where dynamic routing doesn’t seem to work correctly.

    When we’re on settings/wallet/bank-account-purpose and append to create a dynamic route, the resulting path becomes settings/wallet/bank-account-purpose/add-bank-account, which doesn’t look correct.

    Screen.Recording.2026-02-26.at.23.25.02.mov

    If we instead update it to settings/wallet/add-bank-account, I’m not sure how we would navigate back to the correct page without a backTo parameter. Using goBack() feels risky, I tried it, but I’m still concerned about potential edge cases.

    I checked the documentation but didn’t see this case mentioned. Could you please guide me on how we should handle this scenario?

  4. collectioneur commented on Feb 27, 2026

    @collectioneur
    Contributor

    Hi @huult, great catch! This is one of the few edge cases in the app that might not be fully covered by dynamic routes alone.
    For this specific scenario, a hybrid approach would likely work best. Here is how we could approach it:

    • For instances where add-bank-account can function as a dynamic suffix, we can implement it as a dynamic route.
    • For scenarios where that isn't quite feasible, we could create static routes tailored to each flow, explicitly defining the forward and back navigation paths 😄
  5. huult commented on Feb 27, 2026

    @huult
  6. huult commented on Mar 2, 2026

    @huult
    Contributor

    @collectioneur I saw that you opened a PR for this ticket. Just to confirm, will you be handling it? If so, I’ll work on another ticket.

  7. changed the title [-][BT-104] Migrate Settings - Security/Wallet/Subscription[/-] [+][BT-152] Migrate Settings - Security/Wallet/Subscription[/+] on Mar 2, 2026
  8. collectioneur commented on Mar 2, 2026

    @collectioneur
    Contributor

    @huult I'm going to focus specifically on the /add-bank-account/verify-account route for now, as it’s a perfect test case for validating approach to multi-segment dynamic suffixes. I'm tackling only this particular route, so feel free to start investigating the migration strategy for the remaining routes in this batch 🙂

  9. 49 remaining items

  10. MelvinBot commented on Jun 16, 2026

    @MelvinBot
    Contributor

    ⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai.

    Run details

  11. added
    Skip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.
    on Jun 24, 2026
  12. changed the title [-][BT-152] Migrate Settings - Security/Wallet/Subscription[/-] [+][Due for payment 2026-07-02] [BT-152] Migrate Settings - Security/Wallet/Subscription[/+] on Jun 25, 2026
  13. melvin-bot commented on Jun 25, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  14. melvin-bot commented on Jun 25, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.19-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-07-02. 🎊

    For reference, here are some details about the assignees on this issue:

    • @suneox requires payment through NewDot Manual Requests
    • @huult requires payment through NewDot Manual Requests
  15. melvin-bot commented on Jun 30, 2026

    @melvin-bot

    @suneox Huh... This is 4 days overdue. Who can take care of this?

  16. changed the title [-][Due for payment 2026-07-02] [BT-152] Migrate Settings - Security/Wallet/Subscription[/-] [+][BT-152] Migrate Settings - Security/Wallet/Subscription[/+] on Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DailyKSv2InternalRequires API changes or must be handled by Expensify staffSkip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions