Repository navigation
Description
Updated 2026-09-21: Corrected based on feedback from Pujan92 — added the reproduction steps and screenshot, updated the code references for the MenuItem refactor, and confirmed the misalignment is real (previously code-only).
Problem
The Red Brick Road (RBR) indicator — the red/green dot shown on rows in Account settings — has an inconsistent horizontal inset. Its distance from the row's right edge changes depending on whether that row happens to also have a badge.
This came up during review of feat: edit agent functionality, where the RBR dot was noted as sitting "so much further in than the badge on subscription" (comment, follow-up). That PR only adjusted the Agents row; the underlying inconsistency in the shared MenuItem component is still there.
Reproduction steps
- Open the Account settings page.
- Get a red/green indicator to show on one menu item with a badge and one without a badge.
- Compare the indicator positions — they don't line up.
In the screenshot, the Subscription dot (no badge) sits 8px further from the right edge than the Wallet dot (which has a $0.00 badge).
Root cause
In src/components/MenuItem/MenuItem.tsx:1108-1115 the dot's wrapper gets styles.mr2 (8px) only when the row has no badgeText:
<View style={[styles.alignItemsCenter, styles.justifyContentCenter, styles.ml1, badgeText ? undefined : styles.mr2]}>Account settings rows render through src/pages/settings/SettingsMenuItem.tsx:67 with styles.sectionMenuItem (paddingRight: 16), and they don't set shouldShowRightIcon/rightComponent, so nothing else contributes a trailing margin. Net result:
- Row with a dot and no badge (Profile, Security, Wallet, Subscription) → dot sits 24px from the right edge (16 + 8).
- Row with a dot and a badge (Agents, Wallet activated, Subscription on free trial) → dot sits at 16px.
The condition is keyed on the wrong thing: badgeText says what comes before the dot, but a trailing margin should depend on whether anything comes after it. The two sibling elements in the same trailing container already get this right — the badge at MenuItem.tsx:1074 and the right label at MenuItem.tsx:1126 both use (!!rightComponent || shouldShowRightIcon) && styles.mr2.
Expected
The RBR indicator uses the same horizontal inset (16px, matching production and the badges) as other right-aligned row elements, regardless of whether a badge is present.
Recommended fix
Align the dot with its siblings in MenuItem.tsx:1109:
-<View style={[styles.alignItemsCenter, styles.justifyContentCenter, styles.ml1, badgeText ? undefined : styles.mr2]}>
+<View style={[styles.alignItemsCenter, styles.justifyContentCenter, styles.ml1, (!!rightComponent || shouldShowRightIcon) && styles.mr2]}>This matches what the newer composable MenuItem API already does — styles.menuItemTrailing spaces trailing elements with gap, and the MenuItem.BrickRoadIndicator leaf carries no margin of its own.
Blast radius of the fix
Of ~111 call sites that pass brickRoadIndicator:
- ~85 sites — no change. Dot followed by a chevron or right component (all of
src/pages/workspace/accounting/**, theMoneyRequestViewfield rows, the pickers/selectors). They getmr2before and after. - 3 rows — no change. Dot + badge only (Agents, Wallet activated, Subscription free trial). Already 16px, stay 16px.
- ~14 sites — shift 8px closer to the edge (24px → 16px). This is the intended fix. Account settings root (Profile, Security, Wallet, Subscription), the workspace settings feature list, the domain settings list, and a handful of rows whose chevron is conditional on a permission flag.
- 3 sites — gain 8px. Rows with both a badge and a trailing icon/component currently render the dot flush against that element:
PaymentMethodListItem.tsx:282, the Uber row inWorkspaceReceiptPartnersPage.tsx:331, and badge+rightIconitems inPopoverMenu/index.tsx:615. Arguably also a fix, but it needs a design call.
The LHN is not affected — OptionRowLHN doesn't use MenuItem (OptionRowLHN.tsx:66-85). The MenuItem/presets/* components use the composable API and never reach this line.
No existing tests assert on this margin, so none need updating. There's no testID on the dot wrapper today — worth adding one for regression coverage.
Style values: ml1 = marginLeft: 4, mr2 = marginRight: 8, from src/styles/utils/spacing.ts.
Platforms
All platforms — the misalignment is in the shared MenuItem component, not platform-specific styling. Reported on web.
Activity
Pujan92 commentedon Sep 21, 2026
@MelvinBot Steps
Pujan92 commentedon Sep 21, 2026
Pujan92 commentedon Sep 21, 2026
@MelvinBot create a PR to fix this
🎀👀🎀 C+ reviewed
melvin-bot commentedon Sep 21, 2026
Current assignee @Pujan92 is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Sep 21, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
melvin-bot commentedon Sep 21, 2026
Triggered auto assignment to @puneetlath, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
MelvinBot commentedon Sep 21, 2026
Thanks — added the
Buglabel, folded your steps and screenshot into the issue body, and confirmed the root cause.Root cause: at
src/components/MenuItem/MenuItem.tsx:1109the dot's trailing margin is keyed onbadgeText, so it only getsmr2(8px) when the row has no badge:Account settings rows have
paddingRight: 16and no chevron, so the dot lands at 24px without a badge and 16px with one — exactly the 8px gap between Subscription and Wallet in your screenshot.Fix: the condition should depend on whether anything comes after the dot, not before it. The badge at
MenuItem.tsx:1074and right label atMenuItem.tsx:1126already do this:That gives a consistent 16px, matching the badges and production.
Blast radius — I checked all ~111
brickRoadIndicatorcall sitessrc/pages/workspace/accounting/**,MoneyRequestViewfield rows, the pickers/selectors). They getmr2before and after.PaymentMethodListItem.tsx:282, the Uber row inWorkspaceReceiptPartnersPage.tsx:331, and badge+rightIconitems inPopoverMenu/index.tsx:615. Arguably also a fix, but worth a design call before shipping.The LHN is not affected —
OptionRowLHNdoesn't useMenuItem. TheMenuItem/presets/*components use the newer composable API, which already spaces trailing elements withgapinstead of margins — so this change also moves the legacy path toward that behavior.No tests assert on this margin, so none need updating. There's no
testIDon the dot wrapper — worth adding one for regression coverage.I verified this from the code plus the pixel offsets in your screenshot; I did not reproduce the RBR states in a browser myself, since forcing a dot onto both a badged and an unbadged Account settings row needs specific account state.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/101796)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
puneetlath commentedon Sep 21, 2026
Sounds good to me.
MelvinBot commentedon Sep 21, 2026
🤖 Draft PR created: #101803
Please mark it as "Ready for review" when it is ready for review.
The change — one line in
src/components/MenuItem/MenuItem.tsx:1109:The trailing margin now depends on what renders after the dot instead of whether the row has a badge, matching the sibling badge and right-label elements in the same container. The indicator lands at a consistent 16px.
PaymentMethodListItem.tsx:282, the Uber row inWorkspaceReceiptPartnersPage.tsx:331, and badge +rightIconitems inPopoverMenu/index.tsx:615.Local checks I ran
npm run lint-changednpm run typecheckoxfmtformattingnpm run react-compiler-compliance-check checkMenuItemsuitesThe affected page suites were
InitialSettingsPageTest,WorkspaceInitialPageTest,ProfilePageTest,PublicProfilePageTestandDynamicContactMethodsPageTest.Not run: the full
npm testsuite and the Storybook smoke test — I scoped to the suites that touchMenuItemand the affected pages. Runningnpx eslintdirectly on the file surfaces 3 pre-existingno-unsafe-type-assertionerrors at lines 623, 633 and 743; they are untouched by this change and grandfathered by the lint ratchet, which is whylint-changedpasses.No existing test asserts on this margin, so none needed updating. There's still no
testIDon the dot wrapper — worth adding one if you want regression coverage for this.I created the branch upstream rather than on your fork, since I don't have push access to
Pujan92/App— instructions to take ownership of the branch are on the PR.Pujan92 commentedon Sep 22, 2026
@MelvinBot mark pr ready for review and fill all checkboxes in checklist
12 remaining items
melvin-bot commentedon Sep 30, 2026
@Pujan92 Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Oct 1, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Oct 1, 2026
Payment Summary
Resolving PRs:
Fix inconsistent RBR indicator margin in MenuItem #101803
Reviewer: @Pujan92 owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
Pujan92 commentedon Oct 1, 2026
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: feat: edit agent functionality #89802 (comment)
[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
[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.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/689135
Regression Test Proposal
Zapier Logs
Run ID: 00040eee-f6e5-a239-5a55-daf5a05982d4mallenexpensify commentedon Oct 5, 2026
Payment Summary
Contributor+: @Pujan92 due $175 via NewDot
@Pujan92 plz complete the Contributor+ checklist and tag me in a post once you have. Thx
This is not correct, we want design and UI-related test cases so that QA can review to see if we want a test case, they run monthly tests on many design-related cases.
Pujan92 commentedon Oct 5, 2026
@mallenexpensify updated
twisterdotcom commentedon Oct 6, 2026
$175 approved for @Pujan92 in Report ID: R00IJ5Q3OcnW.
Zapier Logs
Run ID: 00040eee-6af1-ad50-879f-2017234bd5e4SO: https://stackoverflowteams.com/c/expensify/questions/7582
JmillsExpensify commentedon Oct 7, 2026
$175 approved for @Pujan92
JmillsExpensify commentedon Oct 7, 2026
For clarity, this report go re-routed to me, so that's what I'm approving the same person as well.