[$250] The tab bar does not visible above the spinner
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: 9.5.7-3 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/App/pull/103421 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: IPHONE 12 / IOS 26.3.1 App Component: Money Requests
Action Performed:
Prerequisite: an account that is a member of at least two workspaces with Per diem enabled (Workspace > More features > Per diem), each with at least one per diem rate. Import per diem sheet on web so that on Android it does not preload. Change network connectivity to 3G
- Open App
- Tap on FAB > Create expense
- Tap on per diem tab > select WS
Expected Result:
The "Create expense" header and the tab bar stay visible above the spinner. No extra "Go back" button appears under the header.
Actual Result:
The tab bar is not visible above the spinner. Extra Go back "<" button appears under the header.
Workaround:
Unknown
Platforms:
- [x] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [ ] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/e7123d58-4516-4f2c-8129-751e10e6c108
Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7283446
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022109928824204193624
- Upwork Job ID: 2109928824204193624
- Last Price Increase: 2026-11-24
Issue Owner
Current Issue Owner: @sobitneupane
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/8931b7579708cca9017615b114ccd2881888636c1aede5ffc773291e81852641
This PR failing because of the issue #103838 This issue is reproducible in: Web, Android app
Self-assigning to investigate as the issue failing the PR I worked on.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the Per diem tab, picking a workspace whose per diem rates are not loaded yet shows a spinner on a new screen. That screen has its own "Create expense" header with a < back button and no tab bar.
What is the root cause of that problem?
After you pick a workspace, selectWorkspace only waits in the tab when the destination cannot resolve the policy. The workspace chat always has a real policyID, so it skips the wait and opens the Destination step right away, before the rates arrive (IOURequestStepPerDiemWorkspace.tsx:73-99).
The Destination step is a separate screen with its own header and back button. It shows a spinner until the rates load (DynamicIOURequestStepDestination.tsx:236-248). That screen is what QA sees.
Use ActivityIndicator inside the Per Diem tab while the selected workspace loads is in 9.5.7-3, but it only changed the in-tab loader (IOURequestStepPerDiemWorkspace.tsx:111-120). This flow never reaches that loader. So this is older behavior, not a regression from that PR.
What changes do you think we should make in order to solve the problem?
In selectWorkspace, wait in the tab whenever the per diem custom unit is missing, not only when the policy can't be resolved:
- If there is no per diem unit, call
fetchPerDiemRates, setpendingPolicyID, and return. - The existing effect at
IOURequestStepPerDiemWorkspace.tsx:102-109already callsselectWorkspaceagain once the unit loads. It then opens Destination with the rates ready.
The user then sees the in-tab spinner, and the header and tab bar stay visible. Add a unit test: given a workspace with no per diem unit, selecting it does not navigate and shows the in-tab loader.
What alternative solutions did you explore? (Optional)
- Gate on
perDiemUnit?.ratesinstead of the unit itself, to match the Destination step'sisLoadingcheck. This also covers the case where the unit arrives before its rates. If you choose this, update the effect's condition the same way. - Keep the current navigation and treat the Destination screen's loader as expected. That would mean closing this issue as expected behavior.
Investigation details
- The tested build includes the fix: the
9.5.7-3-stagingtag contains the PR's merge commit, and the file at that tag uses the newActivityIndicatorwrapper. styles.fullScreenLoadinghas no absolute positioning (styles/index.ts:3647-3653), so the in-tab loader can't cover the tab bar.- The
<comes fromStepScreenWrapper'sHeaderWithBackButton, which shows becauseopenedFromStartPageis false on the pushed screen (StepScreenWrapper.tsx:66-88). It does not come fromFullScreenLoadingIndicator, whose Go back control is a text button that appears after a timeout. - With only one per diem workspace, the Destination step renders inside the tab, so the tab bar stays (
IOURequestStartPage.tsx:355-371). The bug needs two or more per diem workspaces, which matches the prerequisite. - I confirmed this by reading the code. I did not reproduce it on a device.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/103838) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
Current assignee @situchan is eligible for the External assigner, not assigning anyone new.
Job added to Upwork: https://www.upwork.com/jobs/~022109928824204193624
Proposal
Please re-state the problem that we are trying to solve in this issue.
When selecting a workspace on the Per Diem tab where per diem rates have not yet loaded, the app navigates immediately to a separate Destination screen that displays a full-screen spinner with a header back arrow, completely hiding the tab bar.
What is the root cause of that problem?
In src/pages/iou/request/step/IOURequestStepPerDiemWorkspace.tsx:70-75:
const canDestinationResolvePolicy = !!perDiemUnit || (!!targetReport.policyID && targetReport.policyID !== CONST.POLICY.ID_FAKE);
if (!canDestinationResolvePolicy) {
setPendingPolicyID(policy?.id);
return;
}
-
Premature Navigation via Short-Circuiting: For any standard policy expense chat,
targetReport.policyIDis valid (notCONST.POLICY.ID_FAKE). Therefore,canDestinationResolvePolicyevaluates totrueeven whenperDiemUnitis completelyundefinedand its rates have not arrived yet. As a result,selectWorkspaceskips the in-tab pending state (pendingPolicyID) and immediately calls:Navigation.navigate( createDynamicRoute(DYNAMIC_ROUTES.MONEY_REQUEST_STEP_DESTINATION.path, ROUTES.MONEY_REQUEST_CREATE.getRoute(action, targetIouType, transactionID, targetReport.reportID)), ); -
Destination Step Full-Screen Loading: Once navigated to
DynamicIOURequestStepDestination.tsx, because per diem rates are still missing,DynamicIOURequestStepDestinationrenders its ownFullScreenLoadingIndicatorinside a pushedStepScreenWrapper. This pushed screen has its own header back button (<) and is outside the tab navigator, causing the tab bar to disappear while loading.
What changes do you think we should make in order to solve the problem?
-
Gate Destination Navigation on Per Diem Unit / Rates Resolution: In
src/pages/iou/request/step/IOURequestStepPerDiemWorkspace.tsx: Require the per diem custom unit to be loaded before navigating away from the workspace selection step:-const canDestinationResolvePolicy = !!perDiemUnit || (!!targetReport.policyID && targetReport.policyID !== CONST.POLICY.ID_FAKE); +const canDestinationResolvePolicy = !!perDiemUnit && (!!targetReport.policyID && targetReport.policyID !== CONST.POLICY.ID_FAKE); if (!canDestinationResolvePolicy) { setPendingPolicyID(policy?.id); return; }Or explicitly check
if (!perDiemUnit) { setPendingPolicyID(policy?.id); return; }. -
In-Tab Loading Indicator: When
pendingPolicyIDis set, render the in-tab activity indicator within the tab container (preserving the tab bar and header) rather than pushing a new screen. The existinguseEffectin lines 99-106 will then cleanly fireselectWorkspace(pendingPolicy)oncependingPolicyreceivesperDiemUnitvia Onyx, smoothly transitioning to Destination with rates already available.
What alternative solutions did you explore? (Optional)
- Gating inside
DynamicIOURequestStepDestination.tsx: Not recommended, because navigating to a pushed screen only to show a spinner defeats the purpose of keeping tab navigation visible.
What specific scenarios should we cover in automated tests?
In tests/unit/IOURequestStepPerDiemWorkspaceTest.tsx:
- Render
IOURequestStepPerDiemWorkspacewith multiple workspaces where the selected workspace has not yet cached per diem custom units. - Verify that clicking the workspace sets
pendingPolicyIDand keeps the user on the workspace step without firing navigation. - Simulate Onyx updating with the policy's per diem custom unit and assert navigation to
MONEY_REQUEST_STEP_DESTINATIONis triggered with the tab bar preserved up until navigation.
Hi @situchan, contributor details for the proposal above:
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0163955a2ba22190aa
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@situchan Still overdue 6 days?! Let's take care of this!
@situchan Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
@situchan this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
@situchan Huh... This is 4 days overdue. Who can take care of this?
@situchan Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
@situchan Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
@situchan Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
This PR failing because of the issue #103838 This issue is reproducible in: Android and iOS app
I confirmed #103838 is not the offending PR. Still reproducible after revert
@MelvinBot implement your proposal for testing
🤖 Web test steps verification results: ⚠️ partial
Tested unchanged code on dev NewDot web; no implementation or code changes were made because this run permits verification only. Create expense opened, but the required Per diem loading scenario could not be established.
| Step | Status |
|---|---|
Open AppAuthenticated Home screen appeared. |
✅ |
Open FAB > Create expenseCreate expense opened with Manual and Scan tabs. A location-access dialog then appeared.![]() |
✅ |
Select Per diem and a workspace with uncached ratesBlocked: two workspaces with Per diem enabled and rates were not established. Only Manual and Scan tabs appeared; automation could not dismiss the location dialog. |
⚠️ |
Header and tabs remain visible without an extra back arrow while rates loadUnverified: the Per diem loading state was not reached. |
⚠️ |