[CP Staging] fix: deploy blocker #91087 — blank workspace page on invalid URL with RHP#91100
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@ShridharGoel 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e5b043481
ℹ️ 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".
|
|
||
| const isPolicyNotAccessible = !isPolicyAccessible(policy, login); | ||
| const shouldShowNotFoundPage = isFocused && ((!isMoneyRequest && !isFromGlobalCreate && isPolicyNotAccessible) || !isPageAccessible || shouldBeBlocked); | ||
| const shouldShowNotFoundPage = isWorkspacesTabFocused && ((!isMoneyRequest && !isFromGlobalCreate && isPolicyNotAccessible) || !isPageAccessible || shouldBeBlocked); |
There was a problem hiding this comment.
Keep access-denied fallback independent of Workspaces tab
shouldShowNotFoundPage now depends on isWorkspacesTabFocused, but AccessOrNotFoundWrapper is also used by non-Workspaces flows (for example src/pages/iou/request/IOURequestStartPage.tsx wraps create-expense routes with accessVariants={[CONST.IOU.ACCESS_VARIANTS.CREATE]}). When those screens are opened from Reports/Search tabs, isWorkspacesTabFocused is false, so failed access checks (!isPageAccessible, blocked policy, etc.) no longer show the not-found fallback and the protected content can still render. This changes permission/error behavior outside the Workspaces tab.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Should work fine now :)
6e5b043 to
c0d511f
Compare
|
Does it really work? 😅 2026-05-19.19.10.07.mov |
|
But it works now The only thing that confuses me is the order of actions I think we should immediately show it in full screen after loading 2026-05-19.19.18.10.mov |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridApp2026-05-19.19.36.35.mov2026-05-19.19.39.03.moviOS: mWeb Safari2026-05-19.19.36.35.mov2026-05-19.19.39.03.movMacOS: Chrome / Safari2026-05-19.19.18.10.mov2026-05-19.19.32.24.mov |
|
Small visual glitch 2026-05-19.19.37.54.mov |
|
LGTM! |
There was a problem hiding this comment.
@WojtekBoman can you add unit test for this please?
|
🚧 @mountiny 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.77-3 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are needed for this PR. The changes are purely internal navigation/rendering logic (replacing |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.77-3 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.78-0 🚀
Bundle Size Analysis (Sentry): |
|
After reviewing the changes in this PR, no help site documentation updates are required. This PR is an internal bug fix that changes how the "Not Found" page is gated when navigating workspace screens. It replaces |
Explanation of Change
Gates the workspace not-found view on a new
useIsWorkspacesTabFocusedhook instead ofuseIsFocused(). The previous gate (added in #89750) hid the not-found page when an RHP was open over a workspace screen, leaving a blank background for invalid workspace URLs. The new hook checksWORKSPACE_NAVIGATORis the active tab — true even with an RHP overlay — preserving #89750's tab-bar bleed-through fix.the app behaviour after being fixed:
https://github.com/user-attachments/assets/e387912d-4343-4e2f-b4ff-b27b00de80ac
Fixed Issues
$ #91087
PROPOSAL:
Tests
nope) and press Enter.Offline tests
N/A — changes are render-gate only and do not involve API calls or Onyx writes.
QA Steps
Same as tests.
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