Skip to content

Report -Dividers in "More" menu change when moving track expense to report and when reopened #91912

Closed

Description

@mitarachim

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.84-0
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: #90097
Email or phone of affected tester (no customers): ibellicotest+2723@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Prerequisite: Account has a workspace.
Prerequisite 2: Account has Self DM.

  1. Open the Expensify app.
  2. Navigate to Self DM.
  3. Create a manual expense.
  4. Open the just created expense.
  5. Tap on report field > "Create Report"
  6. Once landing on report again, tap on "More" menu.
  7. Note that "Hold", "Split" and "Merge" are on the same divider and "Duplicate expense" and "Move to report" on another one.
  8. Navigate to workspace where expense was moved and reopen it.
  9. Tap on "More" again.
  10. Note that "Hold" is now in one divider with "Add Expense", and "Split" and "Merge" are displayed on another divider together with "Duplicate Expense" and "Move to report"

Expected Result:

Dividers on "More" menu should be consistent when opening an expense when just moved from Self DM, and when reopening it on workspace chat.

Actual Result:

Options on dividers in "More" menu, change when opening menu after moving track expense to workspace and when reopening it on workspace chat.
"Hold", "Split", "Merge", "Duplicate Expense" and "Move to Report" options are displayed on different dividers.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7164588_1779909587248.Divider.mp4

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 28, 2026
  2. melvin-bot commented on May 28, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #90097

  3. melvin-bot commented on May 28, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on May 28, 2026

    @github-actions
    Contributor

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

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. OSBotify commented on May 28, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #90097 - "Add dividers to More menu actions" by @aswin-s (High confidence)
    Related Issues: None

    Recommendation: REVERT

    The section groupings introduced in PR #90097 define "Hold" in different sections depending on context—it is placed in the primary actions section (section 0, alongside "Add Expense") in REPORT_MORE_MENU_SECTIONS, but in its own section (section 0, alongside "Split" and "Merge") in TRANSACTION_MORE_MENU_SECTIONS. This causes the inconsistent divider placement reported: after moving an expense to a workspace report, the user sees a different sectioning layout when reopening the expense from the workspace chat, because the component switches between the transaction-level and report-level menu implementations with different section definitions.

    Assigned: @aswin-s (PR author), @Julesssss, @flaviadefaria, @rojiphil (approving reviewers)
    Labels: DeployBlockerCash kept (frontend App PR is the cause). No label changes made.

    Detailed Analysis

    Evidence

    • The issue is reproducible on staging only (new feature, not in production), matching that this was introduced by a staging PR.
    • The melvin-bot automatically identified PR Add dividers to More menu actions #90097 as the causing PR and linked it in a comment.
    • PR Add dividers to More menu actions #90097 merged on 2026-05-27 and is listed in the current StagingDeployCash checklist (Deploy Checklist: New Expensify 2026-05-27 #91866).
    • The PR introduces src/libs/PopoverMenuSections.ts with two section definition arrays: TRANSACTION_MORE_MENU_SECTIONS (used by MoneyRequestHeaderSecondaryActions.tsx) and REPORT_MORE_MENU_SECTIONS (used by MoneyReportHeaderSecondaryActions.tsx).

    Verification

    • The affected files are src/libs/PopoverMenuSections.ts, src/components/MoneyRequestHeaderSecondaryActions.tsx, and src/components/MoneyReportHeaderActions/MoneyReportHeaderSecondaryActions.tsx.
    • PR Add dividers to More menu actions #90097 directly creates and modifies all of these files.
    • The PR modifies the sortAndSectionPopoverMenuItems function which controls the divider placement logic.

    Root Cause

    In TRANSACTION_MORE_MENU_SECTIONS, the "Hold"/"Remove Hold", "Split", and "Merge" actions are grouped together in section 0. In REPORT_MORE_MENU_SECTIONS, "Hold"/"Remove Hold" is in section 0 (primary actions, with "Add Expense"), while "Split" and "Merge" are in section 1 (expense actions). When a user creates an expense in Self DM and views it, the transaction-level "More" menu (MoneyRequestHeaderSecondaryActions) is rendered, showing one grouping. When the expense is moved to a workspace and the user reopens it from the workspace chat, the report-level "More" menu (MoneyReportHeaderSecondaryActions) is rendered with a different section definition, producing a different grouping. This inconsistency in section definitions between the two contexts causes the reported divider mismatch.

  6. MelvinBot commented on May 28, 2026

    @MelvinBot
    Contributor

    Proposal

    Problem: The "More" menu shows different divider groupings for the same expense depending on whether it's viewed from the transaction thread (Self DM) or the expense report header (workspace). This happens because two separate section-definition arrays define different groupings for the same logical actions.

    Root Cause:

    In PopoverMenuSections.ts:

    • TRANSACTION_MORE_MENU_SECTIONS (used by MoneyRequestHeaderSecondaryActions) groups Hold, Split, Merge together in section 0, with Duplicate, Move in section 1.
    • REPORT_MORE_MENU_SECTIONS (used by MoneyReportHeaderSecondaryActions) puts Hold in section 0 (with Add Expense, Pay, etc.) and Split, Merge in section 1 (with Duplicate, Move).

    When the user views the expense from Self DM, the transaction sections apply — Hold/Split/Merge are one group. After moving to a workspace and viewing from the report header, the report sections apply — Hold is separated from Split/Merge by a divider.

    Solution:

    Align the relative grouping of shared actions (Hold, Split, Merge, Duplicate, Move) across both section arrays in PopoverMenuSections.ts. Specifically, in REPORT_MORE_MENU_SECTIONS, move SPLIT and MERGE from section 1 (line 22) into section 0 (lines 9-21) alongside HOLD, so both arrays group these actions consistently.

    Investigation details

    The sortAndSectionPopoverMenuItems function (line 44-62) inserts a divider (addSeparatorBefore: true) whenever the sectionIndex changes between consecutive visible items. The algorithm itself is correct — the inconsistency is entirely in the section definitions.

    • MoneyRequestHeaderSecondaryActions (line 539) uses TRANSACTION_MORE_MENU_SECTIONS
    • MoneyReportHeaderSecondaryActions (line 50) uses REPORT_MORE_MENU_SECTIONS

    Introduced by PR #90097 ("Add dividers to More menu actions") by aswin-s.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on May 28, 2026
  8. Julesssss commented on May 28, 2026

    @Julesssss
    Contributor

    New feature, not a blocker.

  9. melvin-bot commented on May 28, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  10. aswin-s commented on May 28, 2026

    @aswin-s
    Contributor

    The groupings in PR #90097 were implemented exactly as specified in #87964, which defines separate section layouts for the Expenses view and the Reports with a single expense view:

    • In the Expenses context (transaction thread — MoneyRequestHeaderSecondaryActions), the spec places Hold, Reject, Split, and Merge together in the first section.
    • In the Reports with a single expense context (report header — MoneyReportHeaderSecondaryActions), the spec places Hold with report workflow actions in the first section, and Split/Merge/Duplicate/Move in the second.

    These are rendered by two different components depending on whether the current report is a transaction thread (isTrackExpenseReport) or an expense report (isMoneyRequestReport). Both components correctly follow the spec.

    The repro flow here happens to transition between these two views in a single session — step 6 lands on the transaction thread (Expenses menu), step 9 opens the expense report from workspace chat (Reports menu). The spec defined different groupings for each context but did not address how they should relate when a user moves between them.

    This is a gap in the original issue, not a regression in the implementation of this new feature. @rojiphil @Julesssss What do you recommend here?

  11. rojiphil commented on May 28, 2026

    @rojiphil
    Contributor

    Yeah... this is not a regression.

    @Expensify/design Where should the split and merge options be in the menu?
    a) In the first section along with Hold as shown in Transaction Thread Report
    b) In the second section as shown in Expense Report
    c) No change. The current location is good.

    Image Image
  12. dannymcclain commented on May 28, 2026

    @dannymcclain
    Contributor

    I think we should just go with what was outlined in the linked issue unless @Expensify/product or @Expensify/design feel like we need to change it. (Mocks from that thread.)

    Is there an issue with following the groupings laid out in that issue? Sorry I'm not quite following the problem.

  13. flaviadefaria commented on May 28, 2026

    @flaviadefaria
    Contributor

    Agreed. Unless there’s a clear issue with what we originally planned, I think we should keep things as they are.

    The key distinction for me, which you already pointed out, @rojiphil, is that a report containing a single expense is not the same as an individual expense within a report that contains multiple expenses. The “More” menu options differ in each case, as do the actions that the user is likely to take on those. That’s why the grouping approach differed between the two experiences.

  14. rojiphil commented on May 28, 2026

    @rojiphil
    Contributor

    The key distinction for me, which you already pointed out, @rojiphil, is that a report containing a single expense is not the same as an individual expense within a report that contains multiple expenses. The “More” menu options differ in each case, as do the actions that the user is likely to take on those. That’s why the grouping approach differed between the two experiences.

    That's correct @flaviadefaria. The menu experience for Expense Report and a Transaction Thread Report are different and that’s why QA got confused. One way to avoid this confusion is to navigate to the Expense Report instead of the Transaction Thread Report upon Create Report action. That way, the menu experience would remain consistent as the user experiences the same Expense Report. But if we do not want to go this way, then I think we can close this one out as the consensus on the menu experience is clearly Do nothing.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions