Skip to content

[Due for payment 2026-09-17] Expense - Expense previews are not highlighted after splitting expense #100757

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.75-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #98744
Email or phone of affected tester (no customers): sjdojsndonsjoisnjio@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Open the report.
  5. Click More > Split > Save.
    → Split expense rows are highlighted.
  6. Quickly close the report.

Expected Result:

Expense previews will be highlighted after splitting expense.

Actual Result:

Expense previews are not highlighted after splitting expense.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7255413_1788983894646.4.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7255413

Issue OwnerCurrent Issue Owner: @abzokhattab

Activity

  1. added
    DeployBlockerCash
    on Sep 9, 2026
  2. applause-bot commented on Sep 9, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/48709b086f1e562c1d3468f4017a8be5a90a7a0e472dd75ac2f0700f7e298218

  3. added
    Bug
    on Sep 9, 2026
  4. melvin-bot commented on Sep 9, 2026

    @melvin-bot

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

  5. github-actions commented on Sep 9, 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.
  6. melvin-bot commented on Sep 9, 2026

    @melvin-bot

    @blimpich @abzokhattab you have been assigned to this deploy blocker because you reviewed the offending PR: #98744

  7. melvin-bot commented on Sep 9, 2026

    @melvin-bot

    @TaduJR you have been assigned to this deploy blocker because you authored the offending PR: #98744

  8. melvin-bot commented on Sep 9, 2026

    @melvin-bot

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

  9. MelvinBot commented on Sep 9, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #98744 - "refactor: the new-transaction highlight rail and the wide RHP width model" by @TaduJR (High confidence)
    Related Issues: #96327 (the issue #98744 fixed), #89585 / #98308 (prior work on this same highlight)

    Recommendation: REVERT

    #98744 is a pure refactor whose stated goal was to keep this exact behaviour identical ("the behaviour is the same … but the code behind it is simpler"), and it is the only PR in 9.4.75-0 that touches the new-transaction highlight rail, so reverting restores known-good production behaviour without giving up any user-facing feature. A roll-forward fix would have to change how "is this pane actually on screen?" is computed under a super-wide RHP, which is cross-cutting navigation/animation logic that is hard to validate safely under deploy-blocker time pressure.

    Assigned: @TaduJR (PR author), @blimpich and @abzokhattab (approving reviewers) from #98744 — already assigned by Melvin, confirmed correct.
    Labels: No changes. DeployBlockerCash is kept (an App PR caused this, and the issue is not reproducible on production). DeployBlocker was never applied, so nothing to remove.

    📋 Detailed Analysis

    Evidence

    • The symptom is the chat's expense preview cards failing to highlight, which is exactly the surface refactor: the new-transaction highlight rail and the wide RHP width model #98744 reworked: it rewrote useNewTransactions, useAnimatedHighlightStyle, MoneyRequestReportPreview, pendingNewTransactionIDsSelector, and the whole wide-RHP width model in one PR.
    • I checked the titles and changed files of all 52 App PRs in Deploy Checklist #100739. No other PR in this release touches useNewTransactions, useAnimatedHighlightStyle, MoneyRequestReportPreview, WideRHPContextProvider, useResponsiveLayoutOnWideRHP, selectors/ReportMetaData, or PendingNewTransactions. The only overlap at all is #100024, which extracted MoneyRequestReportEmptyStateView out of MoneyRequestReportActionsList.tsx and is unrelated to the highlight.
    • Staging-only, production-clean, matches refactor: the new-transaction highlight rail and the wide RHP width model #98744 merging into this release on 2026-09-09.
    • The platform pattern is the strongest corroboration. Only Windows Chrome and macOS Chrome/Safari are checked; no native and no mWeb. The regression below only exists on wide layouts, because on narrow layouts shouldUseNarrowLayout is true and the visibility gate collapses back to plain isFocused, which behaves correctly. A bug confined to wide-layout web is precisely the signature of the wide-RHP model this PR rewrote.

    Verification

    Affected files (all introduced or rewritten by #98744, permalinked at the 9.4.75-0 staging commit 2b61335):

    Confirmed via gh api repos/Expensify/App/pulls/98744/files that #98744 modifies every one of these paths.

    Root Cause

    The chat's expense previews decide whether to show the highlight through a new visibility gate that reports the pane as visible while it is fully covered by a super-wide RHP, so the one-shot animation is spent off-screen before the user ever gets back to the chat.

    1. The gate says "visible" while the chat is covered.

    MoneyRequestReportPreview passes shouldUseNarrowLayoutIgnoringWideRHP into useIsReportVisible. On a maximised desktop that flag is false, so the hook takes its wide-layout branch:

    if (shouldUseNarrowLayout) {
        return isFocused;
    }
    return isFocused || (ownTabRouteKey !== undefined && isRHPTopmost && ownTabRouteKey === activeTabRouteKey);

    That branch treats any topmost RHP as a pane sitting beside the chat. But the report in this repro is opened from that very component with markReportRHPWidth(iouReportID, 'super-wide'), i.e. an RHP that completely covers the chat. The hook's own docstring states the rule is "never [true] under a super-wide RHP", but nothing in the implementation checks the RHP's width — and useIsReportVisibleTest.ts locks in the width-blind behaviour ("stays visible on a wide pane when an RHP opens over its own tab"). The caller's own comment right above the call — "Don't surface the highlight while the preview is covered — it'd animate the one-shot off-screen and be missed" — describes the bug that the argument it passes then causes.

    2. So the highlight fires while the chat is off-screen.

    Saving the split runs SplitTransactionUpdate.ts#L2180-L2188: dismissModalWithReport(...) starts the RHP dismissal, and the split children are written to Onyx one requestAnimationFrame later — while the RHP is still in the root navigation state animating out, so isRHPTopmost is still true and the covered chat still reads as visible. The diff in useNewTransactions picks up the new children, newTransactionIDs fills, and useAnimatedHighlightStyle plays entry + pulse immediately: its "wait for focus before pulsing" branch is gated on shouldUseNarrowLayoutOnWideRHP, which ScreenWrapper sources from the same wide-RHP-adjusted flag and which is false for the chat screen on desktop, so the deferral is skipped and the play phase is reset to 'idle'.

    3. And it cannot replay when the user comes back.

    shouldHighlight was already true while covered, so it never transitions false → true again on return and the one-shot does not replay. On top of that, #98744 added a new 4s expiry to the diff latch (useNewTransactions.ts#L135-L143, CONST.PENDING_TRANSACTION_DELETION_DELAY = 4000), and because the gate reads visible, that timer starts while the chat is still covered — so the rows also lose their "new" status outright. Production has no such expiry: newTransactions was a useMemo deliberately not invalidated by prevTransactions, so the set persisted until the transaction list changed again, which is why closing the report there still highlighted the previews.

    Net effect: on wide-layout web the previews' highlight is consumed behind the super-wide RHP and expires on a timer the user cannot see, so closing the report — quickly or not — shows no highlight. Note that the split flow writes no pendingNewTransactionIDs rail flags for the chat report (they go to the expense report's metadata via buildOnyxDataForMoneyRequest), so the chat previews depend entirely on this diff path, with no rail fallback to save them.

  10. blimpich commented on Sep 9, 2026

    @blimpich
    Contributor

    consolidating conversation around this deploy blocker and it's related deploy blockers here: https://expensify.slack.com/archives/C01GTK53T8Q/p1788996794073959

  11. added
    Reviewing
    on Sep 10, 2026
  12. melvin-bot commented on Sep 10, 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.

  13. IuliiaHerets commented on Sep 10, 2026

    @IuliiaHerets

    This issue is not repro on Windows 10/Chrome Build v9.4.75-1

    Recording.1580.mp4
  14. added
    Daily
    and removed
    DeployBlockerCash
    Hourly
    on Sep 10, 2026
  15. removed
    Reviewing
    on Sep 10, 2026
  16. changed the title [-]Expense - Expense previews are not highlighted after splitting expense[/-] [+][Due for payment 2026-09-17] Expense - Expense previews are not highlighted after splitting expense[/+] on Sep 10, 2026
  17. melvin-bot commented on Sep 10, 2026

    @melvin-bot

    @abzokhattab / @TaduJR

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.75-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-09-17. 🎊

    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]

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

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions