Fix company card export/details RHP background when opened from Members - #99056
Conversation
Co-authored-by: Michał Jasikowski <mjasikowski@users.noreply.github.com>
|
🤖 Android testing blocked — could not exercise the test cases. I couldn't run any of the three test steps because the required precondition can't be set up on this automated test account. This PR's tests need a workspace with a direct company-card feed, a card assigned to a member, and Sage Intacct connected — but creating the first company-card feed requires account validation. Where it blocked: On a fresh account I completed onboarding, created a workspace, and enabled the Company cards feature. Opening Workspace → Company cards → Add cards immediately routed to a "This feature requires you to validate your account" screen asking for a 6‑digit security code emailed to the test account. That inbox isn't accessible to this run, so the flow can't proceed — and without a feed there's no assigned card or export screen to test. Result per test step:
What I got through before the block
To verify this PR on Android, testing needs a pre-provisioned account that already has a direct feed + an assigned company card + Sage Intacct connected (magic-code validation can't be completed here). Alternatively, this is a navigation/route-resolution fix that is straightforward to verify on web with a URL refresh — happy to re-run on web, or on Android against a properly provisioned account, if you can point me at one. |
|
🤖 Web testing blocked — could not exercise the test cases. Same root blocker I hit on Android: this PR's tests need a workspace with a direct company-card feed + a card assigned to a member + Sage Intacct connected, and none of those preconditions can be established on the automated test account. Where it blocked:
Result per test step:
What I got through before the block
To verify this PR, testing needs a pre-provisioned account that already has a direct company-card feed, a card assigned to a member, and Sage Intacct connected — the magic-code account validation can't be cleared in this environment. If you can point me at such an account, I can re-run web or Android. |
|
@ikevin127 @mjasikowski One of you needs to 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] |
|
@huult can you check and review this please? |
|
I will review this PR soon. |
|
@mjasikowski Please check off the author checklist and QA step |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-08-25.at.11.51.02.mov |
|
@mjasikowski could you sync with main? |
|
@MelvinBot merge main |
Could you check this one as well? |
Yes, this is already done |
…ortRhpBackground Co-authored-by: Michał Jasikowski <mjasikowski@users.noreply.github.com>
|
@thesahindia 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] |
|
🤖 Merged |
|
There's no code failure to fix here. The only failing check is Check independent approval (its Every actual CI check is green — tests (jobs 1–8), ESLint, Oxfmt, typecheck, React Compiler, Storybook, Bun tests, and all builds. The perf tests ( So nothing to push — this PR just needs a reviewer approval to turn that last check green. |
| SCREENS.WORKSPACE.DYNAMIC_COMPANY_CARD_DETAILS, | ||
| // For the same reason, the dynamic company-card details/export screens are NOT listed here (or under | ||
| // Company cards): they are shared by Members and Company cards, so their background must be resolved from | ||
| // the URL by the dynamic base-path branch, not pinned to a single central pane. |
There was a problem hiding this comment.
I don't think we need this comment. @mjasikowski, could you remove it?
There was a problem hiding this comment.
@MelvinBot remove this comment:
// For the same reason, the dynamic company-card details/export screens are NOT listed here (or under
// Company cards): they are shared by Members and Company cards, so their background must be resolved from
// the URL by the dynamic base-path branch, not pinned to a single central pane.
Co-authored-by: Michał Jasikowski <mjasikowski@users.noreply.github.com>
|
🤖 Removed the comment from |
|
Still nothing to push here. The only failing check is Check independent approval (its All actual CI checks are green (tests, ESLint, Oxfmt, typecheck, React Compiler, Storybook, Bun tests, builds); the perf tests are still running and haven't failed. This PR just needs a reviewer approval. |
|
🚧 mjasikowski has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.4.61-0 🚀
|
|
🤖 No help site changes required. This PR is a navigation-routing bug fix. Its only change is to Nothing user-facing changes: the same screens open with the same content, buttons, and labels — only the underlying background is resolved from the URL instead of always defaulting to Company cards. No draft PR was created. |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.61-4 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
The company-card details and export RHP screens are dynamic routes that can be opened from more than one place (Members and Company cards). They were listed in
WORKSPACE_TO_RHP, which is inverted (last-wins) intoRHP_TO_WORKSPACE. BecauseCOMPANY_CARDSis defined afterMEMBERS, both dynamic screens inverted toWorkspace_CompanyCards, andgetMatchingFullScreenRouteconsulted that map before the dynamic base-path branch. As a result, opening these RHPs from a member's profile and refreshing (or navigating in-app) resolved the background to Company cards instead of Members.This PR removes the three dynamic-screen entries (
DYNAMIC_COMPANY_CARD_DETAILSfrom bothMEMBERSandCOMPANY_CARDS, andDYNAMIC_COMPANY_CARD_EXPORTfromCOMPANY_CARDS) so the background is resolved from the actual URL by the dynamic base-path branch — the same pattern the file already documents forDYNAMIC_IMPORTED_MEMBERS_ROLE. The background now stays correct for every entry point (Members, Company cards, Expensify Card, Rillet card list). An explanatory comment was added so the entries aren't re-added.Fixed Issues
$ #95303
PROPOSAL: #95303 (comment)
Tests
Same as #95303
Offline tests
QA Steps
Same as #95303
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.