Skip to content

Fix: restore Wallet background for missing personal details RHP after reload#95363

Merged
chuckdries merged 1 commit into
mainfrom
claude-walletBgAfterRevealReload
Jul 7, 2026
Merged

Fix: restore Wallet background for missing personal details RHP after reload#95363
chuckdries merged 1 commit into
mainfrom
claude-walletBgAfterRevealReload

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Deploy blocker fix for #95362.

When the missing-personal-details flow is opened as an RHP from the Wallet (e.g. Settings → Wallet → virtual card → Reveal, introduced in #91634), reloading the browser while the RHP is open changed the background page from Wallet to the Inbox.

Root cause: on reload the navigation state is rebuilt from the URL. getMatchingFullScreenRoute determines which full-screen page belongs behind an RHP by looking the RHP screen up in the RHP_TO_* relation maps (derived from the *_TO_RHP maps). SCREENS.MISSING_PERSONAL_DETAILS / SCREENS.MISSING_PERSONAL_DETAILS_CONFIRM_MAGIC_CODE were not present in any of those maps and the route carries no backTo param, so the lookup returned undefined and the background fell back to the default HOME (Inbox).

Fix: register both screens under SCREENS.SETTINGS.WALLET.ROOT in SETTINGS_TO_RHP.ts, matching every other Wallet-launched RHP (e.g. DOMAIN_CARD, REPORT_VIRTUAL_CARD_FRAUD). RHP_TO_SETTINGS is the inverse of this map, so the Wallet page is now correctly restored as the background after reload.

Fixed Issues

$ #95362
PROPOSAL: #95362 (comment)

Tests

  1. Sign in as a US Expensify Card holder with a virtual card and incomplete personal details.
  2. Go to Settings → Wallet → virtual card → tap Reveal.
  3. Verify the "Add personal details" RHP opens over the Wallet page.
  4. Reload the browser while the RHP is open.
  5. Verify the background page is still Wallet (not Inbox).
  • Verify that no errors appear in the JS console

Automated checks run by MelvinBot on this change:

  • npm run typecheck-tsgo — passed
  • oxfmt (npm run fmt) — clean
  • Navigation test suite (tests/navigation + DeeplinkRouteNormalizationTest) — 429 passed

Offline tests

Same as Tests (navigation/linking behavior is not network-dependent).

QA Steps

  1. On staging, sign in as a US Expensify Card holder with a virtual card and incomplete personal details.
  2. Settings → Wallet → virtual card → tap Reveal to open the missing personal details flow.
  3. Reload the page while the flow is open.
  4. Verify the background page remains Wallet.
  5. Regression: repeat opening the flow from the Home "Add personal details" time-sensitive card and confirm reveal/navigation still work.
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

N/A — navigation linking config change; behavior verified via the navigation unit-test suite.

…eload

Co-authored-by: DylanDylann <DylanDylann@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team July 6, 2026 07:40
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created this PR from an upstream branch since I don't have push access to your fork.

To take ownership of this branch and be able to push updates from your fork, run:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-walletBgAfterRevealReload
git checkout -b claude-walletBgAfterRevealReload upstream/claude-walletBgAfterRevealReload
git push -u origin claude-walletBgAfterRevealReload

Then you can close this PR and open a new one from your fork. Otherwise, feel free to push directly to this upstream branch if you have access.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The only failing check is PR Author Checklist / checklist — and there's nothing in the code to fix.

It fails because the checklist section of the PR body is incomplete (the workflow reports 2 out of 41 checklist items completed). That's a human-only checklist — I'm not allowed to tick those boxes on your behalf, so this one clears once you (as co-author) fill it out before marking the PR "Ready for review".

Everything else is green or still running:

  • Passing: ESLint, Oxfmt, typecheck-adjacent lints, Bun tests, spellcheck, React Compiler, unused-styles, builds (Debug), validate, CLA, snyk.
  • Pending (not failed): test (jobs 1–8), typecheck, Storybook, knip, perf tests, native builds — these were still running at the time I checked.

No code change is warranted here, so I haven't pushed anything. If the pending jobs above actually fail once they finish, re-tag me and I'll dig into those specifically.

@DylanDylann

Copy link
Copy Markdown
Contributor

@MelvinBot Mark the PR ready

@MelvinBot
MelvinBot marked this pull request as ready for review July 6, 2026 10:50
@MelvinBot
MelvinBot requested a review from a team as a code owner July 6, 2026 10:50
@melvin-bot
melvin-bot Bot requested review from a team, Pujan92 and joekaufmanexpensify and removed request for a team July 6, 2026 10:50
@melvin-bot

melvin-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

@Pujan92 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Done — PR #95363 is now marked as Ready for review.

@melvin-bot
melvin-bot Bot requested review from heyjennahay and removed request for a team July 6, 2026 10:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d289cb1d12

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +71 to +72
SCREENS.MISSING_PERSONAL_DETAILS,
SCREENS.MISSING_PERSONAL_DETAILS_CONFIRM_MAGIC_CODE,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep home-launched details flows on Home after reload

When the missing-personal-details RHP is opened from the Home time-sensitive card or issue card (AddVirtualCardPersonalDetails.tsx:31, IssueCardMessage.tsx:63), the URL still has no backTo parameter, so after a browser reload getMatchingFullScreenRoute() will now hit this new RHP_TO_SETTINGS entry and rebuild Settings > Wallet behind the RHP instead of preserving Home. This fixes the Wallet entry point but regresses the existing Home-launched flow; the mapping needs a way to distinguish Wallet launches from Home/default launches rather than assigning this screen globally to Wallet.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Expected

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Re-checked — nothing to fix in the code. The two remaining checklist failures are both human-only checklists:

  • PR Author Checklist / checklist — fails until the author checklist boxes in the PR body are filled out.
  • PR Reviewer Checklist / checklist — fails until a reviewer completes their checklist.

I'm not permitted to tick either of those on a human's behalf, so they clear through the normal review flow, not a code push. Every other check (tests, typecheck, builds, lint, etc.) is now green, so I haven't pushed any changes.

@Pujan92

Pujan92 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@DylanDylann do I need to review this?

@DylanDylann

Copy link
Copy Markdown
Contributor

Let's wait until @chuckdries responds to my comment in the issue: #95362 (comment)

@chuckdries

Copy link
Copy Markdown
Contributor

Thank you for your prompt attention @Pujan92, but this is a tiny change, so we'll be fine if Dylann checklists and I'll do the final approval

@chuckdries
chuckdries removed the request for review from Pujan92 July 6, 2026 15:46

@joekaufmanexpensify joekaufmanexpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good for product.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

There's no code to fix here — every automated check (tests, typecheck, ESLint, Oxfmt, builds, perf) is passing. The only two red checks are human-only checklists, which I'm not permitted to complete on anyone's behalf:

  • PR Author Checklist / checklist — fails until the author-checklist boxes in the PR body are filled in.
  • PR Reviewer Checklist / checklist — fails with No PR Reviewer Checklist was found; it clears once a reviewer pastes and completes the Reviewer Checklist in a comment.

Per the thread, chuckdries said you'll checklist and he'll do the final approval — so once you (DylanDylann) post/complete the reviewer checklist and the author checklist is filled out, both checks go green. Nothing for me to push.

@DylanDylann

DylanDylann commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

MacOS: Chrome / Safari
Screen.Recording.2026-07-07.at.12.43.55.mov

Comment on lines +71 to +72
SCREENS.MISSING_PERSONAL_DETAILS,
SCREENS.MISSING_PERSONAL_DETAILS_CONFIRM_MAGIC_CODE,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Expected

@melvin-bot
melvin-bot Bot requested a review from chuckdries July 7, 2026 05:44
@DylanDylann

Copy link
Copy Markdown
Contributor

@chuckdries All yours

@chuckdries
chuckdries merged commit 85d9ac3 into main Jul 7, 2026
44 of 47 checks passed
@chuckdries
chuckdries deleted the claude-walletBgAfterRevealReload branch July 7, 2026 20:27
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🚧 chuckdries has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #95363.

Android 🤖 iOS 🍎
https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-android-Adhoc-85d9ac34f37-c9ce36c-4ad48d017eb740b24a2e055becb79e41f5cf4593/index.html ❌ FAILED ❌
Android The QR code can't be generated, because the iOS build failed
Web 🕸️
https://95363.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@OSBotify

OSBotify commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/chuckdries in version: 9.4.32-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 No help site changes required.

I reviewed the changes in this PR against Expensify's help site files under docs/articles.

This PR is a navigation-linking config fix — it adds MISSING_PERSONAL_DETAILS and MISSING_PERSONAL_DETAILS_CONFIRM_MAGIC_CODE to the Wallet root in SETTINGS_TO_RHP.ts so the Wallet page is correctly restored as the background behind the RHP after a browser reload (instead of falling back to the Inbox).

There is no user-facing change here:

  • No new feature, page, button, or UI copy
  • No changed feature names, tab names, or settings labels
  • No workflow or product-behavior change a user would follow in the help site

This purely corrects internal navigation-state restoration, which is not documented in docs/articles. Accordingly, I did not create a draft docs PR.

If you believe a specific help article should be updated anyway, let me know which flow/article and I'll take another pass.

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #95720 was identified to be related to this PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.4.32-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

7 participants