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
LHN - Invited workspace chat still shows GBR after changing role to approve-only #106887
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: Money Requests
Action Performed:
Precondition:
User A creates a Control workspace.
User A invites User B to workspace.
User B creates a workspace and make it default workspace.
Go to staging.new.expensify.com
[User B] Create an expense in the invited workspace chat.
[User A] Change User B's role to Approve-only in workspace settings > Members.
[User B] Reopen the invited workspace chat.
Expected Result:
Workspace chat will not show GBR because Submit button is hidden from the expense report.
Actual Result:
Workspace chat shows GBR when Submit button is hidden from the expense report.
👋 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.
Release recommendation: Revert Enable approve-only role assignment while completing regression coverage. Keep this issue as a deploy blocker.
What is the root cause of that problem?
The Submit button and workspace-chat green dot use different eligibility checks. Approve-only correctly disables submission, but the green-dot fallback suppresses outstanding requests only for empty reports. The reported flow creates an expense first, so a nonempty report can retain its dot despite having no Submit action.
Confidence: Medium-high from code and release evidence; browser reproduction and affected runtime data remain unverified.
The assignment PR exposes the incomplete fallback; it did not introduce that fallback itself. The remaining assumption is that the affected chat retains hasOutstandingChildRequest: true. No affected Onyx snapshot was captured.
What changes do you think we should make in order to solve the problem?
Immediate mitigation: Revert the assignment-enablement PR. This prevents new assignments through that UI, but does not undo existing approve-only assignments or guarantee existing dots disappear.
Follow-up fix direction: Verify the affected chat’s outstanding-child flag and derived attention reason, then make the fallback respect actionable permissions for nonempty reports too. Preserve legitimate approval actions, sibling reports, tasks, and mentions.
Validate member → approve-only → member transitions, including reopening and refreshing the chat.
What alternative solutions did you explore? (Optional)
Restoring Submit is not appropriate: hiding it is the intended permission restriction. A backend-only explanation is not established because the frontend contains an independent path producing this symptom.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/106887) 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 who creates an expense in an invited workspace chat (leaving an open, non-empty expense report with hasOutstandingChildRequest: true on the workspace chat), and User A then changes User B's role to Approve-only (CONST.POLICY.ROLE.APPROVE_ONLY), the Submit button is hidden from the expense report (canSubmitReport returns false), yet the Left Hand Navigation (LHN) row for the workspace chat still displays a Green Brick Road (GBR) indicator.
What is the root cause of that problem?
In src/libs/ReportUtils.ts:3575-3615, canSubmitReport checks canSubmitOwnReportOnPolicy(policy, currentUserEmailParam):
constisReportSubmitter=report?.ownerAccountID===currentUserAccountID;// A role that cannot create expenses cannot submit its own report.constcanSubmitOwnReport=!isReportSubmitter||canSubmitOwnReportOnPolicy(policy,currentUserEmailParam);
When User B's role is changed to CONST.POLICY.ROLE.APPROVE_ONLY, canSubmitOwnReportOnPolicy returns false, so canSubmitReport returns false and getIOUReportActionWithBadge (src/libs/ReportUtils.ts:3618-3730) returns {reportAction: undefined, actionBadge: undefined} (no SUBMIT or ADD badge).
However, in getReasonAndReportActionThatRequiresAttention (src/libs/ReportUtils.ts:5429-5438), the fallback check for optionOrReport.hasOutstandingChildRequest === true only suppresses hasOutstandingChildRequest when (iouReport?.transactionCount ?? 0) === 0:
// The bare outstanding-child flag only asks the owner to add expenses to their open report, so it is ignored when the current user cannot create expenses on that workspace.constisBareOutstandingChildIgnorable=!iouReportActionToApproveOrPay?.reportActionID&&isOpenExpenseReport(iouReport)&&(iouReport?.transactionCount??0)===0&&iouReport?.ownerAccountID===currentUserAccountID&&!canCreateExpensesOnPolicy(resolvePolicy(iouReport?.policyID),currentUserLogin);consthasValidIOUAction=((optionOrReport.hasOutstandingChildRequest===true&&!hasStaleChildRequest&&!isBareOutstandingChildIgnorable)||dotCandidateAction?.reportActionID)&&!hasOnlyPendingTransactions&&!isFallbackReportExcludedForHeldExpenses;
Because User B created an expense before their role was changed to approve_only, (iouReport?.transactionCount ?? 0) is >= 1 (!== 0). As a result:
iouReportActionToApproveOrPay?.reportActionID is undefined (because canSubmitReport is false for approve_only),
isBareOutstandingChildIgnorable evaluates to false solely because (iouReport?.transactionCount ?? 0) === 0 is false,
hasValidIOUAction evaluates to true via optionOrReport.hasOutstandingChildRequest === true, causing getReasonAndReportActionThatRequiresAttention (src/libs/ReportUtils.ts:5492-5497) to return CONST.REQUIRES_ATTENTION_REASONS.HAS_CHILD_REPORT_AWAITING_ACTION and show the GBR dot on the workspace chat in the LHN even though User B can neither add expenses nor submit the open expense report.
What changes do you think we should make in order to solve the problem?
Remove the (iouReport?.transactionCount ?? 0) === 0 restriction from isBareOutstandingChildIgnorable in src/libs/ReportUtils.ts:5429-5435:
When !iouReportActionToApproveOrPay?.reportActionID (meaning getIOUReportActionWithBadge already verified that there is no actionable SUBMIT, APPROVE, PAY, or ADD action for the current user across the chat's child reports), and the fallback iouReport is an open expense report (isOpenExpenseReport(iouReport)) owned by currentUserAccountID on a policy where !canCreateExpensesOnPolicy(resolvePolicy(iouReport?.policyID), currentUserLogin) (or !canSubmitOwnReportOnPolicy), the current user cannot add expenses to or submit that open report regardless of whether transactionCount is 0 or > 0:
// When no actionable IOU badge action was found and the open child report belongs to the current user,// ignore the bare outstanding-child flag if the user's role cannot create/submit expenses on that workspace.constisBareOutstandingChildIgnorable=!iouReportActionToApproveOrPay?.reportActionID&&isOpenExpenseReport(iouReport)&&iouReport?.ownerAccountID===currentUserAccountID&&!canCreateExpensesOnPolicy(resolvePolicy(iouReport?.policyID),currentUserLogin);
What alternative solutions did you explore? (Optional)
Reverting PR #106371: Unnecessary because #106371 intentionally enabled the Approve-only role, and this GBR mismatch is caused by the overly narrow (iouReport?.transactionCount ?? 0) === 0 check in isBareOutstandingChildIgnorable (src/libs/ReportUtils.ts:5432).
Also checking ONYXKEYS.DERIVED.REPORT_ATTRIBUTES dependencies: src/libs/actions/OnyxDerived/configs/reportAttributes.ts already subscribes to ONYXKEYS.COLLECTION.POLICY and passes policies into getReasonAndReportActionThatRequiresAttention, so removing (iouReport?.transactionCount ?? 0) === 0 immediately updates requiresAttention and clears the LHN GBR as soon as the member's role changes to approve_only.
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/1751df34844fae6f56c87588c05d5dc9cea6d867d3113e8fab727cda38e0fbfb
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
melvin-bot commentedon Nov 13, 2026
💬 A slack conversation has been started in #expensify-open-source
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:
MelvinBot commentedon Nov 13, 2026
Proposal
Release recommendation: Revert Enable approve-only role assignment while completing regression coverage. Keep this issue as a deploy blocker.
What is the root cause of that problem?
The Submit button and workspace-chat green dot use different eligibility checks. Approve-only correctly disables submission, but the green-dot fallback suppresses outstanding requests only for empty reports. The reported flow creates an expense first, so a nonempty report can retain its dot despite having no Submit action.
Confidence: Medium-high from code and release evidence; browser reproduction and affected runtime data remain unverified.
Code and release evidence
ReportUtils.ts:3575–3615rejects submission without expense-creation permission.ReportUtils.ts:5409–5438can independently accepthasOutstandingChildRequest, with permission-based suppression restricted to zero transactions.ReportUtils.ts:5492–5497.The assignment PR exposes the incomplete fallback; it did not introduce that fallback itself. The remaining assumption is that the affected chat retains
hasOutstandingChildRequest: true. No affected Onyx snapshot was captured.What changes do you think we should make in order to solve the problem?
Immediate mitigation: Revert the assignment-enablement PR. This prevents new assignments through that UI, but does not undo existing approve-only assignments or guarantee existing dots disappear.
Follow-up fix direction: Verify the affected chat’s outstanding-child flag and derived attention reason, then make the fallback respect actionable permissions for nonempty reports too. Preserve legitimate approval actions, sibling reports, tasks, and mentions.
Validate member → approve-only → member transitions, including reopening and refreshing the chat.
What alternative solutions did you explore? (Optional)
Restoring Submit is not appropriate: hiding it is the intended permission restriction. A backend-only explanation is not established because the frontend contains an independent path producing this symptom.
Related: Home shows “Submit 1 report” after the same role change merits coordinated testing, but a shared root cause is not yet proven.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/106887)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 who creates an expense in an invited workspace chat (leaving an open, non-empty expense report with
hasOutstandingChildRequest: trueon the workspace chat), and User A then changes User B's role to Approve-only (CONST.POLICY.ROLE.APPROVE_ONLY), the Submit button is hidden from the expense report (canSubmitReportreturnsfalse), yet the Left Hand Navigation (LHN) row for the workspace chat still displays a Green Brick Road (GBR) indicator.What is the root cause of that problem?
src/libs/ReportUtils.ts:3575-3615,canSubmitReportcheckscanSubmitOwnReportOnPolicy(policy, currentUserEmailParam):CONST.POLICY.ROLE.APPROVE_ONLY,canSubmitOwnReportOnPolicyreturnsfalse, socanSubmitReportreturnsfalseandgetIOUReportActionWithBadge(src/libs/ReportUtils.ts:3618-3730) returns{reportAction: undefined, actionBadge: undefined}(noSUBMITorADDbadge).getReasonAndReportActionThatRequiresAttention(src/libs/ReportUtils.ts:5429-5438), the fallback check foroptionOrReport.hasOutstandingChildRequest === trueonly suppresseshasOutstandingChildRequestwhen(iouReport?.transactionCount ?? 0) === 0:approve_only,(iouReport?.transactionCount ?? 0)is>= 1(!== 0). As a result:iouReportActionToApproveOrPay?.reportActionIDisundefined(becausecanSubmitReportisfalseforapprove_only),isBareOutstandingChildIgnorableevaluates tofalsesolely because(iouReport?.transactionCount ?? 0) === 0isfalse,hasValidIOUActionevaluates totrueviaoptionOrReport.hasOutstandingChildRequest === true, causinggetReasonAndReportActionThatRequiresAttention(src/libs/ReportUtils.ts:5492-5497) to returnCONST.REQUIRES_ATTENTION_REASONS.HAS_CHILD_REPORT_AWAITING_ACTIONand show the GBR dot on the workspace chat in the LHN even though User B can neither add expenses nor submit the open expense report.What changes do you think we should make in order to solve the problem?
Remove the
(iouReport?.transactionCount ?? 0) === 0restriction fromisBareOutstandingChildIgnorableinsrc/libs/ReportUtils.ts:5429-5435:When
!iouReportActionToApproveOrPay?.reportActionID(meaninggetIOUReportActionWithBadgealready verified that there is no actionableSUBMIT,APPROVE,PAY, orADDaction for the current user across the chat's child reports), and the fallbackiouReportis an open expense report (isOpenExpenseReport(iouReport)) owned bycurrentUserAccountIDon a policy where!canCreateExpensesOnPolicy(resolvePolicy(iouReport?.policyID), currentUserLogin)(or!canSubmitOwnReportOnPolicy), the current user cannot add expenses to or submit that open report regardless of whethertransactionCountis0or> 0:What alternative solutions did you explore? (Optional)
#106371: Unnecessary because#106371intentionally enabled theApprove-onlyrole, and this GBR mismatch is caused by the overly narrow(iouReport?.transactionCount ?? 0) === 0check inisBareOutstandingChildIgnorable(src/libs/ReportUtils.ts:5432).ONYXKEYS.DERIVED.REPORT_ATTRIBUTESdependencies:src/libs/actions/OnyxDerived/configs/reportAttributes.tsalready subscribes toONYXKEYS.COLLECTION.POLICYand passespoliciesintogetReasonAndReportActionThatRequiresAttention, so removing(iouReport?.transactionCount ?? 0) === 0immediately updatesrequiresAttentionand clears the LHN GBR as soon as the member's role changes toapprove_only.