Skip to content

[Due for payment 2026-10-02] RBR indicator is misaligned on the Account settings page #101796

Closed

Description

@MelvinBot

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

  1. Open the Account settings page.
  2. Get a red/green indicator to show on one menu item with a badge and one without a badge.
  3. Compare the indicator positions — they don't line up.
Image

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/**, the MoneyRequestView field rows, the pickers/selectors). They get mr2 before 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 in WorkspaceReceiptPartnersPage.tsx:331, and badge+rightIcon items in PopoverMenu/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.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. Pujan92 commented on Sep 21, 2026

    @Pujan92
    Contributor

    @MelvinBot Steps

    1. Open the Account settings page
    2. For the menu items, try to have a red/green indicator for one with a badge item and one without a badge item
    3. Check the indicator position, it is not the same and has an inconsistent margin
    Image
  2. Pujan92 commented on Sep 21, 2026

    @Pujan92
  3. added
    Bug
    on Sep 21, 2026
  4. Pujan92 commented on Sep 21, 2026

    @Pujan92
    Contributor

    @MelvinBot create a PR to fix this

    🎀👀🎀 C+ reviewed

  5. added
    External
    on Sep 21, 2026
  6. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    Current assignee @Pujan92 is eligible for the External assigner, not assigning anyone new.

  7. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  8. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    Triggered auto assignment to @puneetlath, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  9. MelvinBot commented on Sep 21, 2026

    @MelvinBot
    ContributorAuthor

    Thanks — added the Bug label, folded your steps and screenshot into the issue body, and confirmed the root cause.

    Root cause: at src/components/MenuItem/MenuItem.tsx:1109 the dot's trailing margin is keyed on badgeText, so it only gets mr2 (8px) when the row has no badge:

    badgeText ? undefined : styles.mr2

    Account settings rows have paddingRight: 16 and 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:1074 and right label at MenuItem.tsx:1126 already do this:

    -styles.ml1, badgeText ? undefined : styles.mr2
    +styles.ml1, (!!rightComponent || shouldShowRightIcon) && styles.mr2

    That gives a consistent 16px, matching the badges and production.

    Blast radius — I checked all ~111 brickRoadIndicator call sites
    • ~85 sites — no change. Dot followed by a chevron or right component (all of src/pages/workspace/accounting/**, MoneyRequestView field rows, the pickers/selectors). They get mr2 before and after.
    • 3 rows — no change. Dot + badge only (Agents, Wallet activated, Subscription free trial). Already 16px.
    • ~14 sites — shift 24px → 16px. The intended fix: Account settings root, the workspace settings feature list, the domain settings list, plus rows whose chevron is conditional on a permission flag.
    • 3 sites — gain 8px. Rows with both a badge and a trailing icon currently render the dot flush against it: PaymentMethodListItem.tsx:282, the Uber row in WorkspaceReceiptPartnersPage.tsx:331, and badge+rightIcon items in PopoverMenu/index.tsx:615. Arguably also a fix, but worth a design call before shipping.

    The LHN is not affected — OptionRowLHN doesn't use MenuItem. The MenuItem/presets/* components use the newer composable API, which already spaces trailing elements with gap instead 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 testID on 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

  10. puneetlath commented on Sep 21, 2026

    @puneetlath
    Contributor

    Sounds good to me.

  11. MelvinBot commented on Sep 21, 2026

    @MelvinBot
    ContributorAuthor

    🤖 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:

    -styles.ml1, badgeText ? undefined : styles.mr2
    +styles.ml1, (!!rightComponent || shouldShowRightIcon) && styles.mr2

    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.

    ⚠️ Two things to check before marking it ready:

    1. I could not verify this visually. The browser session for this run was handed over signed-out and then went to a blank page, so I never reached Account settings. The dev server rebuilt the file with no compile errors, but the 16px inset is unconfirmed in a browser.
    2. Three rows gain 8px, which is a visible side effect worth a design opinion. Rows with both a badge and a trailing icon currently render the dot flush against that icon: PaymentMethodListItem.tsx:282, the Uber row in WorkspaceReceiptPartnersPage.tsx:331, and badge + rightIcon items in PopoverMenu/index.tsx:615.
    Local checks I ran
    Check Result
    npm run lint-changed ✅ Pass
    npm run typecheck ✅ Pass (all 5 projects)
    oxfmt formatting ✅ Pass (no reformatting needed)
    npm run react-compiler-compliance-check check ✅ Pass
    Jest — 13 MenuItem suites ✅ 103 tests passed
    Jest — affected page suites ✅ 43 tests passed

    The affected page suites were InitialSettingsPageTest, WorkspaceInitialPageTest, ProfilePageTest, PublicProfilePageTest and DynamicContactMethodsPageTest.

    Not run: the full npm test suite and the Storybook smoke test — I scoped to the suites that touch MenuItem and the affected pages. Running npx eslint directly on the file surfaces 3 pre-existing no-unsafe-type-assertion errors at lines 623, 633 and 743; they are untouched by this change and grandfathered by the lint ratchet, which is why lint-changed passes.

    No existing test asserts on this margin, so none needed updating. There's still no testID on 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.

  12. Pujan92 commented on Sep 22, 2026

    @Pujan92
    Contributor

    @MelvinBot mark pr ready for review and fill all checkboxes in checklist

  13. 12 remaining items

  14. melvin-bot commented on Sep 30, 2026

    @melvin-bot

    @Pujan92 Eep! 4 days overdue now. Issues have feelings too...

  15. added
    Awaiting Payment
    on Oct 1, 2026
  16. melvin-bot commented on Oct 1, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  17. melvin-bot commented on Oct 1, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  18. Pujan92 commented on Oct 1, 2026

    @Pujan92
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on both staging and production
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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

    1. Sign in with an account where you have the RBR indicator for Profile and Subscription/Agents in Account Settings
    2. Verify the Profile(no badge) RBR and Subscription/Agents(where badge is present) RBR are in the same place and aligned correctly
    Zapier Logs Run ID: 00040eee-f6e5-a239-5a55-daf5a05982d4
  19. mallenexpensify commented on Oct 5, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @Pujan92 due $175 via NewDot

    @Pujan92 plz complete the Contributor+ checklist and tag me in a post once you have. Thx

    No regression test bcoz it is a UI fix

    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.

  20. Pujan92 commented on Oct 5, 2026

    @Pujan92
    Contributor
  21. twisterdotcom commented on Oct 6, 2026

    @twisterdotcom
    Contributor

    $175 approved for @Pujan92 in Report ID: R00IJ5Q3OcnW.

    Zapier Logs Run ID: 00040eee-6af1-ad50-879f-2017234bd5e4

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

  22. JmillsExpensify commented on Oct 7, 2026

    @JmillsExpensify
    Contributor

    $175 approved for @Pujan92

  23. JmillsExpensify commented on Oct 7, 2026

    @JmillsExpensify
    Contributor

    For clarity, this report go re-routed to me, so that's what I'm approving the same person as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions