Fix issue: Expensify Card - After clicking View transactions, Workspaces tab resets to initial page#89106
Conversation
|
@linhvovan29546 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] |
|
@luacmartins another one to help my navigation homeboys |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
I think the original C+ should review this instead. cc @ZhenjaHorbach |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
Looks like this fix doesn't work on desktop 2026-04-28.18.42.13.mov |
|
@ZhenjaHorbach could you please retest? |
|
@adamgrzybowski test is failing |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-04-29.at.21.46.32.mov |
|
@adamgrzybowski could you plz fix lint and unit tests failure |
|
@Pujan92 I already pinged @adamgrzybowski please continue your review of the rest of the PR |
|
@Pujan92 should work now |
Pujan92
left a comment
There was a problem hiding this comment.
LGTM!
Native build is taking time for me. I will add those recordings soon.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…fix-workspaces-tab-reset-89009 Fix issue: Expensify Card - After clicking View transactions, Workspaces tab resets to initial page (cherry picked from commit 266c03a) (cherry-picked to staging by luacmartins)
|
🚧 @luacmartins has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.3.64-20 🚀
Bundle Size Analysis (Sentry): |
|
I reviewed the changes in this PR. All modifications are to internal navigation state management code ( No help site changes are required. |
Explanation of Change
useRestoreWorkspacesTabOnNavigateonly inspected the topmostTAB_NAVIGATORin the root stack.linkToPUSHes a freshTAB_NAVIGATORabove the modal. That new instance'sWORKSPACE_NAVIGATORslot starts empty, so the hook resolved no last-visited route and fell back to the workspace list.TAB_NAVIGATORinstances kept alive byensureTabNavigatorRoutesstill hold the previous workspace state. The hook now flattens theWORKSPACE_NAVIGATORroutes from everyTAB_NAVIGATORin the root stack and picks the most recent one, so the previously open workspace + sub-page (e.g. Expensify Card) is restored.TAB_NAVIGATOR(the common case), and the existing session-storage fallback is preserved for cold-start scenarios.Fixed Issues
$ #89009
PROPOSAL:
Tests
Offline tests
QA Steps
Precondition: a workspace with the Expensify Card feature enabled and at least one virtual card assigned to a member.
https://staging.new.expensify.com(Chrome).PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari