[Due for payment 2026-12-02] [$175] Workspaces - Rooms page loads indefinitely when opened after creating a workspace offline
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.40-0 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://test-management.browserstack.com/projects/2219752/test-runs/84222789/folder/53676270/41237923/1982039009?sort=%2Bidentifier Email or phone of affected tester (no customers): n/a Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: Mac 26.5.1 Safari, iPhone 13 iOS 26.6 App Component: Workspace Settings
Action Performed:
- Go to https://staging.new.expensify.com
- Navigate to Workspaces and go offline
- Click on the New workspace button to create a new workspace
- Click "Confirm" button
- Click the Rooms tab
Expected Result:
The Rooms page should load successfully
Actual Result:
Rooms page loads indefinitely when opened after creating a workspace offline.
Workaround:
Unknown
Platforms:
- [ ] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [x] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/83164c8a-73f2-4e9b-882c-7c580af7a7af
Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7316151
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022122567490983281705
- Upwork Job ID: 2122567490983281705
- Last Price Increase: 2026-11-17
Issue Owner
Current Issue Owner: @jayeshmangwani
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/bf0725520d60dd1d645d93b02d8dc52731d2c0e1afd6471ebcc49debf9c86004
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)
Job added to Upwork: https://www.upwork.com/jobs/~022122567490983281705
Proposal
What is the root cause of that problem?
Medium confidence — supported by code; offline reproduction remains unverified.
The Rooms table treats missing “loaded” metadata as an active load, even while offline. Creating a workspace initializes its rooms optimistically, but not this metadata. Opening Rooms offline skips the request that would mark it loaded, so the table indefinitely hides available rooms behind a loading skeleton.
Code evidence and alternatives checked
- Workspace creation initializes local room reports: Policy.ts:3207–3247.
- Rooms correctly skips fetching while offline: WorkspaceRoomsPage.tsx:140–149.
- Request completion sets
isLoaded: Room.ts:36–62. - The table displays its skeleton whenever
isLoadedis absent, without checking connectivity: WorkspaceRoomsTable/index.tsx:144–159.
Missing optimistic reports were considered, but the room selector accepts those reports. The loading gate prevents them from rendering.
What changes do you think we should make in order to solve the problem?
Make the table’s initial loading skeleton online-only. While offline, render locally available rooms—or the existing empty state when none are cached. Preserve the existing offline request guard and reconnection fetch.
Regression coverage should verify offline creation → Confirm → Rooms, an uncached workspace offline, unchanged online loading, and successful refresh after reconnection.
What alternative solutions did you explore? (Optional)
Initializing isLoaded during workspace creation would mask this case but leave other never-loaded workspaces affected offline. Changing only isLoading would not fix the skeleton’s actual condition.
Web verification — partial; reproduction blocked
🤖 Web test steps verification results: ⚠️ partial
Workspaces opens online on dev NewDot web. Offline setup was blocked because the permitted controls exposed no usable offline toggle; Rooms behavior remains unverified.
| Step | Status |
|---|---|
1. Open Workspaces onlineWorkspaces and New workspace were visible.![]() |
✅ |
2. Go offlineBlocked: no usable offline control was available. |
⚠️ |
3. Click New workspaceNot attempted without the required offline state. |
⚠️ |
4. Confirm creation offlineBlocked by offline setup. |
⚠️ |
5. Open Rooms/check loadingBlocked: no offline-created workspace was available. |
⚠️ |
Next Steps for Contributor+ team:
To accept: @MelvinBot implement this proposal to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
view run · no recording available
Proposal
Please re-state the problem that we are trying to solve in this issue.
After creating a workspace while offline and tapping Confirm, opening the Rooms tab shows the loading skeleton forever, even though the rooms exist locally. The page never recovers until the device is back online.
What is the root cause of that problem?
The loading gate and the fetch gate disagree about offline. openPolicyRoomsPage (src/libs/actions/Policy/Room.ts:49-60) only sets isLoaded: true in finallyData, when the request completes — and WorkspaceRoomsPage.tsx:143-149 never issues that request while offline (if (!isFocused || isOffline) { return; }). Meanwhile WorkspaceRoomsTable/index.tsx:144-152 shows <Table.LoadingState /> whenever !roomsMetadata?.isLoaded, with no connectivity check at all. The optimistic room reports created with the workspace (src/libs/actions/Policy/Policy.ts:3207-3247) are in Onyx and accepted by the room selector, but the skeleton hides them indefinitely.
What changes do you think we should make in order to solve the problem?
Make the table's initial loading skeleton online-only: read useNetwork() in WorkspaceRoomsTable (the same hook the page already uses) and, while offline, render the table from the locally cached rooms — or the existing empty state when none are cached — instead of the skeleton. Keep the page's offline fetch guard and the refetch-on-reconnect behaviour unchanged, so online loading and refresh-after-reconnect work exactly as today.
What alternative solutions did you explore? (Optional)
Seeding isLoaded during workspace creation would mask only the freshly-created-workspace case and leave every other never-loaded workspace stuck offline. Changing only isLoading would not fix the skeleton, whose condition is isLoaded.
How will you verify the fix?
Reproduce the issue steps: create a workspace offline, Confirm, open Rooms and confirm the rooms render; open an uncached workspace offline and confirm the empty state (not the skeleton); confirm online loading is unchanged; go back online and confirm the list refreshes. Add tests for offline creation → Confirm → Rooms, uncached workspace offline, and refresh after reconnection.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01c5c6bc0e7d162f7b
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Contributor details Your Expensify account email: [email protected]
Proposal
Please re-state the problem that we are trying to solve in this issue.
After creating a new workspace while offline and clicking "Confirm", navigating to the Rooms tab causes the Rooms page to show a loading skeleton (<Table.LoadingState />) indefinitely instead of displaying the created workspace rooms (or the empty state).
What is the root cause of that problem?
The root cause lies in an offline gate mismatch between data fetching and UI rendering:
-
Offline Guard on Fetch (
src/pages/workspace/rooms/WorkspaceRoomsPage.tsx:143–149):WorkspaceRoomsPageguards its fetch effect so thatopenPolicyRoomsPageis explicitly bypassed while offline:useEffect(() => { if (!isFocused || isOffline) { return; } openPolicyRoomsPage(policyID, pageNumber, sortBy, roomSort.order, searchValue); }, [isFocused, isOffline, pageNumber, policyID, roomSort.order, searchValue, sortBy]); -
Sole Writer of
isLoaded(src/libs/actions/Policy/Room.ts:49–60):openPolicyRoomsPageis the only function that setsisLoaded: trueinONYXKEYS.POLICY_ROOMS_METADATA:const finallyData: Array<OnyxUpdate<typeof ONYXKEYS.POLICY_ROOMS_METADATA>> = [ { onyxMethod: Onyx.METHOD.MERGE, key: ONYXKEYS.POLICY_ROOMS_METADATA, value: { [policyID]: { isLoading: false, isLoaded: true, }, }, }, ];Because
openPolicyRoomsPageis never triggered while offline,roomsMetadata?.isLoadedremainsundefined. -
Unconditional Loading Gate (
src/components/Tables/WorkspaceRoomsTable/index.tsx:146–153):WorkspaceRoomsTableintercepts rendering and displays<Table.LoadingState />whenever!roomsMetadata?.isLoaded:if (!roomsMetadata?.isLoaded) { return ( <> {headerComponent} <Table.LoadingState /> </> ); }Because the table does not check whether the client is offline, it assumes data is actively being fetched from the server and traps the user on the loading skeleton indefinitely, even though the optimistic room reports created with the workspace (such as
#adminsand#announce) are already cached in Onyx and available viapolicyReports(policyChatRoomsSelector).
What changes do you think we should make in order to solve the problem?
-
Make the initial loading skeleton online-only in
src/components/Tables/WorkspaceRoomsTable/index.tsx: ImportuseNetworkand bypass the full-page loading skeleton whenisOfflineis true:// Import hook: import useNetwork from '@hooks/useNetwork'; // Inside WorkspaceRoomsTable: const {isOffline} = useNetwork();Update the loading condition at line 146:
if (!roomsMetadata?.isLoaded && !isOffline) { // The page header stays visible above the loading skeleton so the layout doesn't jump once the table renders. return ( <> {headerComponent} <Table.LoadingState /> </> ); }- When offline, the component proceeds directly to render
<Table data={rooms} ...>, which immediately displays the locally cached / optimistic rooms (or<Table.EmptyState>if no rooms are present). - Client-side search (
isItemInSearch) and client-side sorting (compareItems) insideWorkspaceRoomsTableremain fully functional while offline. - When network connectivity is restored, the
useEffectinWorkspaceRoomsPage.tsxautomatically triggersopenPolicyRoomsPage, which fetches the latest server state, updatesroomsMetadata.isLoaded: true, and refreshes the list seamlessly.
- When offline, the component proceeds directly to render
-
Automated Unit Tests: Add unit tests verifying that:
- When
roomsMetadata?.isLoadedis undefined andisOffline: true, the table renders local room rows instead of<Table.LoadingState />. - When
roomsMetadata?.isLoadedis undefined andisOffline: false,<Table.LoadingState />is rendered. - When transitioning
isOfflinefromtruetofalse,openPolicyRoomsPageis called.
- When
What alternative solutions did you explore? (Optional)
- Seeding
isLoaded: trueinbuildPolicyData(Policy.ts) during workspace creation: Rejected because it only solves the case for a freshly created workspace, but leaves any existing workspace opened for the first time while offline stuck in the infinite loading state. - Passing
isOfflineas a prop fromWorkspaceRoomsPagetoWorkspaceRoomsTable: Viable, but callinguseNetwork()directly insideWorkspaceRoomsTablefollows existing table patterns (e.g.WorkspaceCompanyCardsTable:105) and keeps the component's public prop interface minimal.
@MelvinBot implement
🤖 Web test steps verification results: ⚠️ partial
Implemented in draft Show workspace rooms instead of endless loading while offline; four regression tests, lint, typecheck, formatting, compiler check, and Storybook passed. Dev web opened successfully, but offline verification was blocked by unavailable offline controls; the full Jest suite timed out.
| Step | Status |
|---|---|
1. Open dev NewDot webConfirmed a signed-in, onboarded session. |
✅ |
2. Navigate to Workspaces and go offlineWorkspaces opened; no supported offline control was available.![]() |
⚠️ |
3. Click New workspace offlineBlocked by offline setup. |
⚠️ |
4. Click Confirm offlineBlocked by offline workspace creation. |
⚠️ |
5. Verify Rooms displays without an indefinite skeletonOffline browser behavior remains unverified. |
⚠️ |
6. Verify uncached Rooms shows an empty state offlineBlocked by offline setup. |
⚠️ |
7. Verify reconnect refreshes RoomsCould not perform an offline-to-online transition. |
⚠️ |
view run · no recording available
Triggered auto assignment to @mountiny, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@jayeshmangwani
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.53-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/107303
If no regressions arise, payment will be issued on 2026-12-02. :confetti_ball:
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
@jayeshmangwani
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.53-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/107303
If no regressions arise, payment will be issued on 2026-12-02. :confetti_ball:
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
@jayeshmangwani Eep! 4 days overdue now. Issues have feelings too...