[Due for payment 2026-11-26] [$175] Room - Notification option is still visible after leaving the room
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
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://github.com/Expensify/Expensify/issues/439505 Email or phone of affected tester (no customers): Issue reported by: Applause Internal Team Bug source: Device used: App Component:
Action Performed:
- Navigate to staging.new.expensify.com
- Create new room & navigate to it
- Tap header -> settings
- Notice Notifications is set "daily"
- Tap leave and now tap header -> settings
Expected Result:
Notifications field should be missing
Actual Result:
Notification option is still visible after leaving the room
Workaround:
Unknown
Platforms:
- [ ] Android: App
- [ ] Android: mWeb Chrome
- [ ] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome / Safari
Screenshots/Videos
https://github.com/user-attachments/assets/066668ca-060a-4730-b03b-9b8b457a6b2a
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022122739713937359913
- Upwork Job ID: 2122739713937359913
- Last Price Increase: 2026-11-17
Issue Owner
Current Issue Owner: @mallenexpensify
Triggered auto assignment to Contributor-plus team member for initial proposal review - @bernhardoj (External)
Job added to Upwork: https://www.upwork.com/jobs/~022122739713937359913
Proposal
What is the root cause of that problem?
The Notifications row treats an existing participant record as proof that the user is still subscribed to the room. Leaving a default restricted workspace room retains that record but changes its notification preference to hidden, so the row incorrectly remains visible.
Confidence: Medium — supported by code and existing tests; browser reproduction was not performed.
Supporting evidence
- New rooms default to restricted visibility and Daily notifications: WorkspaceNewRoomPage.tsx:107–148.
- For qualifying workspace members, leaving retains the participant and sets its preference to
hidden, both optimistically and on success: Report/index.ts:5911–5960. - The Notifications visibility condition checks participant existence but ignores the resolved notification preference: DynamicReportSettingsPage.tsx:48–85.
This explains the row remaining visible even after a successful state update; stale caching is not required.
What changes do you think we should make in order to solve the problem?
Keep the existing visibility checks and additionally hide Notifications when the already-resolved settings preference is hidden. Use isHiddenForCurrentUser(notificationPreferenceValue) rather than checking the raw report preference.
Add regression coverage for:
- Daily → leave → Notifications disappears.
- Rejoin or failed leave → Notifications returns.
- Muted rooms and legacy admin-room defaults remain supported.
Compatibility considerations
The settings-specific preference helper preserves legacy admin-room defaults while retaining explicit hidden values: ReportUtils.ts:1981–1998.
The hidden-state helper does not classify Mute as hidden: ReportUtils.ts:2617–2632.
What alternative solutions did you explore? (Optional)
Changing leave-room behavior is unnecessary: retaining room access is intentional. A cache refresh would not fix a visibility condition that accepts the correctly updated participant record.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/107138) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~015c92a110b06ee5b3
Proposal
Please re-state the problem that we are trying to solve in this issue.
After leaving a workspace room, navigating to the room's Settings page still displays the Notify me about new messages row with the value Hidden, and tapping it still opens the Notification preferences screen instead of hiding the Notifications field.
What is the root cause of that problem?
- When a workspace member leaves a workspace room (
leaveRoominsrc/libs/actions/Report/index.ts,isWorkspaceMemberLeavingWorkspaceRoom || isChatThread), the participant entry inreport.participants[currentUserAccountID]is intentionally retained in Onyx withnotificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN('hidden') so workspace members can still view/rejoin the room. - In PR
#101664(commitbe25be7d, "Fix empty notification preferences in admin rooms"),getReportNotificationPreferenceForSettingswas introduced so legacy#adminsrooms with an empty preference ('') fall back to the room default while preserving explicit'hidden'values. However, that PR also changed:DynamicReportSettingsPage.tsx:shouldShowNotificationPrefwas switched from!isMoneyRequestReport && !isHiddenForCurrentUser(notificationPreferenceValue)to!isMoneyRequestReport && !!currentUserParticipant, and the!isHiddenForCurrentUser(notificationPreferenceValue)guard around formattingnotificationPreferenceatline 56was removed.DynamicNotificationPreferencePage.tsx:shouldDisableNotificationPreferenceswas switched from(!isMoneyRequest && isHiddenForCurrentUser(currentNotificationPreference))to!currentUserParticipant.
Because leaving a workspace room retains currentUserParticipant with notificationPreference: 'hidden', !!currentUserParticipant evaluates to true, so DynamicReportSettingsPage renders Notify me about new messages: Hidden (unlike ReportDetailsMenuSettingsItem.tsx and ProfilePage.tsx, which both check !isHiddenForCurrentUser(...)), and deep-linking to DynamicNotificationPreferencePage remains accessible even though the user has left the room.
What changes do you think we should make in order to solve the problem?
-
Hide the Notifications row when
notificationPreferenceValueresolves to hidden insrc/pages/settings/Report/DynamicReportSettingsPage.tsx:- Keep
notificationPreferenceValue = getReportNotificationPreferenceForSettings(report, currentUserAccountID)so legacy#adminsrooms with an empty''preference still resolve to their default ('always') and remain visible/editable as intended in PR#101664. - Re-import
isHiddenForCurrentUserfrom@libs/ReportUtils, remove the then-unusedcurrentUserParticipantvariable (line 49), and restore the hidden guard:const notificationPreferenceValue = getReportNotificationPreferenceForSettings(report, currentUserAccountID); const shouldShowNotificationPref = !isMoneyRequestReport && !isHiddenForCurrentUser(notificationPreferenceValue); const notificationPreference = shouldShowNotificationPref && notificationPreferenceValue ? translate(`notificationPreferencesPage.notificationPreferences.${notificationPreferenceValue}`) : '';- After leaving a room (
notificationPreference: 'hidden'),getReportNotificationPreferenceForSettingsreturns'hidden'(for both regular rooms and#adminsrooms), soshouldShowNotificationPrefisfalseand the Notifications field is hidden. - Muted rooms (
'mute') and legacy#adminsrooms with''('always') returnfalsefromisHiddenForCurrentUser(...), so they continue showingMute/Immediately.
- After leaving a room (
- Keep
-
Also guard the Notifications preference screen in
src/pages/settings/Report/DynamicNotificationPreferencePage.tsx:- Re-import
isMoneyRequestReport as isMoneyRequestReportUtilsfrom@libs/ReportUtilsand restore the hidden check alongsideisArchivedNonExpenseReportandisSelfDM(while keepingcurrentUserParticipant/currentUserNotificationPreferenceatlines 33-34intact so saving on a legacy#adminsroom with''still works):const isMoneyRequest = isMoneyRequestReportUtils(report); const shouldDisableNotificationPreferences = isArchivedNonExpenseReport(report, isReportArchived) || isSelfDM(report) || (!isMoneyRequest && isHiddenForCurrentUser(currentNotificationPreference)); - Since
getReportNotificationPreferenceForSettingsreturns'hidden'when!currentUserParticipantas well as afterleaveRoom, this prevents users who left a room from editing notification preferences via deep link without rejoining, while still preserving legacy#adminsrooms (''-> room default).
- Re-import
-
Add unit/component regression tests:
- Test
DynamicReportSettingsPage:- Hides the
Notify me about new messagesrow whenparticipants[accountID].notificationPreferenceis'hidden'(afterleaveRoom), and shows it again once set to'daily'/'always'/'mute'(rejoin or failed leave). - Preserves PR
#101664behavior for legacy#adminsrooms whereparticipants[accountID].notificationPreferenceis''(row remains visible with default value) while hiding an#adminsroom explicitly set to'hidden'.
- Hides the
- Test
DynamicNotificationPreferencePage:- Shows
FullPageNotFoundViewwhen opened for a left/hidden room (notificationPreference: 'hidden'), while remaining editable for'mute','daily','always', and legacy#adminsrooms with''.
- Shows
- Test
What alternative solutions did you explore? (Optional)
- Checking
!isHiddenForCurrentUser(report)(rawgetReportNotificationPreference) instead ofgetReportNotificationPreferenceForSettings: rejected becausegetReportNotificationPreferencereturns'hidden'for legacy#adminsrooms with an empty''preference, which would regress PR#101664. - Modifying
leaveRoom(src/libs/actions/Report/index.ts) to removeparticipants[currentUserAccountID]for workspace rooms: rejected because retaining the participant entry with'hidden'is intentional so workspace members keep room access and can rejoin.
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01f6ba4c6dde3d0fbb
Proposal
Please re-state the problem that we are trying to solve in this issue.
After leaving a workspace room, navigating to the room's Settings page still displays the Notify me about new messages row (showing Hidden), and tapping it navigates to the Notification preferences screen instead of hiding the Notifications field for users who left the room.
What is the root cause of that problem?
- In
src/pages/settings/Report/DynamicReportSettingsPage.tsx(line 63):
When a workspace member leaves a room (const shouldShowNotificationPref = !isMoneyRequestReport && !!currentUserParticipant;leaveRoominsrc/libs/actions/Report/index.ts), their participant record inreport.participants[currentUserAccountID]is intentionally retained withnotificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN('hidden') so the user can still view the room and rejoin. - Because
currentUserParticipantremains defined in Onyx,!!currentUserParticipantevaluates totrue. - Even though
notificationPreferenceValue = getReportNotificationPreferenceForSettings(report, currentUserAccountID)correctly resolves to'hidden',DynamicReportSettingsPagedoes not check!isHiddenForCurrentUser(notificationPreferenceValue)before rendering theMenuItemField. - Additionally, in
src/pages/settings/Report/DynamicNotificationPreferencePage.tsx(line 39),shouldDisableNotificationPreferencesonly checks!currentUserParticipant, so opening or deep-linking to the notification preferences screen remains accessible even after leaving the room.
What changes do you think we should make in order to solve the problem?
-
In
src/pages/settings/Report/DynamicReportSettingsPage.tsx:- Import
isHiddenForCurrentUserfrom@libs/ReportUtils. - Update
shouldShowNotificationPref(line 63) to check!isHiddenForCurrentUser(notificationPreferenceValue):const shouldShowNotificationPref = !isMoneyRequestReport && !isHiddenForCurrentUser(notificationPreferenceValue); const notificationPreference = shouldShowNotificationPref && notificationPreferenceValue ? translate(`notificationPreferencesPage.notificationPreferences.${notificationPreferenceValue}`) : ''; - When a user leaves a room (
notificationPreference: 'hidden'),isHiddenForCurrentUser('hidden')returnstrue, soshouldShowNotificationPrefevaluates tofalseand the Notifications row is cleanly hidden. - For active members, muted rooms (
'mute'), and legacy#adminsrooms (''-> default'always'),isHiddenForCurrentUser(...)returnsfalse, so they remain visible as intended by PR #101664.
- Import
-
In
src/pages/settings/Report/DynamicNotificationPreferencePage.tsx:- Update
shouldDisableNotificationPreferences(line 39) to also guard against hidden preference:const shouldDisableNotificationPreferences = isArchivedNonExpenseReport(report, isReportArchived) || isSelfDM(report) || isHiddenForCurrentUser(currentNotificationPreference); - This ensures users who left the room cannot edit notification preferences via direct navigation without rejoining, displaying
FullPageNotFoundView.
- Update
-
Unit Tests:
- Add unit test coverage in
tests/unit/ReportUtilsTest.ts:- Assert that
DynamicReportSettingsPagehides the Notification preference row whenparticipant.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN. - Assert that
DynamicNotificationPreferencePagedisables editing / renders not found when the preference is'hidden'. - Assert that active rooms, muted rooms, and legacy admin rooms with empty strings continue to show the row.
- Assert that
- Add unit test coverage in
What alternative solutions did you explore? (Optional)
- Modifying
leaveRoominsrc/libs/actions/Report/index.tsto deletereport.participants[currentUserAccountID]: rejected because retaining the participant entry with'hidden'is intentional in Expensify so workspace members keep access and can rejoin.
⚠️ Invalid email. Please make sure to create an Expensify account with this email first here.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01f6ba4c6dde3d0fbb
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@MelvinBot implement this
Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
🤖 Web test steps verification results: ✅ pass
All four checks passed on dev NewDot web. Setup: created a workspace and room.
| Step | Status |
|---|---|
New room defaults to Daily notificationsHeader → Settings showed Daily. |
✅ |
Notifications absent after leavingSettings showed only Who can post and Visibility.![]() |
✅ |
Notifications return after rejoiningRejoining restored the Daily notification row. |
✅ |
Muted room notifications remain editableSaved Mute, then successfully changed to Immediately.![]() |
✅ |
Implemented in draft PR: Hide room notification settings after leaving, assigned to bernhardoj. Five regression tests, lint, formatting, spelling, and typecheck passed. Full Jest, Storybook, and changed-file compiler checks timed out; limitations are documented in the PR.
view run · no recording available
@bernhardoj
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.42-2 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/107213
If no regressions arise, payment will be issued on 2026-11-26. :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]
@bernhardoj Huh... This is 4 days overdue. Who can take care of this?
Triggered auto assignment to @mallenexpensify (Awaiting Payment)
Payment Summary
Resolving PRs:
-
https://github.com/Expensify/App/pull/107213
-
Reviewer: @bernhardoj owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
- [ ] I have confirmed assignees, roles, and Upwork contracts look correct
- [ ] I have paid out Upwork contracts / manual NewDot requests
- [ ] [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
Contributor+ Checklist:
-
[x] [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: https://github.com/Expensify/App/pull/101664/changes#r4702785910 Link to the comment on the Issue: E/E issue
-
[x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
-
[x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
- joined a room
Test:
- Open the report settings
- Verify there is a "Notify me ..." setting
- Leave the room
- Open the report settings
- Verify there is no "Notify me ..." setting
Do we agree 👍 or 👎
@mallenexpensify Huh... This is 4 days overdue. Who can take care of this?
Matt's AI agent:
Prep notes for the CM. This is not a payment approval. Do not request payment until the CM posts the final amount.
Ready.
Job price: $175.
- bernhardoj (C+): 100%, via NewDot
Price basis: standard, no Help Wanted.
Next: press Caps+Y, then pay.
Evidence
PAYPREP v1
