Hide Home loading bar while offline - #100011
Conversation
Co-authored-by: Marcin Warchoł <war-in@users.noreply.github.com>
|
No code fix is needed — nothing is actually broken. The only failing check is Check independent approval, and it fails because this PR has zero approving reviews. The Every other check on the branch is green, including the two that were still running when you asked:
One thing that will block the approval: the PR body still has |
Android test results — passRan the PR's offline test steps on standalone Android NewDot (developmentDebug APK, Metro on
No console errors. Evidence (5)Troubleshoot page with Force offline ON and offline indicator
Self-DM with the sent message greyed out as pending while offline
Home while offline: no loading bar under the header, offline indicator visible
POSITIVE CONTROL — Home offline with isLoadingReportData stranded true in Onyx and still no loading bar
Home after going back online: content loaded, no stuck loading bar, no offline indicator
Two caveats worth knowingNo screen recording. You asked for recordings and I only have stills. CI holds an exclusive The PR's written repro does not actually set the flag. The Offline tests section says to send an attachment offline and then go Home, but One more thing the positive control could not produce: a counter-control frame with the bar actually visible. Once online, the queued Unrelated: the Android sign-in macro is brokenCI could not sign in on any of its 3 prestart attempts, so the tester recovered the session by hand. The root cause is not selector drift — the element resolves fine. The bulk The macro also doesn't cover the system permission dialog raised after |
Web test results — partial (all 4 steps pass, one control missing)Ran the PR's offline test steps on dev NewDot web (branch
Evidence (8)Troubleshoot page with Force offline toggled ON
Concierge chat offline: sent message greyed out as pending, offline indicator visible
Home while offline: no loading bar at top, offline indicator bottom-left
Reset-and-refresh confirmation while Force offline is ON
POSITIVE CONTROL: Home offline with IS_LOADING_APP stuck true (grey avatar, Discover gone) and no loading bar
Home back online: fully loaded, no loading bar stuck at top
Synthetic detector control: 2px #03D47C line at TopBar bottom edge is detected
Renderer revived after reload - non-blank sign-in page
The written repro can never show the bar — please rewrite itThis is the main thing to act on. The Offline tests section says to send an attachment offline and then go Home, but that sequence cannot produce the bug on either build, for two independent reasons:
So a reviewer or QA following the steps literally gets a green pass while never rendering the state the PR fixes. What actually works, and what I used for the positive control: Force offline ON → Clear cache and restart. The change itself is at CaveatsNo live counter-control. I could not catch the bar actually rendered while online, across 4 attempts (nav race,
No screen recording, and no console errors collected. You asked for recordings; browser video and console/runtime capture are both outside what I can drive here, so screenshots are the only evidence. Direct Onyx reads are also out of scope on web, which is why the flag state above is established via network dump plus cleared-data UI markers rather than a raw key read. Session trouble worth flagging (unrelated to your PR)The prestarted web session died mid-run — empty DOM, 0 AX nodes, no network activity — while the dev server and |
|
@MelvinBot |
|
@ZhenjaHorbach 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] |
|
Done — this PR is out of draft and open for review. One thing to fix before a reviewer signs off: the Tests and QA Steps sections still contain Also note |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-09-02.13.58.08.movAndroid: mWeb Chrome2026-09-02.13.58.08.moviOS: HybridApp2026-09-02.13.55.46.moviOS: mWeb Safari2026-09-02.13.54.27.movMacOS: Chrome / Safari2026-09-02.13.52.44.mov |
|
@MelvinBot Explanation of ChangeThe Home page computed its top loading-bar visibility straight from the Onyx flags: const [isLoadingApp = true] = useOnyx(ONYXKEYS.IS_LOADING_APP);
const [isLoadingReportData = false] = useOnyx(ONYXKEYS.IS_LOADING_REPORT_DATA);
const isForYouLoading = !!(isLoadingApp || isLoadingReportData);Offline, the commands those flags track ( Every other tab (Inbox, Search, Workspaces) renders its bar through App/src/hooks/useInFlightRequests.ts Lines 206 to 212 in 7925a64 Switching Home to Fixed Issues$ #99501 Tests// TODO: The human co-author must fill out the tests they ran before marking this PR as "ready for review".
Offline tests// TODO: The human co-author must confirm the offline steps before marking this PR as "ready for review". The behaviour this PR changes is offline-only:
QA Steps// TODO: The human co-author must fill out the QA steps before marking this PR as "ready for review".
PR Author Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb Safari |
|
Done — the PR description is replaced with your text, byte-for-byte. Two things you should know about what that replacement changed, since both are easy to miss in a wall of checkboxes: 1. All 38 author-checklist boxes are now checked, including platforms nobody has tested here. The checklist now asserts 2. The replacement dropped the |
@grgia definitely! @MelvinBot add such a test case to |
Cover the stuck-flag cases the offline guard exists for: IS_LOADING_REPORT_DATA
true while offline and IS_LOADING_APP true while offline both assert TopBar
receives shouldShowLoadingBar={false}. An online counterpart asserts the bar is
still shown, so the offline assertions cannot pass vacuously.
Co-authored-by: war-in <war-in@users.noreply.github.com>
Co-authored-by: Marcin Warchoł <war-in@users.noreply.github.com>
|
@ZhenjaHorbach @grgia 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] |
|
Added in
I added the online case because without it the two offline assertions could pass for the wrong reason — a mock that silently stopped forwarding the prop would still read I verified the tests actually catch the regression: with How the assertion works, and checks runTwo mocks were needed. Checks run locally on this branch:
|
|
The failing check is not caused by this PR, so I did not push a fix.
Evidence it's pre-existing: unrelated PR #100200 fails on the identical test with the identical diff today, and The only other failing check, Why the test breaks today, and how to fix it properlyThe test and the production code disagree about the ETA only when today's day-of-month equals the submit offset. Today is the 2nd, and the offset under test is Production, let etaDateTime = setDate(new Date(), policy?.autoReportingOffset);
if (isPast(etaDateTime)) {
etaDateTime = addMonths(etaDateTime, 1);
}On the 2nd, The expectation, That race is why the same test passed on #100205 and failed here within the same minute. There are two things worth fixing, both outside this PR's scope:
Fixing either one in isolation would just move the disagreement, so they need to land together. Happy to take on that fix in a separate PR if you'd like — just say the word. This PR itself is green apart from the flake. |
|
@MelvinBot do you need to merge main for failing test |
|
No — merging main won't fix it. The failure is
Why merging main can't help
So there's no fix on main to pull in — the failure would follow the merge. Options: re-run the job tomorrow (the 3rd) and it goes green on its own, or fix the mismatch properly by making |
|
It won't help |
|
@MelvinBot |
|
Branch updated — Merged via Two things worth knowing:
Main landed after the review. The author checklist has an item for exactly this — "If the The rest of CI is re-running on the new commit now. |
|
@grgia @puneetlath |
|
No fix to push — the one remaining failure is CI infrastructure, not this PR.
This is intermittent rather than a hard outage: another branch's The only other failing check, Also resolved since my last comment: the Evidence
The failing step is step 7 of the job, Recent |
dylanexpensify
left a comment
There was a problem hiding this comment.
good from a product perspective 👍
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 grgia 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! 🧪🧪
|

















Explanation of Change
The Home page computed its top loading-bar visibility straight from the Onyx flags:
Offline, the commands those flags track (
OpenApp/OpenReport) are queued but never sent, so nothing ever clears the flags and the loading bar on Home stays up forever. The reported repro (send an attachment offline, then go to Home) is one way to setIS_LOADING_REPORT_DATA; sending an attachment to any regular chat reproduces it too, so this is not specific to the Concierge prompt box.Every other tab (Inbox, Search, Workspaces) renders its bar through
useLoadingBarVisibility, which already returnsfalsewhile offline:App/src/hooks/useInFlightRequests.ts
Lines 206 to 212 in 7925a64
Switching Home to
TopBarWithLoadingBarwould inherit that behaviour but would also drop theOpenApptracking Home relies on, so instead this adds the same!isOfflineguard directly toisForYouLoading, matching the hook's semantics with a one-line change.Fixed Issues
$ #99501
PROPOSAL: #99501 (comment)
Tests
// TODO: The human co-author must fill out the tests they ran before marking this PR as "ready for review".
// Please describe what tests you performed that validate your change worked.
Offline tests
// TODO: The human co-author must confirm the offline steps before marking this PR as "ready for review".
The behaviour this PR changes is offline-only:
QA Steps
// TODO: The human co-author must fill out the QA steps before marking this PR as "ready for review".
// Please describe what QA needs to do to validate these changes and what areas they need to test for regressions.
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.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Home page online, no loading bar
Message queued in Concierge chat while offline
Home page while offline, no loading bar, offline indicator visible
Home page after returning online, no stuck loading bar