Repository navigation
Conversation
Leaving a room optimistically closes it (statusNum CLOSED) and strips its reportID. The workspace rooms list still showed the closed room because policyChatRoomsSelector only filtered by policy, chat type, and archival, so tapping the row navigated to a "not here" page. Skip closed reports in policyChatRoomsSelector. This covers the offline leave case and the online optimistic window, without hiding unjoined rooms (still open) or workspace rooms the admin left (only notification hidden). Fixes Expensify#92031
…/92031-rooms-left-offline-clickable
4d348da to
7f953c5
Compare
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@shubham1206agra 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: 7f953c55ed
ℹ️ 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".
| if (isClosedReport(report)) { | ||
| continue; |
There was a problem hiding this comment.
Filter hidden room membership on offline leave
In the actual private-room leave flow, isWorkspaceMemberLeavingWorkspaceRoom() is true for restricted workspace rooms when the user is still a policy employee, so leaveRoom() only merges the current user's participant notificationPreference to hidden and does not set statusNum to CLOSED. Because this selector only skips closed reports, leaving a private workspace room while offline still leaves it visible in Workspace > Rooms until a server update arrives, so the offline regression described by this change remains.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The repro is a private room (visibility === 'private'). isWorkspaceMemberLeavingWorkspaceRoom() only returns true for RESTRICTED visibility (or accessible policy expense chats), so for a private room it's false. That means leaveRoom() takes the else branch and optimistically sets statusNum: CLOSED (including offline), so isClosedReport() does hide it. The regression is fixed.
The case you describe (only notificationPreference: hidden, no CLOSED) is a restricted/workspace-visible room. There, leaving is intentionally a "hide" — the user stays a workspace member and can re-join immediately, so the room should remain in Workspace > Rooms. That's expected behavior, not this regression.
|
@shubham1206agra I think this one is ready for review |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-06-10.at.5.34.14.PM.mov |
|
@grgia this one is ready for merge |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.4.6-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: No documentation changes required. I reviewed the changes in this PR and confirmed that no updates to Why:
Since this is a behind-the-scenes correctness fix with no change to documented behavior, I did not create a draft help site PR. @sumo-slonik, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR (Note: no help site PR was created because no documentation changes are warranted — if you believe a doc update is needed, let me know what behavior should be documented and I'll draft one.) |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.6-4 🚀
|
Explanation of Change
Skip closed reports in
policyChatRoomsSelector. Covers both the offline leave and the online optimistic window, and doesn't hide unjoined rooms (still open) or admin-left rooms (only notification preference changes,statusNumunchanged).Fixed Issues
$ #92031
PROPOSAL:
Tests
workspaceRoomsPagebeta.Offline tests
workspaceRoomsPagebeta and create a private room.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