Skip to content

[Due for payment 2026-09-03] Spend - Navigation arrows are missing on expense RHP after reset app #99641

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.62-1
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: #98611
Email or phone of affected tester (no customers): sdosijdiosjndsodo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two expenses.
  4. Go to Account > Troubleshoot > Clear cache and restart > Reset and refresh.
  5. Go to Spend > Expenses
  6. Open any expense.
    → Navigation arrows are shown.
  7. Go to Account > Troubleshoot > Clear cache and restart > Reset and refresh.
  8. Go to Spend > Expenses
  9. Open any expense.
    → Navigation arrows are missing until both expenses are opened.

Expected Result:

After reset app, navigation arrows will always be shown on expense RHP.

Actual Result:

After reset app, navigation arrows are missing until both expenses are opened.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7243960_1787813726458.12.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7243960

Issue OwnerCurrent Issue Owner: @thelullabyy

Activity

  1. added
    DeployBlockerCash
    on Aug 27, 2026
  2. applause-bot commented on Aug 27, 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/a5770e366999c3ee4cd492fe465f8d02e2cba778c8f934abf1ad2eabe958f373

  3. added
    Bug
    on Aug 27, 2026
  4. melvin-bot commented on Aug 27, 2026

    @melvin-bot

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

  5. melvin-bot commented on Aug 27, 2026

    @melvin-bot

    @JS00001 @ShridharGoel you have been assigned to this deploy blocker because you reviewed the offending PR: #98611

  6. melvin-bot commented on Aug 27, 2026

    @melvin-bot

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

  7. melvin-bot commented on Aug 27, 2026

    @melvin-bot

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

  8. github-actions commented on Aug 27, 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.
  9. MelvinBot commented on Aug 27, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #98611 - "Standardize Expense Report and Expense header with predictable button placement and carousel counter" by @thelullabyy (High confidence)
    Related Issues: N/A

    Recommendation: ROLL FORWARD

    The bug is a stale in-memory cache that survives "Reset and refresh"; a targeted one-line-scope fix (invalidate the cache when Onyx is cleared) is far safer than reverting this large header/carousel standardization PR, which also carries substantial intended feature work and tests.

    Assigned: @thelullabyy (PR author), @JS00001 and @ShridharGoel (approving reviewers) — already assigned by Melvin
    Labels: No changes. DeployBlockerCash kept (App-side regression, N/A in production because it is a new feature). DeployBlocker is not present, so nothing to remove.

    📋 Detailed Analysis

    Evidence

    • PR Standardize Expense Report and Expense header with predictable button placement and carousel counter #98611 introduced the entire carousel-population path for the flat Spend transaction list: the carouselSiblingTransactionIDs derivation, the proactive population useEffect, the onSelectRow set/clear calls, and the new snapshot-hash-based idempotency in TransactionThreadNavigation.ts. Before this PR the Spend flat list did not seed TRANSACTION_THREAD_NAVIGATION_TRANSACTION_IDS this way, so this class of "arrows missing after reset" is a regression from this PR.
    • Merged 2026-08-26, first shipped in 9.4.62 — matches the reported version and staging-only reproduction (feature does not exist in production).

    Verification

    Root Cause

    "Account > Troubleshoot > Clear cache and restart > Reset and refresh" runs clearOnyxAndResetApp, which wipes Onyx via Onyx.clear() (clearOnyxAndSeedFullReconnect) without reloading the JS bundle and without calling clearActiveTransactionIDs. TRANSACTION_THREAD_NAVIGATION_* is not in KEYS_TO_PRESERVE, so the Onyx keys are wiped — but the module-level shadow cache (lastSetIDs, lastSetSnapshotHash, lastSetDescriptors) survives in memory and goes stale: it still claims [id1, id2] at snapshot hash H was already written, while Onyx actually holds nothing.

    The search hash is derived from the query (queryJSON), not the data, so re-opening "Spend > Expenses" yields the same hash H every time. On the second visit:

    • carouselSiblingTransactionIDs = [id1, id2], hash = H (unchanged).
    • setActiveTransactionIDs([id1, id2], H) is called (by the proactive effect and by onSelectRow).
    • The idempotency guard finds areIDsUnchanged === true, lastSetSnapshotHash === H, and equal descriptors, so it returns early and skips the Onyx.set (lines 56-59).

    Net effect: TRANSACTION_THREAD_NAVIGATION_TRANSACTION_IDS stays empty in Onyx, the RHP render guard (length < 2) fires, and the arrows are hidden. The arrows reappear "after both expenses are opened" only incidentally: navigating in/out of the transaction-thread RHP eventually unmounts the navigation component onto a non-carousel-preserving screen, which calls clearActiveTransactionIDs() and resets the stale module cache to null; the next setActiveTransactionIDs then actually writes to Onyx.

    The first reset works because the module cache starts null (fresh JS context), so the very first write is never skipped. The second reset fails because the cache is now populated and outlives the Onyx clear.

    Suggested fix (roll forward)

    Keep the in-memory shadow cache consistent with Onyx across a reset. Options, cheapest first:

    1. Invalidate the module cache when Onyx is cleared — e.g. reset lastSetIDs/lastSetSnapshotHash/lastSetDescriptors (call clearActiveTransactionIDs, or an internal cache-reset) from the clearOnyxAndResetApp reset flow.
    2. Have TransactionThreadNavigation.ts keep the cache in sync via an Onyx.connect to TRANSACTION_THREAD_NAVIGATION_TRANSACTION_IDS/_SNAPSHOT_HASH so an external clear (null) resets the shadow automatically, rather than relying on the shadow never diverging from Onyx.
  10. added
    Reviewing
    on Aug 27, 2026
  11. m-natarajan commented on Aug 27, 2026

    @m-natarajan

    Navigation arrows are not displayed at all on the expense RHP on the Spend/Expense page
    Tested on Mac 26.5.1 Safari
    v9.4.62-4

    Recording.2856.mp4
  12. removed
    DeployBlockerCash
    Hourly
    on Aug 27, 2026
  13. added
    Daily
    and removed
    Reviewing
    on Aug 27, 2026
  14. changed the title [-]Spend - Navigation arrows are missing on expense RHP after reset app[/-] [+][Due for payment 2026-09-03] Spend - Navigation arrows are missing on expense RHP after reset app[/+] on Aug 27, 2026
  15. melvin-bot commented on Aug 27, 2026

    @melvin-bot

    @thelullabyy

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.62-4 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-03. 🎊

    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