Skip to content

[Due for payment 2026-05-07] [$250] Vacation delegate - Submitter is navigated to Concierge chat, WS chat disappears from LHN #84248

Closed

Description

@jponikarchuk

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.31-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176687/test-cases/41236712
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 15 iOS 26.2, partially repro on MacBook air 15.7.4 Chrome
App Component: Left Hand Navigation (LHN)

Action Performed:

Preconditions:
As workspace owner, invite Account B (Approver), Account C (Vacation delegate) and Account D (Submitter) to the workspace. Set Account B as an approver in Workflows.
As Account B, set Account C as a Vacation delegate in Profile - Status.
As Account D, create an expense in the workspace chat and submit it.

  1. Sign in to ND on iOS device with account D
  2. Create an expense in the workspace chat, tap Submit
  3. Stay in the workspace chat
  4. As Account C on secondary device, open the expense from step 2
  5. As Account C, click More - Split, and split the expense into two equal parts
  6. As Account D on main device, after being navigated to the Concierge chat, go to LHN

Expected Result:

Workspace chat does not disappear from LHN for the expense submitter after Vacation delegate split the expense

Actual Result:

Workspace chat disappears from LHN for the expense submitter after Vacation delegate split the expense.
On Web the workspace chat does not disappear from LHN, but user is navigated to the Concierge

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022029464989268362446
  • Upwork Job ID: 2029464989268362446
  • Last Price Increase: 2026-03-26
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

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

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. MelvinBot commented on Mar 5, 2026

    @MelvinBot
    Contributor

    🔍 Issue Analysis

    Please re-state the problem that we are trying to solve in this issue.

    When a vacation delegate splits a submitted expense, the workspace chat disappears from the LHN for the expense submitter on iOS, and the user is navigated to Concierge. On Web, the workspace chat remains in the LHN but the user is still navigated to Concierge.

    What is the root cause of that problem?

    There are two contributing factors:

    1. Server-side Onyx updates from the split modify the workspace chat report in a way that causes it to fail LHN filtering

    When the vacation delegate (Account C) performs the split action, the server processes the SplitTransaction command and sends Onyx updates via Pusher to all affected participants, including the submitter (Account D). These updates likely modify the workspace chat report's data — either by overwriting participants (which could lose the submitter's notificationPreference), changing the report structure, or briefly setting it to null.

    The getReportNotificationPreference function at src/libs/ReportUtils.ts:1896-1902 defaults to HIDDEN for any missing or falsy notificationPreference:

    return participant?.notificationPreference || CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;

    If the server's Onyx merge overwrites or drops the submitter's participant entry, the report immediately becomes hidden for them. Additionally, ReportScreen at src/pages/inbox/ReportScreen.tsx:711-718 detects when a policy expense chat becomes empty and triggers navigation to Concierge.

    2. Platform difference in useSidebarOrderedReports — iOS doesn't force-include the focused report in the LHN

    At src/hooks/useSidebarOrderedReports.tsx:296-310, there is explicit logic that only re-generates the LHN list to include the currently-focused report when shouldUseNarrowLayout is false (Web/wide layout):

    if (
        (!shouldUseNarrowLayout || orderedReportIDs.length === 0) &&
        derivedCurrentReportID &&
        derivedCurrentReportID !== '-1' &&
        orderedReportIDs.indexOf(derivedCurrentReportID) === -1
    ) {
        // Re-generate list including current report
    }

    On iOS (narrow layout), this re-generation is skipped. So if a server Onyx update causes the workspace chat to fail shouldDisplayReportInLHN, it disappears from the LHN on iOS with no recovery, while on Web it stays because of the force-inclusion.

    What changes do you think we should make in order to solve the problem?

    The fix should address both the server-side root cause and the client-side platform discrepancy:

    Primary fix (server-side investigation needed): The server's Onyx updates sent to the submitter during a vacation delegate split should not modify the workspace chat report's participants in a way that loses the submitter's notificationPreference. This requires investigating the Auth backend's SplitTransaction command handler to see what Onyx updates it generates for non-acting participants. The Onyx merge for the workspace chat should preserve existing participant entries.

    Client-side defense-in-depth: In src/libs/SidebarUtils.ts:252-260, the shouldOverrideHidden check already includes report.isOwnPolicyExpenseChat && !isReportArchived, which should prevent the submitter's own workspace chat from being filtered out even if it becomes hidden. If the server's Onyx update preserves isOwnPolicyExpenseChat: true, this override should work. The investigation should verify whether the server's update is overwriting this field.

    Additionally, the navigation-to-Concierge behavior on both platforms (lines 711-768 of ReportScreen.tsx) should be reviewed to ensure that report modifications from split operations on other devices don't trigger isRemovalExpectedForReportType for the workspace chat.

    What alternative solutions did you explore? (Optional)

    • Extending the useSidebarOrderedReports force-inclusion logic to also apply on narrow layouts (iOS) would prevent reports from disappearing from the LHN, but this would be a workaround rather than addressing the root cause. The comment in the code (lines 292-295) explicitly states this was intentionally skipped for mobile, so changing it requires careful consideration of the mobile UX impact.
    • Adding a client-side guard in the split Onyx data to ensure the workspace chat's participants field is never overwritten with partial data — but this wouldn't help since the problematic Onyx updates come from the server, not from the client's optimistic data.
    Detailed Investigation

    Evidence Chain

    LHN Filtering Pipeline:

    1. Reports pass through shouldDisplayReportInLHN (src/libs/SidebarUtils.ts:212-281)
    2. isHiddenForCurrentUser checks notificationPreference — returns true for any falsy value (src/libs/ReportUtils.ts:2228-2239)
    3. Override conditions include: focused, pinned, has draft, system chat, own policy expense chat
    4. If hidden and no override → filtered out of LHN

    Split Transaction Flow:

    1. Split operates through updateSplitTransactions in src/libs/actions/IOU/Split.ts:1027
    2. Original transaction thread report is set to null via Onyx.METHOD.MERGE with value: null (Split.ts:1445-1449)
    3. No delegate-specific logic exists in Split.ts
    4. buildOnyxDataForMoneyRequest in IOU/index.ts MERGEs the workspace chat with updated iouReportID and outstandingChildRequest

    Delegate System:

    1. Vacation delegate (Account C) acts from their own session — NOT using the copilot/delegate access system
    2. The split action is processed by the server as Account C
    3. Server sends Onyx updates to Account D (submitter) via Pusher
    4. The client-side optimistic data on the delegate's device only fixes notificationPreference for currentUserAccountID (IOU/index.ts:7859-7861) — this doesn't help the submitter

    Platform Difference:

    1. useSidebarOrderedReports (src/hooks/useSidebarOrderedReports.tsx:296-310) force-includes the focused report only on wide layouts
    2. On iOS narrow layout, if the report fails filtering, it vanishes with no recovery
    3. ReportScreen (src/pages/inbox/ReportScreen.tsx:701-768) detects isRemovalExpectedForReportType when a policy expense chat becomes empty, triggering navigation to Concierge

    Open Questions

    • What exact Onyx updates does the Auth backend send via Pusher to the submitter when a vacation delegate performs a split? Does it modify the workspace chat's participants or isOwnPolicyExpenseChat fields?
    • Is the server sending Onyx.METHOD.SET (which overwrites entirely) instead of Onyx.METHOD.MERGE (which preserves existing keys) for the workspace chat report update?
    • Does the isOwnPolicyExpenseChat override in shouldOverrideHidden still apply after the server's Onyx update, or does the update clear this field?

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 5, 2026
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 5, 2026
  6. melvin-bot commented on Mar 5, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (External)

  7. changed the title [-]Vacation delegate - Submitter is navigated to Concierge chat, WS chat disappears from LHN[/-] [+][$250] Vacation delegate - Submitter is navigated to Concierge chat, WS chat disappears from LHN[/+] on Mar 5, 2026
  8. melvin-bot commented on Mar 5, 2026

    @melvin-bot
  9. chebon254 commented on Mar 5, 2026

    @chebon254

    Contributor details

    Your Expensify account email: kelvinchebon90@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/codeprolific

  10. melvin-bot commented on Mar 5, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  11. chebon254 commented on Mar 5, 2026

    @chebon254

    Proposal — Issue #84248

    Please re-state the problem that we are trying to solve in this issue.

    When a vacation delegate (Account C) splits a submitted expense, the expense submitter (Account D) is unexpectedly navigated to Concierge chat on all platforms, and on mobile (iOS/Android) the workspace chat also disappears from the LHN entirely.


    What is the root cause of that problem?

    Both symptoms share a single triggering root cause: ReportScreen incorrectly treats a remote delegate split action as a reason to navigate Account D away from the workspace chat.

    When Account C performs the split, the server sends Onyx updates to Account D's client that modify or invalidate the IOU report Account D was viewing. ReportScreen.tsx (around lines 711–768) has logic that detects when the currently-viewed report becomes unavailable or "empty" and calls Navigation.navigateToConciergeChat() as a fallback. This fallback fires even though:

    • Account D did not perform any action
    • The workspace policy chat is still fully valid and accessible
    • Account D should remain in the workspace chat context

    Why the LHN disappears on mobile but not Web:
    The navigation to Concierge is what causes the LHN regression on mobile. On Web (wide layout), the sidebar is always visible alongside the chat — so the workspace chat stays rendered in the LHN even as the right panel navigates to Concierge. On mobile (narrow layout), navigating to Concierge replaces the entire screen. Once Concierge is the active report, the workspace chat loses its "currently focused" protection in useSidebarOrderedReports (the force-inclusion guard at lines 296–310 is skipped for narrow layout), so it gets filtered out by the normal LHN rules.

    In short: fix the navigation destination, and the LHN bug resolves itself.


    What changes do you think we should make in order to solve the problem?

    In src/pages/inbox/ReportScreen.tsx, in the logic that triggers navigation away from a report that has become unavailable, add a check: if the report belongs to a workspace (policyID is set) and the cause of the report becoming unavailable is a remote action (not the current user's own action), navigate to the workspace policy expense chat instead of Concierge.

    // src/pages/inbox/ReportScreen.tsx  ~line 711
    - Navigation.navigateToConciergeChat();
    + // If the report belongs to a workspace, navigate to the workspace chat
    + // instead of Concierge — this avoids disorienting the user when a
    + // delegate action on another device closes the current report.
    + const policyExpenseChatID = ReportUtils.getPolicyExpenseChatByPolicyID(report?.policyID)?.reportID;
    + if (policyExpenseChatID) {
    +     Navigation.navigate(ROUTES.REPORT.getRoute(policyExpenseChatID));
    + } else {
    +     Navigation.navigateToConciergeChat();
    + }

    This single change fixes both bugs:

    1. Navigation bug — Account D lands on the workspace chat instead of Concierge.
    2. LHN bug — since Account D stays in the workspace chat, it remains the focused report on mobile, so the LHN force-inclusion logic keeps it visible and it never disappears.

    No changes to server-side Onyx data handling or SidebarUtils are needed.


    What alternative solutions did you explore? (Optional)

    Option A: Fix the server-side Onyx update (preserve notificationPreference in participants during split). This addresses a symptom of the data becoming stale but does not fix the navigation destination — Account D would still be navigated to Concierge even if the workspace chat remains in the LHN.

    Option B: Extend the useSidebarOrderedReports force-inclusion guard to also apply on narrow (mobile) layouts. This would prevent the LHN disappearance but would not fix the incorrect navigation to Concierge, which is the primary UX problem. The existing code comment also indicates this was intentionally skipped for mobile.

    Fixing the navigation destination in ReportScreen.tsx addresses both bugs at their shared trigger point with a single, targeted change.


    What is the root cause of that problem?

    There are two separate bugs triggered by the same action (delegate splitting the expense):

    Bug 1 — Navigation to Concierge chat (all platforms):
    When Account C splits the expense, IOU.splitBill creates new split reports and the original IOU report that Account D was linked to becomes closed/archived. The app detects that the currently viewed report is no longer accessible and triggers a navigation fallback. The fallback navigates to Concierge chat instead of staying in the workspace policy chat. This is because the "report closed" navigation handler does not check whether the user came from a workspace chat — it just falls back to Concierge unconditionally.

    Bug 2 — Workspace chat disappears from LHN (mobile only):
    The LHN uses SidebarUtils to determine which reports to show. On mobile, after the split, the workspace chat temporarily loses its "active" status because the original IOU report it was associated with has been closed and the new split reports have not yet been received/processed by Account D's client. During this window, the LHN filter removes the workspace chat. On Web, the timing is different due to how the browser handles Onyx updates, so the workspace chat does not disappear.


    What changes do you think we should make in order to solve the problem?

    Fix 1 — Navigation (correct fallback after report is closed by a delegate action):

    In src/libs/actions/Report.ts (or wherever the "navigate away from closed report" logic lives), when the current report becomes unavailable due to a split/delegate action, navigate to the workspace policy chat (ROUTES.REPORT for the policy room) instead of falling back to Concierge. The workspace chat reportID is accessible from the report's policyID.

    - Navigation.navigateToConciergeChat();
    + // If the report belongs to a workspace, go to the workspace chat instead of Concierge
    + const policyReportID = ReportUtils.getPolicyExpenseChatByPolicyID(report.policyID)?.reportID;
    + if (policyReportID) {
    +     Navigation.navigate(ROUTES.REPORT.getRoute(policyReportID));
    + } else {
    +     Navigation.navigateToConciergeChat();
    + }

    Fix 2 — LHN disappearing on mobile (keep workspace chat visible during split transition):

    In src/libs/SidebarUtils.ts, the workspace policy chat should remain visible while a split is in progress even if its associated IOU reports are temporarily in a transitional state. A guard should be added so the workspace chat is not filtered out when the user has a policyID match and the split action is pending.


    What alternative solutions did you explore? (Optional)

    For Bug 1: Suppressing the navigation entirely (not navigating away) when the report is closed by a delegate — but this is risky since the report is no longer valid to display. Navigating to the workspace chat is the cleanest UX.

    For Bug 2: Adding a debounce or delay before filtering — this is a patch, not a real fix. The correct solution is to retain the workspace chat in LHN when it has a valid policy association, regardless of whether its child IOU reports are in a transitional state.

  12. 66 remaining items

  13. suneox commented on May 6, 2026

    @suneox
    Contributor

    @AndrewGable could you please reopen this issue for payment processing? Thanks!

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on May 7, 2026
  15. melvin-bot commented on May 7, 2026

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.

  16. melvin-bot commented on May 7, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2029464989268362446/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  17. mallenexpensify commented on May 8, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @neerajbachani paid $250 via Upwork
    Contributor+: @suneox due $250 via NewDot

    @neerajbachani can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022052560234178095538

  18. neerajbachani commented on May 8, 2026

    @neerajbachani
    Contributor

    Offer Accepted on Upwork @mallenexpensify , thx!

  19. mallenexpensify commented on May 8, 2026

    @mallenexpensify
    Contributor

    @neerajbachani paid, summary updated above. Thx.

  20. garrettmknight commented on May 18, 2026

    @garrettmknight
    Contributor

    $250 approved for @suneox

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions