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
[$250] "Mark as done" is not shown for "Organize my personal spending' #93369
Version Number: v9.4.6-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:#92254 Email or phone of affected tester (no customers):gibethlehem@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: macOS/chrome App Component: Chat Report View
The "Mark as done" copy from PR #92254 is only wired into the Submit and Approve primary-action buttons. For the Organize my personal spending flow the report's primary action resolves to Pay, and the Pay button was never given the "Mark as done" copy — so it shows "pay".
The primary action falls through to Pay. In getReportPrimaryAction, Submit is checked before Pay, but isSubmitAction requires the report to still be Open (ReportPrimaryActionUtils.ts:153). The expense is auto-submitted on creation, so the report is no longer Open → Submit is skipped and Pay wins.
The gate itself also excludes this case: shouldShowMarkAsDone requires isSubmitAndClose(policy) (= approvalMode === OPTIONAL, PolicyUtils.ts:1273). A report that offers a Pay action is, by definition, not submit-and-close, so shouldShowMarkAsDone returns false regardless of which button is rendered.
Why this workspace produces a Pay action (config detail)
PERSONAL_SPEND ("Organize my personal spending") is a track-onboarding choice (OnboardingUtils.ts:12-14). The App's own optimistic workspace creation sets approvalMode = BASIC for it (via getApprovalModeForNewWorkspace — shouldEnableWorkflowsByDefault is true and the choice isn't TRACK_WORKSPACE) and reimbursementChoice = REIMBURSEMENT_NO (Policy.ts:2645-2648). Neither of those is OPTIONAL approval, so isSubmitAndClose is false. The observed Pay button additionally implies payments are enabled on the staging workspace, which diverges from the optimistic config above — that final policy config is decided by the backend. So whether a Pay action should appear here at all depends on the workspace's backend configuration, which can't be inspected from the App repo.
Recommended Fix
Pick based on the intended product behavior for these self-tracking reports:
If the report should never offer Pay (the user is just tracking their own spend): the workspace should be submit-and-close with payments disabled so the action stays Submit → "Mark as done". This is a workspace-configuration concern that is decided by the backend (outside the App repo) and should be verified by an internal engineer — the App's optimistic config already sets reimbursementChoice = REIMBURSEMENT_NO, so the staging workspace appears to enable payments anyway.
If "Mark as done" should replace "pay" for these users (App-side): apply the track-intent copy to the Pay primary action (PayPrimaryAction.tsx + PayActionButton.tsx) and broaden the gate so a track-intent self-payer report qualifies — shouldShowMarkAsDone currently can't match a payable report because of the isSubmitAndClose requirement.
I'd recommend confirming the staging workspace's approvalMode/reimbursementChoice first, since that determines which of the two is correct.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93369) 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.
A user who onboards with "Organize my personal spending" and creates an expense sees a primary CTA labelled "Pay", but for these track-intent users it should read "Mark as done".
What is the root cause of that problem?
The "Mark as done" copy is gated by shouldShowMarkAsDone(), which returns true exactly for this scenario — a track-intent user (PERSONAL_SPEND/TRACK_WORKSPACE) on a submit-and-close policy who owns the report and is submitting to self.
But the report here does not resolve to Submit. In a reimbursement-enabled personal workspace the expense auto-advances past OPEN, so isSubmitAction (which requires an open report) is false and getReportPrimaryAction falls through to PAY:
This mirrors the Submit/Approve pattern and only changes the visible label — payment behaviour, amount and dropdown stay untouched, and non-track-intent users keep "Pay" since the flag is false for them.
What alternative solutions did you explore? (Optional)
Keep these reports on the Submit action (where relabel already works) — rejected: changes report lifecycle/state, far riskier than a copy fix.
Relabel inside SettlementButton itself — rejected: it is shared by many non-track-intent flows; gating belongs at the call site.
changed the title [-]"Mark as done" is not shown for "Organize my personal spending'[/-][+][$250] "Mark as done" is not shown for "Organize my personal spending'[/+]on Jun 12, 2026
⚠️@aswin-s Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
Activity
applause-bot commentedon Jun 12, 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/f6c09c31976b720409a1cea2f382287057334e3a9c06ef19319904bd743b4a5d
MelvinBot commentedon Jun 12, 2026
Proposal
Root Cause
The
"Mark as done"copy from PR #92254 is only wired into the Submit and Approve primary-action buttons. For the Organize my personal spending flow the report's primary action resolves to Pay, and the Pay button was never given the"Mark as done"copy — so it shows"pay".Two things combine to produce this:
The Pay button has no track-intent copy. Only
SubmitPrimaryAction.tsx:126andApprovePrimaryAction.tsx:41checkshouldUseMarkAsDoneCopy.PayPrimaryAction.tsxand the preview'sPayActionButton.tsxhave no equivalent.The primary action falls through to Pay. In
getReportPrimaryAction, Submit is checked before Pay, butisSubmitActionrequires the report to still be Open (ReportPrimaryActionUtils.ts:153). The expense is auto-submitted on creation, so the report is no longer Open → Submit is skipped and Pay wins.The gate itself also excludes this case:
shouldShowMarkAsDonerequiresisSubmitAndClose(policy)(=approvalMode === OPTIONAL,PolicyUtils.ts:1273). A report that offers a Pay action is, by definition, not submit-and-close, soshouldShowMarkAsDonereturnsfalseregardless of which button is rendered.Why this workspace produces a Pay action (config detail)
PERSONAL_SPEND("Organize my personal spending") is a track-onboarding choice (OnboardingUtils.ts:12-14). The App's own optimistic workspace creation setsapprovalMode = BASICfor it (viagetApprovalModeForNewWorkspace—shouldEnableWorkflowsByDefaultistrueand the choice isn'tTRACK_WORKSPACE) andreimbursementChoice = REIMBURSEMENT_NO(Policy.ts:2645-2648). Neither of those isOPTIONALapproval, soisSubmitAndCloseisfalse. The observed Pay button additionally implies payments are enabled on the staging workspace, which diverges from the optimistic config above — that final policy config is decided by the backend. So whether a Pay action should appear here at all depends on the workspace's backend configuration, which can't be inspected from the App repo.Recommended Fix
Pick based on the intended product behavior for these self-tracking reports:
"Mark as done". This is a workspace-configuration concern that is decided by the backend (outside the App repo) and should be verified by an internal engineer — the App's optimistic config already setsreimbursementChoice = REIMBURSEMENT_NO, so the staging workspace appears to enable payments anyway."Mark as done"should replace"pay"for these users (App-side): apply the track-intent copy to the Pay primary action (PayPrimaryAction.tsx+PayActionButton.tsx) and broaden the gate so a track-intent self-payer report qualifies —shouldShowMarkAsDonecurrently can't match a payable report because of theisSubmitAndCloserequirement.I'd recommend confirming the staging workspace's
approvalMode/reimbursementChoicefirst, since that determines which of the two is correct.Related
Expensify/App#93367— "Expense - Wrong next step action when primary action button is Mark as done" (DeployBlockerCash), also stemming from PR Issue 86223 update cta and workspace chat copy for track intent users #92254.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93369)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
ahmdshrif commentedon Jun 12, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
A user who onboards with "Organize my personal spending" and creates an expense sees a primary CTA labelled "Pay", but for these track-intent users it should read "Mark as done".
What is the root cause of that problem?
The "Mark as done" copy is gated by
shouldShowMarkAsDone(), which returns true exactly for this scenario — a track-intent user (PERSONAL_SPEND/TRACK_WORKSPACE) on a submit-and-close policy who owns the report and is submitting to self.App/src/libs/ReportUtils.ts
Lines 13002 to 13006 in 23e38e8
That helper is wired into the Submit CTA (and Approve), swapping
common.submit→common.markAsDone:App/src/components/MoneyReportHeaderPrimaryAction/SubmitPrimaryAction.tsx
Lines 75 to 126 in 23e38e8
But the report here does not resolve to Submit. In a reimbursement-enabled personal workspace the expense auto-advances past
OPEN, soisSubmitAction(which requires an open report) is false andgetReportPrimaryActionfalls through toPAY:App/src/libs/ReportPrimaryActionUtils.ts
Lines 507 to 526 in 23e38e8
PayPrimaryActionrendersAnimatedSettlementButtonand never consultsshouldShowMarkAsDone(), so its label stays the default "Pay":App/src/components/MoneyReportHeaderPrimaryAction/PayPrimaryAction.tsx
Lines 184 to 204 in 23e38e8
The relabel covered every CTA except the Pay action — the one this flow actually produces — hence "Pay" instead of "Mark as done".
What changes do you think we should make in order to solve the problem?
In
PayPrimaryAction, compute the same flag the Submit button uses and pass a "Mark as done" label down to the settlement button when it is set:This mirrors the Submit/Approve pattern and only changes the visible label — payment behaviour, amount and dropdown stay untouched, and non-track-intent users keep "Pay" since the flag is false for them.
What alternative solutions did you explore? (Optional)
SettlementButtonitself — rejected: it is shared by many non-track-intent flows; gating belongs at the call site.melvin-bot commentedon Jun 12, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)melvin-bot commentedon Jun 12, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022065256576718748357
[-]"Mark as done" is not shown for "Organize my personal spending'[/-][+][$250] "Mark as done" is not shown for "Organize my personal spending'[/+]aswin-s commentedon Jun 12, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
MarcosProWork commentedon Jun 12, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
github-actions commentedon Jun 12, 2026
21 remaining items
Valforte commentedon Jun 12, 2026
Confirmed a BE issue, it's a simple fix and I'm working on the PR
Valforte commentedon Jun 12, 2026
BE PR created
Valforte commentedon Jun 15, 2026
BE PR is up for review
Valforte commentedon Jun 18, 2026
Asking for retest
m-natarajan commentedon Jun 18, 2026
Chrome / v9.4.13-0
Passed
bandicam.2026-06-18.18-18-34-183.mp4