[Due for payment 2026-11-14] [$175] LHN shows a green dot instead of an `Add` badge for an empty report
Problem
An empty expense report that needs attention shows only a green dot in the LHN, with no action badge. The report itself pushes the user toward a green Add button. The LHN row should match it.
Expected
The LHN row for an empty report that needs attention shows an Add action badge.
Actual The LHN row shows only a green dot.
Steps to reproduce
- Create an empty expense report in a workspace chat.
- Look at the report's row in the LHN.
- Note that it shows a green dot, not an
Addbadge.
Where to look
- The LHN badge comes from
actionBadge. It is set bygenerateReportAttributes()insrc/libs/ReportUtils.tsand passed throughsrc/libs/actions/OnyxDerived/configs/reportAttributes.ts. - When
requiresAttentionis true but noactionBadgeis set, the row shows a green dot only. - The fix is likely a new
ADDvalue inCONST.REPORT.ACTION_BADGEand acommon.actionBadge.addtranslation.generateReportAttributes()would return it for empty open reports the user can add expenses to. - Don't show
Addto users who can't add expenses, such as approve-only members. See #104907.
Reported in Slack.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022114960321668053231
- Upwork Job ID: 2114960321668053231
- Last Price Increase: 2026-10-27
Issue Owner
Current Issue Owner: @Eskalifer1
Proposal
Please re-state the problem that we are trying to solve in this issue.
An empty open expense report shows a bare green dot in the LHN, with no action badge. The report view shows a green Add expense button, so the LHN row should show an Add badge.
What is the root cause of that problem?
The dot and the badge come from different checks. For an empty report, the dot check passes but no badge check does.
- The dot turns on from a flag. Creating a report on a manually submitted workspace sets
hasOutstandingChildRequest: trueon the workspace chat. This happens for any open report, with or without expenses (ReportUtils.ts:13274-13281). That flag alone makeshasValidIOUActiontrue (ReportUtils.ts:5232-5235). - No badge applies.
getBadgeFromIOUReportonly knows Pay, Approve and Submit (ReportUtils.ts:3520-3579). Submit needs at least one expense (ReportUtils.ts:3516). So it returnsundefined. - The result has a reason but no badge. The
HAS_CHILD_REPORT_AWAITING_ACTIONreturn passesactionBadge: undefined(ReportUtils.ts:5281-5287).InfoBadgethen falls back to the green dot (InfoBadge.tsx:37-53).
What changes do you think we should make in order to solve the problem?
- Add
ADD: 'add'toCONST.REPORT.ACTION_BADGE(CONST/index.ts:2054-2060). Addcommon.actionBadge.add(Add) to every language file (en.ts:169-175).InfoBadgeneeds no change. - In
getBadgeFromIOUReport, after the Submit check, returnADDwhen the report is an open expense report with no expenses andcanAddTransactionis true. This is the same rule the report uses for itsAdd expensebutton (isAddExpenseAction). Because it runs in the report preview loop, the row also gets a click target, just like Submit, Approve and Pay. Submit needs an expense, so the two badges never overlap. - Keep approve-only members out (Next step shows "Waiting for you to add expenses", LHN shows GBR for approve-only member).
canAddTransactionalready returns false for them throughcanCreateExpensesOnPolicy(ReportUtils.ts:3226), so they won't getAdd. The green dot itself is a separate bug that #104907 tracks. - Add unit tests under
getReasonAndReportActionThatRequiresAttentionintests/unit/ReportUtilsTest.ts:- An empty report for a submitter returns
actionBadge: ADD. - An empty report for an approve-only member returns no
ADD.
- An empty report for a submitter returns
What alternative solutions did you explore? (Optional)
Stop the dot instead of adding a badge, by not counting the flag for empty reports. This hides a real next step that the report view asks the user to take, so I don't recommend it.
Notes and confidence
- Confidence: medium. I traced the code path but did not reproduce it in the app. The test account could not finish onboarding.
- Which row: on the client, the flag is only set on the workspace chat, so the fix covers the workspace chat row. If the expense report's own row also shows the dot, the backend is setting the flag on the report too. That case would need the badge computed outside the preview loop.
canAddTransactionreads the policy from a module-level cache. If that matters inside the derived value, callcanCreateExpensesOnPolicy(policy)with the policy already passed in.
Related issue: LHN — some rows show a green dot while others show an action badge has the same badge-less fallback, caused there by unread mentions.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/105103) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Eskalifer1 (External)
Job added to Upwork: https://www.upwork.com/jobs/~022114960321668053231
Proposal
Please re-state the problem that we are trying to solve in this issue.
An empty expense report requiring attention displays a green dot in the LHN instead of an Add action badge. The badge should match the report’s available action and must not appear for users who cannot add expenses.
What is the root cause of that problem?
The proposed cause is plausible but remains unverified. The supplied source snippets contain imports, not the relevant implementations. The referenced commit could not be retrieved, and no Expensify checkout was available for reproduction or testing.
According to the supplied MelvinBot trace:
src/libs/ReportUtils.ts:3520–3579:getBadgeFromIOUReport()produces existing payment, approval, and submission badges, but noAddbadge.src/libs/ReportUtils.ts:5281–5287: an attention result can carry an undefined badge.src/components/LHNOptionsList/OptionRowLHN/OptionRow/InfoBadge.tsx:37–53: that combination renders the dot.
These are references supplied in the proposal, not independently verified line numbers.
The decisive unresolved question is which LHN row executes this path. MelvinBot acknowledges that its change targets the workspace chat’s report-preview loop. That does not establish that it fixes the expense report’s own row identified in the issue.
What changes do you think we should make in order to solve the problem?
Refine MelvinBot’s proposal before accepting implementation. Its constant and translation additions are reasonable, but its placement and reactive dependencies need evidence.
The smallest justified implementation should:
- Add
ADD: 'add'toCONST.REPORT.ACTION_BADGE. - Add
common.actionBadge.addusing the repository’s required localization workflow. - Assign
ADDin the existing badge computation reached by the affected row, using the same eligibility conditions as the report’s primaryAdd expenseaction. - Preserve existing badge priority and the navigation target corresponding to the selected badge.
- Ensure the derived attributes update when the policy or report data governing eligibility changes.
Do not substitute these weaker conditions:
report.total === 0
A zero monetary total does not prove that a report contains no expenses.
canCreateExpensesOnPolicy(policy)
That policy permission alone does not establish equivalence with the complete report-level eligibility check. Replacing canAddTransaction() with it requires inspecting both implementations.
An exact, production-ready TypeScript diff cannot be substantiated from the provided imports. Inventing function signatures, insertion points, or verified line numbers would violate the required evidence standard. The relevant function bodies and derived-value dependencies must be available before presenting such a diff.
What alternative solutions did you explore? (Optional)
MelvinBot’s proposal has three acceptance-blocking gaps:
- Unproven row coverage. A preview-loop change may cover the parent workspace chat while missing the report row. Its backend explanation is a hypothesis, not evidence.
- Unproven permission reactivity. The proposal identifies a module-level policy cache but supplies no test showing that a permission change recomputes the derived badge. A correct initial result does not prove correct subsequent behavior.
- Insufficient regression coverage. Two static permission tests do not establish badge transitions, navigation correctness, or existing-action precedence.
These gaps justify refinement; they do not prove that MelvinBot’s implementation fails.
Removing the attention flag is also unsupported: it changes attention behavior rather than demonstrating the requested badge fix. Adding a rendering-only fallback in InfoBadge would place report eligibility decisions in the presentation layer.
There is no evidence here supporting a security finding or a CVSS rating.
What automated tests can you add to prevent this from re-occurring?
Add regression cases in tests/unit/ReportUtilsTest.ts, under the existing attention-result suite:
| Case | Required assertion |
|---|---|
| Eligible submitter, empty open expense report | actionBadge equals CONST.REPORT.ACTION_BADGE.ADD; the returned action targets that report |
| Approve-only member, same report | actionBadge is not ADD |
| Report containing a zero-value expense | Emptiness is determined from expenses, not the monetary total |
| Submitted, approved, or paid report | No inappropriate ADD; existing action behavior remains intact |
| Workspace chat with multiple report previews | Selected badge and navigation target refer to the same child report |
Add a test at the derived-attributes layer, using real Onyx updates:
- Seed an eligible empty report and assert
ADD. - Add its first expense and assert recomputation to the appropriate existing result.
- Remove that expense and assert
ADDreturns. - Change the policy to deny expense creation and assert
ADDdisappears without recreating the report.
Reproduce the issue first to establish whether the affected row is the workspace chat or the expense report. Cover both if both reproduce.
Validation status: No reproduction, TypeScript check, or Jest execution was completed. These are proposed acceptance tests, not passing results.
Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01b60d704ba377be83
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@MelvinBot provide test branch for your proposal
🤖 The test branch is ready: claude-emptyReportAddBadge (commit 7421f14).
What changed
- Added
CONST.REPORT.ACTION_BADGE.ADDand acommon.actionBadge.addtranslation in all 11 language files. Each translation reuses that file's existingcommon.addtext. getBadgeFromIOUReportnow returnsADDfor an empty open expense report whencanAddTransactionis true. That is the same check behind the report'sAdd expensebutton.
There are two differences from the proposal. Both keep existing behavior safe:
ADDonly applies when the workspace chat already hashasOutstandingChildRequest. It can label an existing green dot, but it never creates a new one.ADDis a fallback ingetIOUReportActionWithBadge. If another report in the same chat needs Submit, Approve or Pay, that badge still wins, even when the empty report is older.
How to test
- Sign in as a workspace member who can add expenses, on a workspace where reports are submitted manually.
- Create an empty report in the workspace chat.
- Check the workspace chat row in the LHN. It should show a green
Addbadge, not a bare dot. - Repeat as an approve-only member. That member should not see
Add.
Checks run: two new unit tests in tests/unit/ReportUtilsTest.ts (Add for a submitter, no Add for an approve-only member). All 1,764 tests in ReportUtilsTest, reportAttributesTest, OnyxDerivedTest and SidebarUtilsTest pass. Typecheck, ESLint and spell check also pass. I haven't checked the flow in a browser.
Triggered auto assignment to @mollfpr, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Proposal
Please re-state the problem that we are trying to solve in this issue.
An empty open expense report requiring user attention currently displays only a plain green dot in the Left-Hand Navigation (LHN) with no action badge. Inside the report itself, the UI presents a prominent green Add expense button. The LHN row should consistently display an Add action badge instead of a bare green dot, matching the primary action available to the user.
What is the root cause of that problem?
- In
src/CONST/index.ts,CONST.REPORT.ACTION_BADGEcurrently defines:
AnACTION_BADGE: { SUBMIT: 'submit', APPROVE: 'approve', PAY: 'pay', FIX: 'fix', TASK: 'task', },ADDbadge type does not exist in the constants. - In
src/libs/ReportUtils.ts,getBadgeFromIOUReportchecks forPAY,APPROVE, andSUBMIT. When an open expense report has no transactions (reportTransactions.length === 0), it returnsundefined. - Consequently, in
generateReportAttributes(),requiresAttentionis evaluated as true (triggering the green indicator), butactionBadgeremainsundefined, causing the LHN row component to fall back to rendering a bare green dot.
What changes do you think we should make in order to solve the problem?
- Add
ADDtoACTION_BADGEconstant: Insrc/CONST/index.ts:
ACTION_BADGE: {
SUBMIT: 'submit',
APPROVE: 'approve',
PAY: 'pay',
FIX: 'fix',
TASK: 'task',
ADD: 'add',
},
- Add localization string:
In
src/languages/en.tsandsrc/languages/es.tsundercommon.actionBadge:
add: 'Add',
- Return
ADDbadge for empty open reports where the user can add expenses: Insrc/libs/ReportUtils.ts, insidegetBadgeFromIOUReport: WhenreportTransactions.length === 0and the report is an open expense report (isOpenExpenseReport(iouReport)): Ensure the badge is only displayed to users who have permission to add expenses (i.e. report owner or members with write permissions, excluding approve-only members as per #104907):
if (isExpenseReport(iouReport) && isOpenExpenseReport(iouReport) && reportTransactions.length === 0) {
if (canUserPerformWriteAction(iouReport) && canAddExpense(iouReport, policy)) {
return CONST.REPORT.ACTION_BADGE.ADD;
}
}
- Update badge rendering in LHN row:
In the LHN row component rendering action badges (
src/pages/home/sidebar/SidebarUtils.ts/OptionRowLHNData), mapCONST.REPORT.ACTION_BADGE.ADDto display the localizedcommon.actionBadge.addtext inside the badge container.
What alternative solutions did you explore? (Optional)
Displaying a generic SUBMIT badge; however, an empty report cannot be submitted until at least one expense is added, so an Add badge directly communicates the required user action and prevents confusing the user.
Test Result / Verification:
- Log in and open any workspace chat.
- Create an empty expense report (e.g. submit an expense and delete it, or start an empty expense report).
- Observe the report's row in the Left-Hand Navigation (LHN).
- Verify the row displays an
Addaction badge instead of a plain green dot. - Log in as an approve-only workspace member who cannot add expenses to this report; verify the
Addbadge is not shown. - Add an expense to the report; verify the badge updates according to report state (e.g.
Submit).
Looking into this today
Agreed with Melvin's solution as well and looks like no BE work is needed here so removing my assignemnt.
Proposal
Please re-state the problem that we are trying to solve in this issue.
An empty open expense report requiring attention currently displays only a plain green dot in the Left-Hand Navigation (LHN) with no action badge. Inside the report view, the UI prompts the user with a green Add button. The LHN row should display a matching Add action badge instead of an unadorned green dot.
What is the root cause of that problem?
- In
src/libs/ReportUtils.ts(lines 3549–3605),getBadgeFromIOUReport()evaluates candidate action badges in sequence:canBePaidNow/canBePaidElsewhere->CONST.REPORT.ACTION_BADGE.PAYcanApproveIOU->CONST.REPORT.ACTION_BADGE.APPROVEcanSubmitAndIsAwaitingForCurrentUser->CONST.REPORT.ACTION_BADGE.SUBMITWhen an open expense report has no transactions (reportTransactionsis empty), none of these conditions evaluate to true, sogetBadgeFromIOUReportfalls through and returnsundefinedat line 3604.
- In
generateReportAttributes()(src/libs/ReportUtils.ts, line 14789),getReasonAndReportActionThatRequiresAttention()returnsreasonbutactionBadge: undefined. WhenrequiresAttentionis true without anactionBadge,BaseOptionListItemrenders only the green indicator dot. CONST.REPORT.ACTION_BADGEinsrc/CONST/index.tscurrently lacks anADDbadge type, andsrc/languages/en.tslacks thecommon.actionBadge.addtranslation key.
What changes do you think we should make in order to solve the problem?
-
Add
ADDtoCONST.REPORT.ACTION_BADGEinsrc/CONST/index.ts:ACTION_BADGE: { PAY: 'pay', APPROVE: 'approve', SUBMIT: 'submit', + ADD: 'add', }, -
Add translation key in
src/languages/en.ts(and corresponding locale files):actionBadge: { pay: 'Pay', approve: 'Approve', submit: 'Submit', + add: 'Add', }, -
Return
CONST.REPORT.ACTION_BADGE.ADDinsrc/libs/ReportUtils.ts(getBadgeFromIOUReport) around line 3604:if (isWaitingSubmitFromCurrentUser) { return CONST.REPORT.ACTION_BADGE.SUBMIT; } + if ( + isOpenExpenseReport(iouReport) && + !reportTransactions?.length && + (isReportOwner(iouReport, currentUserAccountID) || isAllowedToComment(iouReport)) && + !isPolicyExpenseChat(chatReport) + ) { + return CONST.REPORT.ACTION_BADGE.ADD; + } return undefined; -
Add Unit Test in
tests/unit/ReportUtilsTest.ts:- Verify that an open expense report with 0 transactions owned by the current user returns
CONST.REPORT.ACTION_BADGE.ADD.
- Verify that an open expense report with 0 transactions owned by the current user returns
What alternative solutions did you explore? (Optional)
- Relying solely on
requiresAttentionwithout a badge: Rejected because empty reports direct the user to take action (Add expense). Matching the LHN badge with the primary action button aligns with Expensify's UX guidelines forPay,Approve, andSubmit.
@Eskalifer1 let's moving forward with Melvin proposal!
@MelvinBot implement this
🤖 Draft PR created: Show an Add badge in the LHN for an empty report the user can add expenses to Please mark it as "Ready for review" or ask me to do that for you when it is ready for review.
It implements the accepted proposal, using the same commit as the earlier test branch, on a fresh branch from main.
Checks run: 2,887 unit tests across the badge, LHN and derived-value suites pass. Typecheck, ESLint and spell check pass.
Not verified: I couldn't check the flow in a browser because the test session failed to load. The Tests and QA sections are left for you to fill in.
📣 @Eskalifer1 We're missing your Upwork ID to automatically send you an offer for the Reviewer role. Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user creates an empty expense report on a workspace configured with manual submission, the report view displays a green "Add expense" button in the header and hasOutstandingChildRequest is true on the workspace chat, causing the LHN row to display a plain green dot (GBR) instead of an "Add" action badge.
What is the root cause of that problem?
In src/libs/ReportAttributesDerivedValue.ts and src/libs/SidebarUtils.ts (getOptionData), when a workspace chat has hasOutstandingChildRequest: true due to an empty open child expense report (total === 0, no transactions), brickRoadIndicator evaluates to CONST.BRICK_ROAD_INDICATOR_STATUS.INFO (green dot).
When computing the LHN actionBadge for the report row (getActionBadge in src/libs/ReportAttributesDerivedValue.ts / src/libs/ReportUtils.ts), the badge logic checks whether the next action is SUBMIT, APPROVE, PAY, or MARK_AS_PAID. Because the open report has zero transactions (isEmptyExpenseReport), canSubmitReport is false and canAddTransaction is true. Since there is no CONST.REPORT.ACTION_BADGE.ADD branch in getActionBadge, actionBadge returns undefined, and OptionRowLHN falls back to rendering a bare green dot (BrickRoadIndicator) instead of an "Add" pill badge.
What changes do you think we should make in order to solve the problem?
- In
src/CONST/index.ts, addADD: 'add'toCONST.REPORT.ACTION_BADGE. - In
src/libs/ReportAttributesDerivedValue.ts(andsrc/libs/SidebarUtils.tswhereactionBadgeis mapped to translated badge text inOptionRowLHN.tsx), check if the report (or its single outstanding child report) is an open empty expense report where the user can add expenses (canAddTransaction(report)&&isEmptyReport(report)), and returnCONST.REPORT.ACTION_BADGE.ADD. - In
src/components/LHNOptionsList/OptionRowLHN.tsx, mapCONST.REPORT.ACTION_BADGE.ADDtotranslate('common.add')so the LHN renders the green"Add"badge instead of an unlabeled green dot.
What alternative solutions did you explore? (Optional)
We considered suppressing hasOutstandingChildRequest / the green dot completely for empty reports, but product confirmed that when the green "Add expense" button is shown as the primary action on the report, the LHN should show the corresponding "Add" badge rather than a plain green dot.
📣 @jeffrey-graham! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
- Make sure you've read and understood the contributing guidelines.
- Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
- Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
@Eskalifer1
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.5.33-1 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/105604
If no regressions arise, payment will be issued on 2026-11-14. :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]