Skip to content

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

Open
MelvinBot wants to merge 1 commit into
mainfrom
claude-walletBgAfterRevealReload
Open

Fix: restore Wallet background for missing personal details RHP after reload#95363
MelvinBot wants to merge 1 commit into
mainfrom
claude-walletBgAfterRevealReload

Conversation

@MelvinBot

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 added a unit-test-covered area (existing navigation suite validates the linking config; all pass)

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 👍 / 👎.

@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)

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.

3 participants