You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After changing role to approve-only, room creation message reappears after clicking Yes #106891
Version Number: 9.5.39-1 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#106371 Email or phone of affected tester (no customers):jnsoidsojiosjijsiodjo2@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Chat Report View
Action Performed:
Precondition:
User B has a default workspace.
User A creates a Control workspace.
User A invites User B to workspace.
Perform the steps below as User B:
Go to staging.new.expensify.com
Go to workspace chat.
Send a non-existing room mention (eg, #hey).
As User A, change User's B role to approve-only.
As User B, click Yes on room creation message from Concierge.
Expected Result:
After changing User B's role to approve-only, room creation message from Concierge should disappear.
Actual Result:
After changing User B's role to approve-only, room creation message from Concierge persists.
After clicking Yes, the message disappears and reappears.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Unsupported for Melvin App testing: the required two-user setup is unavailable. This is a verification blocker, not a confirmed product failure.
Step
Status
Required A/B setup is availableOnly one signed-in session is supported; changing B’s role as A while preserving B’s session could not be verified. No runtime reproduction or API response was captured.
❌
Proposal
What is the root cause of that problem?
Likely release trigger:Enable approve-only role assignment re-enabled a role that exposes an existing permission gap—not a newly introduced whisper-rendering bug.
The room-creation prompt checks whether it is unresolved, but does not react to losing room-creation permission. Clicking Yes optimistically hides it; the failure rollback makes it visible again.
Confidence: High that the PR re-enabled the affected state; medium in the complete runtime explanation. Authorization rejection remains unconfirmed without the API response.
What changes do you think we should make in order to solve the problem?
Safest immediate mitigation: revert the assignment-enabling PR while validating a targeted fix. This prevents new assignments through App; it does not repair existing approve-only memberships.
For the permanent fix, hide the entire creation prompt when room-creation permission is lost in the target workspace, and recheck permission when activating it. Preserve ordinary chat access. Verify the exact two-user reproduction and API response before changing rollback behavior.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/106891) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Please re-state the problem that we are trying to solve in this issue.
When User B is a workspace member and sends a non-existing room mention (e.g. #hey) in a workspace chat, Concierge sends an actionable room-creation whisper (ACTIONABLE_REPORT_MENTION_WHISPER — "Do you want to create #hey?" with Yes / No buttons). If User A then changes User B's workspace role to Approve-only (CONST.POLICY.ROLE.APPROVE_ONLY), the room-creation whisper remains visible to User B, and clicking Yes optimistically hides the whisper only for the backend ResolveActionableReportMentionWhisper command to fail and roll back, making the whisper reappear.
What is the root cause of that problem?
Under ROLE_PERMISSION_BUNDLES in src/libs/PolicyUtils/permissions.ts:112-115, the CONST.POLICY.ROLE.APPROVE_ONLY role only grants read access to OVERVIEW and MEMBERS — it does not grant CONST.POLICY.POLICY_FEATURE.ROOMS write permission (canMemberWrite(policy, login, CONST.POLICY.POLICY_FEATURE.ROOMS) is false).
However, the visibility and rendering of ACTIONABLE_REPORT_MENTION_WHISPER only check generic report write capability (canUserPerformWriteAction) rather than workspace room-creation permission (CONST.POLICY.POLICY_FEATURE.ROOMS):
In src/libs/ReportActionsUtils.ts:1786-1794 (shouldReportActionBeVisible) and src/libs/ReportActionsUtils.ts:1884-1886 (isReportActionVisible), isActionableReportMentionWhisper(reportAction) only hides the whisper when !canUserPerformWriteAction. Because an Approve-only member can still post comments in the chat room they are already in (canUserPerformWriteAction is true), isReportActionVisible continues to return true.
Furthermore, the derived Onyx value ONYXKEYS.DERIVED.VISIBLE_REPORT_ACTIONS (src/libs/actions/OnyxDerived/configs/visibleReportActions.ts:61) only depends on [ONYXKEYS.COLLECTION.REPORT_ACTIONS, ONYXKEYS.SESSION, ONYXKEYS.COLLECTION.REPORT, ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS] and does not subscribe to ONYXKEYS.COLLECTION.POLICY, while useReportActionsVisibility (src/hooks/useReportActionsVisibility.ts:86-103) does not check whether the user has CONST.POLICY.POLICY_FEATURE.ROOMS write permission on the report's policy for isActionableReportMentionWhisper.
Consequently, after User B's role changes to approve_only:
The ACTIONABLE_REPORT_MENTION_WHISPER remains visible in ReportActionsList.
When User B clicks Yes in src/pages/inbox/report/actionContents/ReportMentionWhisperContent.tsx:55-57, resolveActionableReportMentionWhisper (src/libs/actions/Report/index.ts:7063-7134) optimistically sets originalMessage.resolution = CONST.REPORT.ACTIONABLE_REPORT_MENTION_WHISPER_RESOLUTION.CREATE (hiding the whisper via isResolvedActionableWhisper), sends WRITE_COMMANDS.RESOLVE_ACTIONABLE_REPORT_MENTION_WHISPER to the server, and when the server rejects room creation for the approve_only role, failureData (src/libs/actions/Report/index.ts:7108-7126) resets originalMessage.resolution back to null, causing the whisper to reappear.
What changes do you think we should make in order to solve the problem?
Instead of reverting PR #106371, we should gate the visibility and execution of ACTIONABLE_REPORT_MENTION_WHISPER on whether the current user has permission to create rooms (canMemberWrite(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.ROOMS)) in the workspace that owns the report:
Check room-creation permission in useReportActionsVisibility.ts (and useMoneyRequestReportVisibleActions.ts) so the whisper Reactive-hides immediately when the user's policy role changes to approve_only:
In src/hooks/useReportActionsVisibility.ts:
Subscribe to the report's policy (const [policy] = useOnyx(\${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`);) and read login: currentUserLoginfromuseCurrentUserPersonalDetails()`.
Inside the visibleReportActions filter (src/hooks/useReportActionsVisibility.ts:86-103), hide unresolved isActionableReportMentionWhisper(reportAction) when !canCreatePolicyRooms:
Enforce the same check in shouldReportActionBeVisible / isReportActionVisibleAsLastAction (src/libs/ReportActionsUtils.ts) and ReportMentionWhisperContent.tsx:
In src/pages/inbox/report/actionContents/ReportMentionWhisperContent.tsx, subscribe to the policy of actionOwnerReportStable?.policyID (via usePolicy(actionOwnerReportStable?.policyID)) and current user login (useCurrentUserPersonalDetails()), and guard both rendering and the Yes button handler with canMemberWrite(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.ROOMS) so an unauthorized user can neither see nor trigger room creation.
What alternative solutions did you explore? (Optional)
Reverting PR #106371: Unnecessary and undesirable because #106371 intentionally enabled the Approve-only role across Control workspaces; gating ACTIONABLE_REPORT_MENTION_WHISPER on canMemberWrite(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.ROOMS) directly aligns the whisper with WorkspaceRoomCreatePage.tsx:25 and getPoliciesForRoomCreation (src/libs/PolicyUtils/policy.ts:150).
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.51-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
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]
Activity
applause-bot commentedon Nov 13, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/7aa558652852e25538cde48887c8e958ef90d5929248a1220ddbfb89ac64cf61
melvin-bot commentedon Nov 13, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #106371
melvin-bot commentedon Nov 13, 2026
@flodnv you have been assigned to this deploy blocker because you reviewed the offending PR: #106371
melvin-bot commentedon Nov 13, 2026
@ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #106371
github-actions commentedon Nov 13, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Nov 13, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Nov 13, 2026
🤖 Web test steps verification results: ❌ fail
Unsupported for Melvin App testing: the required two-user setup is unavailable. This is a verification blocker, not a confirmed product failure.
Required A/B setup is available
Only one signed-in session is supported; changing B’s role as A while preserving B’s session could not be verified. No runtime reproduction or API response was captured.Proposal
What is the root cause of that problem?
Likely release trigger: Enable approve-only role assignment re-enabled a role that exposes an existing permission gap—not a newly introduced whisper-rendering bug.
The room-creation prompt checks whether it is unresolved, but does not react to losing room-creation permission. Clicking Yes optimistically hides it; the failure rollback makes it visible again.
Code evidence and confidence
Confidence: High that the PR re-enabled the affected state; medium in the complete runtime explanation. Authorization rejection remains unconfirmed without the API response.
What changes do you think we should make in order to solve the problem?
Safest immediate mitigation: revert the assignment-enabling PR while validating a targeted fix. This prevents new assignments through App; it does not repair existing approve-only memberships.
For the permanent fix, hide the entire creation prompt when room-creation permission is lost in the target workspace, and recheck permission when activating it. Preserve ordinary chat access. Verify the exact two-user reproduction and API response before changing rollback behavior.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/106891)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
cocvn157 commentedon Nov 14, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When User B is a workspace member and sends a non-existing room mention (e.g.
#hey) in a workspace chat, Concierge sends an actionable room-creation whisper (ACTIONABLE_REPORT_MENTION_WHISPER— "Do you want to create #hey?" with Yes / No buttons). If User A then changes User B's workspace role to Approve-only (CONST.POLICY.ROLE.APPROVE_ONLY), the room-creation whisper remains visible to User B, and clicking Yes optimistically hides the whisper only for the backendResolveActionableReportMentionWhispercommand to fail and roll back, making the whisper reappear.What is the root cause of that problem?
ROLE_PERMISSION_BUNDLESinsrc/libs/PolicyUtils/permissions.ts:112-115, theCONST.POLICY.ROLE.APPROVE_ONLYrole only grants read access toOVERVIEWandMEMBERS— it does not grantCONST.POLICY.POLICY_FEATURE.ROOMSwrite permission (canMemberWrite(policy, login, CONST.POLICY.POLICY_FEATURE.ROOMS)isfalse).ACTIONABLE_REPORT_MENTION_WHISPERonly check generic report write capability (canUserPerformWriteAction) rather than workspace room-creation permission (CONST.POLICY.POLICY_FEATURE.ROOMS):src/libs/ReportActionsUtils.ts:1786-1794(shouldReportActionBeVisible) andsrc/libs/ReportActionsUtils.ts:1884-1886(isReportActionVisible),isActionableReportMentionWhisper(reportAction)only hides the whisper when!canUserPerformWriteAction. Because an Approve-only member can still post comments in the chat room they are already in (canUserPerformWriteActionistrue),isReportActionVisiblecontinues to returntrue.ONYXKEYS.DERIVED.VISIBLE_REPORT_ACTIONS(src/libs/actions/OnyxDerived/configs/visibleReportActions.ts:61) only depends on[ONYXKEYS.COLLECTION.REPORT_ACTIONS, ONYXKEYS.SESSION, ONYXKEYS.COLLECTION.REPORT, ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS]and does not subscribe toONYXKEYS.COLLECTION.POLICY, whileuseReportActionsVisibility(src/hooks/useReportActionsVisibility.ts:86-103) does not check whether the user hasCONST.POLICY.POLICY_FEATURE.ROOMSwrite permission on the report's policy forisActionableReportMentionWhisper.approve_only:ACTIONABLE_REPORT_MENTION_WHISPERremains visible inReportActionsList.src/pages/inbox/report/actionContents/ReportMentionWhisperContent.tsx:55-57,resolveActionableReportMentionWhisper(src/libs/actions/Report/index.ts:7063-7134) optimistically setsoriginalMessage.resolution = CONST.REPORT.ACTIONABLE_REPORT_MENTION_WHISPER_RESOLUTION.CREATE(hiding the whisper viaisResolvedActionableWhisper), sendsWRITE_COMMANDS.RESOLVE_ACTIONABLE_REPORT_MENTION_WHISPERto the server, and when the server rejects room creation for theapprove_onlyrole,failureData(src/libs/actions/Report/index.ts:7108-7126) resetsoriginalMessage.resolutionback tonull, causing the whisper to reappear.What changes do you think we should make in order to solve the problem?
Instead of reverting PR
#106371, we should gate the visibility and execution ofACTIONABLE_REPORT_MENTION_WHISPERon whether the current user has permission to create rooms (canMemberWrite(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.ROOMS)) in the workspace that owns the report:useReportActionsVisibility.ts(anduseMoneyRequestReportVisibleActions.ts) so the whisper Reactive-hides immediately when the user's policy role changes toapprove_only:In
src/hooks/useReportActionsVisibility.ts:const [policy] = useOnyx(\${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`);) and readlogin: currentUserLoginfromuseCurrentUserPersonalDetails()`.const canCreatePolicyRooms = !report?.policyID || canMemberWrite(policy, currentUserLogin ?? '', CONST.POLICY.POLICY_FEATURE.ROOMS);.visibleReportActionsfilter (src/hooks/useReportActionsVisibility.ts:86-103), hide unresolvedisActionableReportMentionWhisper(reportAction)when!canCreatePolicyRooms:shouldReportActionBeVisible/isReportActionVisibleAsLastAction(src/libs/ReportActionsUtils.ts) andReportMentionWhisperContent.tsx:src/pages/inbox/report/actionContents/ReportMentionWhisperContent.tsx, subscribe to the policy ofactionOwnerReportStable?.policyID(viausePolicy(actionOwnerReportStable?.policyID)) and current user login (useCurrentUserPersonalDetails()), and guard both rendering and the Yes button handler withcanMemberWrite(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.ROOMS)so an unauthorized user can neither see nor trigger room creation.What alternative solutions did you explore? (Optional)
#106371: Unnecessary and undesirable because#106371intentionally enabled theApprove-onlyrole across Control workspaces; gatingACTIONABLE_REPORT_MENTION_WHISPERoncanMemberWrite(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.ROOMS)directly aligns the whisper withWorkspaceRoomCreatePage.tsx:25andgetPoliciesForRoomCreation(src/libs/PolicyUtils/policy.ts:150).melvin-bot commentedon Nov 21, 2026
@flodnv @ShridharGoel
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.51-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
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]