Skip to content

[Due for payment 2026-09-22] [$250] Report opened via /search/r/ deep link shows only a semi-transparent skeleton loader with the Home page visible behind it #97159

Closed

Description

@yuwenmemon

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.43-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: N/A
Email or phone of affected tester (no customers): yuwen@expensify.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Yuwen
Slack conversation (hyperlinked to channel name):

Action Performed:

  1. Open a GitHub issue that contains OldDot report links of the form https://www.expensify.com/report?param={"pageReportID":"<reportID>"}. In the recording this was the AP-close "reports awaiting your approval/submission" reminder issue auto-generated by the alteryxbotify bot, where each "Approve report" / "Submit report" link uses that format.
  2. While logged in to New Expensify, click one of those links. Because it's a www.expensify.com link handing off to New Expensify, it routes through the auth transition — https://new.expensify.com/transition?accountID=<id>&email=<email>&shortLivedAuthToken=<token>&exitTo=... — and then redirects to https://new.expensify.com/search/r/<reportID>.
  3. Observe the report view on the /search/r/<reportID> route (reproduced on report IDs 236182401668712 and 238362409868712).

Note: the /transition hop is what triggers this. A link that points straight at new.expensify.com (rather than an OldDot www.expensify.com/report?param=... link) skips the transition and does not reproduce the bug.

Expected Result:

The report opens on the /search/r/<reportID> route and its contents (the report header and its transactions/expenses) render. Any loading placeholder shown beforehand is fully opaque.

Actual Result:

Only a skeleton-loading placeholder renders, and it never resolves into the actual report. The skeleton is semi-transparent, so the Home page (For you / Recently added / Your spend / Discover) is visible through it in the background. Reproduced on two different report IDs.

Workaround:

Not applicable.

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

Media to be attached by reporter.

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 27, 2026
  2. MelvinBot commented on Jul 27, 2026

    @MelvinBot
    Contributor

    Proposal

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

    A report opened via a /search/r/<reportID> deep link that first passes through the /transition auth flow renders only a semi-transparent skeleton loader that never resolves into the real report, with the Home page visible behind it.

    What is the root cause of that problem?

    Two things combine — one is the actual bug, the other explains the "see-through" symptom:

    1. The skeleton never resolves (the real bug). The /search/r/:reportID route is SEARCH_MONEY_REQUEST_REPORT (ROUTES.ts:1285) → SearchMoneyRequestReportPage → MoneyRequestReportView. The skeleton is gated by shouldShowOpenReportLoadingSkeleton (isLoadingInitialReportActions) and a separate isAppLoadPending skeleton branch.

    openReport sets isLoadingInitialReportActions: true in optimisticData (Report/index.ts:1584) but only flips it back to false in successData/failureData (1629 / 1650) — which for write commands are held in memory until the SequentialQueue flushes. In the transition flow, LogInWithShortLivedAuthTokenPage fires openApp and then navigates to exitTo (the report) without awaiting it (LogInWithShortLivedAuthTokenPage.tsx:74). openApp sets IS_LOADING_APP: true optimistically and clears it only in finallyData — and the code itself warns that an interrupted session can strand IS_LOADING_APP: true with no OpenApp left to clear it (App.ts:356-370). While IS_LOADING_APP/isLoadingInitialReportActions stay stuck, the report stays on the skeleton and can't even fall back to a NotFound page, because shouldShowAccessErrorPage early-returns false while isLoadingApp !== false.

    2. Why the Home page shows through. The report screen lives in the RightModalNavigator, whose cards are intentionally transparent — the opaque background is painted by ScreenWrapperContainer via styles.appBG, not by the card or the skeleton (ReportActionsSkeletonView has no background of its own). During the transition window a semi-transparent FullScreenLoadingIndicator (opacity: 0.8) is also layered over Home. So while the screen is stuck loading and the opaque appBG layer isn't solidly covering the RHP area, Home remains visible behind the skeleton. This is a symptom of #1, not an independent bug.

    Investigation details & evidence
    • Skeleton gating: MoneyRequestReportView.tsx:169 and the isAppLoadPending branch just below it.
    • isLoadingInitialReportActions lifecycle: optimistic true at Report/index.ts:1584; false only in success/failure data (held until queue flush).
    • IS_LOADING_APP self-heal note explicitly describes the stuck-true failure mode: App.ts:356-370.
    • NotFound suppressed while loading: SearchMoneyRequestReportPage.tsx:317-320.
    • Transparency: RHP cards use a transparent card style; opacity comes from ScreenWrapperContainer's appBG; the skeleton contributes no background; FullScreenLoadingIndicator is opacity: 0.8 by design.

    Alternative considered: a paused SequentialQueue (shouldPauseQueue in SaveResponseInOnyx) could equally leave OpenReport's success/failure data un-flushed, stranding isLoadingInitialReportActions: true even if IS_LOADING_APP clears. Both paths produce the identical symptom; production logs (did OpenApp/OpenReport for this reportID complete? was the queue paused?) would confirm which one fires.

    Confidence: Medium — the code mechanism is clear and verified, but I have no production logs confirming which stall path actually triggers in the repro.

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

    1. Guarantee the loading gates clear even on an interrupted transition. Ensure the transition flow's openApp (or the follow-up ReconnectApp, which already has shouldClearAppLoading self-healing in App.ts) reliably clears IS_LOADING_APP, and that openReport is (re)dispatched for the target report once the app finishes loading, so isLoadingInitialReportActions is driven to false by a real success/failure response rather than being stranded by an un-flushed queue.
    2. Add a safety net so the screen can escape the skeleton. Relax the shouldShowAccessErrorPage guard at SearchMoneyRequestReportPage.tsx:317-320 (or the skeleton branches in MoneyRequestReportView) so a stuck isLoadingApp can't indefinitely block both the report and the NotFound fallback — e.g. time out the loading gate or key it off the actual OpenReport request state rather than the global app-loading flag.

    What alternative solutions did you explore? (Optional)

    Ensuring ScreenWrapperContainer's appBG always paints opaquely would fix only the cosmetic "see-through" symptom, not the underlying stuck-load, so it should not be the primary fix.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/97159) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 27, 2026
  4. melvin-bot commented on Jul 27, 2026

    @melvin-bot

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

  5. melvin-bot commented on Jul 27, 2026

    @melvin-bot
  6. shubham1206agra commented on Jul 28, 2026

    @shubham1206agra
    Contributor

    @yuwenmemon Can you make the steps more concrete please? I am not seeing any transition links when clicking from email.

  7. yuwenmemon commented on Jul 28, 2026

    @yuwenmemon
    ContributorAuthor

    @shubham1206agra updated the OP.

  8. shubham1206agra commented on Jul 28, 2026

    @shubham1206agra
    Contributor

    🆘 C+ Help Wanted

  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 28, 2026
  10. aswin-s commented on Jul 28, 2026

    @aswin-s
    Contributor

    Proposal

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

    When a report is opened on web via a cold transition/auth deep link (new.expensify.com/transition?... → new.expensify.com/search/r/<reportID>), the report page renders only a semi-transparent skeleton loader that never resolves into the report; the Home page (For you / Recently added / Your spend / Discover) is visible through it in the background. Expected: the /search/r/<reportID> route opens over the Search page with a fully-opaque placeholder that resolves into the report header and its transactions.

    What is the root cause of that problem?

    SEARCH_MONEY_REQUEST_REPORT (the screen behind /search/r/<reportID>) is a Right-Hand-Panel screen that is only ever meant to render on top of the SEARCH.ROOT full-screen page — it is declared as a child of SCREENS.SEARCH.ROOT in SEARCH_TO_RHP.ts:19, and the inverse relation RHP_TO_SEARCH (RELATIONS/index.ts:35) is what tells the navigator to place SEARCH.ROOT underneath the RHP. On the normal in-app path this is supplied explicitly — getReportURLForCurrentContext.ts:55-60 forces backTo to ROUTES.SEARCH_ROOT before building the SEARCH_MONEY_REQUEST_REPORT route. On a cold deep link through the transition flow there is no in-app navigation state and no backTo, so the linking adapter never materializes the SEARCH.ROOT backdrop; the RHP is placed over the default Home screen instead. Because the RHP is a semi-transparent overlay, Home shows through, and because the Search central screen never mounts, the query/report data behind the skeleton is never loaded — so it never resolves.

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

    1. In src/libs/Navigation/helpers/getReportURLForCurrentContext.ts (lines 55-60), the guard already forces backTo to ROUTES.SEARCH_ROOT for the in-app path. Apply the same backdrop guarantee to the deep-link path by ensuring the linking adapter that resolves /search/r/:reportID (the SEARCH_MONEY_REQUEST_REPORT entry in linkingConfig/config.ts:2125) always yields SEARCH.ROOT as the underlying full-screen route when none is present in the incoming state — mirroring how other RHP relations resolve their parent via the RHP_TO_* inverse maps.
    // when adapting a cold /search/r/ deep link with no underlying full-screen route,
    // resolve the RHP's parent from RHP_TO_SEARCH and inject SEARCH.ROOT as the backdrop
    const underlyingRoute = RHP_TO_SEARCH[SCREENS.RIGHT_MODAL.SEARCH_MONEY_REQUEST_REPORT]; // SCREENS.SEARCH.ROOT
    1. Confirm the sibling RHP report screen SCREENS.RIGHT_MODAL.SEARCH_REPORT (SEARCH_TO_RHP.ts:20, config.ts:1961) is covered by the same fix — it shares the identical SEARCH.ROOT-parent relation and would exhibit the same transparent-over-Home symptom on a cold /search/r/ deep link.

    Behavior matrix:

    Entry path Backdrop before Backdrop after
    In-app tap from Search (backTo set) SEARCH.ROOT (opaque, resolves) unchanged — SEARCH.ROOT
    Cold transition deep link to /search/r/<id> Home (transparent, never resolves) SEARCH.ROOT (opaque, resolves)
    Cold deep link to SEARCH_REPORT RHP Home (transparent) SEARCH.ROOT

    What alternative solutions did you explore? (Optional)

    Making MoneyRequestReportView's skeleton fully opaque (so Home no longer shows through) would mask the visual symptom but is the wrong layer — it does not restore the missing SEARCH.ROOT backdrop, so the query never runs and the skeleton would still never resolve into the report. The defect must be fixed where the underlying full-screen route is computed for the deep link, not in the placeholder styling.

  11. changed the title [-]Report opened via /search/r/ deep link shows only a semi-transparent skeleton loader with the Home page visible behind it[/-] [+][$250] Report opened via /search/r/ deep link shows only a semi-transparent skeleton loader with the Home page visible behind it[/+] on Jul 28, 2026
  12. mukhrr commented on Jul 28, 2026

    @mukhrr
    Contributor

    Proposal

    What is the root cause of that problem?

    Here is the chain that produces it, captured from the console on a cold /transition → exitTo=search/r/<id> boot:

    4755ms  [AuthScreens] Sending ReconnectApp
    4783ms  Called API write OpenApp {policyIDList: []}          <- reconnectApp -> !hasLoadedApp -> openApp() #1
    7815ms  [SequentialQueue] QueueFlushedData stored {key: "hasLoadedApp", value: true}   <- deferred, NOT applied
    8912ms  merge nvp_reconnectAppIfFullReconnectBefore  hasChanged: true
    9138ms  Full reconnect triggered {lastFullReconnectTime: "", serverReconnectCutoff: "2026-07-23 03:42:24.612"}
    9251ms  merge lastFullReconnectTime  hasChanged: true         <- 113ms too late
    9508ms  Called API write OpenApp {policyIDList: [...]}        <- openApp() #2
    9615ms  merge hasLoadedApp  hasChanged: true                  <- also too late
    

    On the OldDot handoff didUserLogInDuringSession() is false, so AuthScreensInitHandler sends a ReconnectApp:

    App.openApp();
    } else {
    Log.info('[AuthScreens] Sending ReconnectApp');
    App.reconnectApp(initialLastUpdateIDAppliedToClient);

    reconnectApp downgrades that to a full openApp() because the app has not loaded yet:

    App/src/libs/actions/App.ts

    Lines 469 to 478 in 4ce3320

    hasLoadedAppPromise.then(() => {
    if (!hasLoadedApp) {
    // If app hasn't loaded yet, call openApp instead (which has its own span)
    if (bootsplashSpan) {
    endSpan(CONST.TELEMETRY.SPAN_NAVIGATION.APP_OPEN);
    }
    openApp();
    return;
    }

    Then two guards that should stop a second one both miss.

    Guard 1, the full-reconnect dedupe, depends on Onyx merge ordering that does not hold here. RecordFullReconnectTime splices LAST_FULL_RECONNECT_TIME immediately before the delivered cutoff so the subscription never sees a new cutoff next to an old reconnect time. The function documents the assumption itself:

    /**
    * The response can deliver a newer cutoff than the one known when the request was built, and the
    * held cutoff can be newer still (a Pusher update can overtake an in-flight response), so the
    * recorded time satisfies whichever of the two is later. A time below either would read as stale
    * and fire an extra reconnect right after the full download.
    *
    * The entry goes right before the delivered cutoff entry, so the reconnect subscription never sees
    * a new cutoff next to an old reconnect time. That assumes Onyx broadcasts a batch's merges in
    * array order: true today because both keys are cache-resident (see subscribeToFullReconnect.ts),
    * and pinned by the SubscribeToFullReconnect e2e test. If it ever broke, the worst case is one
    * transient extra reconnect, never a loop.
    */
    function recordFullReconnectTimeFromResponse(responseOnyxData: AnyOnyxUpdate[], knownServerReconnectCutoff: string): void {
    const cutoffIndex = responseOnyxData.findIndex((update) => update.key === ONYXKEYS.NVP_RECONNECT_APP_IF_FULL_RECONNECT_BEFORE);
    const deliveredCutoffValue: unknown = cutoffIndex === -1 ? undefined : responseOnyxData.at(cutoffIndex)?.value;
    const deliveredCutoff = typeof deliveredCutoffValue === 'string' ? deliveredCutoffValue : '';
    const cutoffToSatisfy = deliveredCutoff > knownServerReconnectCutoff ? deliveredCutoff : knownServerReconnectCutoff;
    const insertionIndex = cutoffIndex === -1 ? responseOnyxData.length : cutoffIndex;
    responseOnyxData.splice(insertionIndex, 0, {onyxMethod: Onyx.METHOD.MERGE, key: ONYXKEYS.LAST_FULL_RECONNECT_TIME, value: getLastFullReconnectTimeToRecord(cutoffToSatisfy)});
    }

    assumes Onyx broadcasts a batch's merges in array order … If it ever broke, the worst case is one transient extra reconnect.

    On this path the two merges land 339ms apart, so they are not one batch. subscribeToFullReconnect reads lastFullReconnectTime: "", and "" < cutoff fires a full reconnect:

    function doFullReconnectIfNecessary() {
    if (!shouldTriggerFullReconnect(lastFullReconnectTime, serverReconnectCutoff)) {
    return;
    }
    Log.info('Full reconnect triggered', false, {lastFullReconnectTime, serverReconnectCutoff});
    triggerFullReconnect(serverReconnectCutoff);

    Guard 2, hasLoadedApp, is still false because its write is deferred. HAS_LOADED_APP: true rides in OpenApp's successData, and the sequential queue parks that in queueFlushedData until the queue drains, several seconds after OpenApp returned:

    App/src/libs/actions/App.ts

    Lines 340 to 345 in 4ce3320

    queueFlushedData: [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.HAS_LOADED_APP,
    value: true,
    },

    So the "one transient extra reconnect" the comment tolerates becomes a second full OpenApp, and that is the damage: OpenApp applies its priority snapshot to report_, reportActions_ and transactions_ with setcollection, which replaces those collections rather than merging. Anything the snapshot does not carry is deleted, including the report the user is looking at. Measured on main:

     6146ms  report + 1 action in Onyx, rendered
     8540ms  report AND reportActions both gone      <- OpenApp #2's replace
     9019ms  /home                                    <- disappearance read as a removal
    10390ms  report back via SearchForTodos, actions never come back
       47s   still 0 actions, no further API call
    

    Live Onyx read at 20s on main: {"hasReport":true,"actions":0,"isLoadingApp":false}. The report is present, its actions are gone, the app load has finished and nothing is in flight. reportActions.length === 0 then holds ReportActionsSkeletonView indefinitely, which is the OP's screenshot. The second OpenApp also keeps isAppLoadPending true for several extra seconds, which is the other half of "it just loads forever".

    On the semi-transparency: that is the RHP backdrop at its designed variables.overlayOpacity: 0.72. The panel itself is opaque. It reads as broken only because the skeleton never ends.

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

    Stop reconnectApp from issuing a second full OpenApp when one has already completed for this app load. hasLoadedApp cannot answer that question because its write is deferred, so latch the completion directly (src/libs/actions/App.ts):

    +// HAS_LOADED_APP is written by OpenApp's successData, which the sequential queue defers until the queue
    +// drains, so hasLoadedApp still reads false seconds after OpenApp has returned. Track the completion
    +// directly so a reconnect arriving in that window is not mistaken for "the app never loaded".
    +let hasOpenAppCompleted = false;
         callback: (val) => {
    +        // A sign-out or account switch needs a fresh full download, so the latch must not carry over.
    +        if (val?.accountID !== currentSessionData.accountID) {
    +            hasOpenAppCompleted = false;
    +        }
             currentSessionData = {
    -    ).finally(() => {
    +    )
    +        .then((response) => {
    +            hasOpenAppCompleted = true;
    +            return response;
    +        })
    +        .finally(() => {
             if (!hasLoadedApp) {
                 if (bootsplashSpan) {
                     endSpan(CONST.TELEMETRY.SPAN_NAVIGATION.APP_OPEN);
                 }
    +            // An OpenApp that already returned downloaded everything this reconnect would ask for, and its
    +            // response applies report_/reportActions_/transactions_ with setcollection. Running a second one
    +            // replaces those collections again and drops whatever the first OpenApp's snapshot did not carry,
    +            // which on a deep link is the report currently on screen.
    +            if (hasOpenAppCompleted) {
    +                Log.info('[App] Skipping the OpenApp fallback, one has already completed for this app load');
    +                return;
    +            }
                 openApp();
                 return;
             }

    The latch is set on resolution only, so a failed OpenApp still allows the fallback, and it is cleared whenever the session's accountID changes, so sign-out and account switch still get a full download. Once hasLoadedApp is applied, reconnects take the normal ReconnectApp path unchanged, so a genuine later full reconnect is unaffected.

    Measured, /transition → exitTo=search/r/<id>, Onyx cleared before each run, no mocking, no client-side skeleton or page changes:

    main with this change
    OpenApp calls per boot 2 1
    empty report 277876063023103 rendered 6.1s, skeleton from 6.3s, /home at 9.0s, 0 actions at 47s rendered, stays on /search/r/…, 3/3
    report 6733546472819928 never rendered, /home at 13.0s rendered, stays, 3/3

    Tests worth adding: a cold boot where reconnectApp runs after OpenApp resolved but before HAS_LOADED_APP is applied (exactly one OpenApp); a server cutoff delivered in the OpenApp response (no second full download); reconnectApp after OpenApp rejected (fallback still runs); sign-out then sign-in (fallback runs again); and a full reconnect after hasLoadedApp is true (still a ReconnectApp, not an OpenApp).

    What alternative solutions did you explore? (Optional)

    n/a

  13. melvin-bot commented on Jul 28, 2026

    @melvin-bot
  14. 137 remaining items

  15. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Sep 21, 2026
  16. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  17. melvin-bot commented on Sep 21, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    Upwork Job

    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. mallenexpensify commented on Sep 24, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @neerajbachani paid $250 via Upwork
    Contributor+: @QichenZhu 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/~022103234989944416573

  19. neerajbachani commented on Sep 24, 2026

    @neerajbachani
    Contributor

    @mallenexpensify I've accepted the job offer here, thanks!!

  20. mallenexpensify commented on Sep 24, 2026

    @mallenexpensify
    Contributor

    @neerajbachani paid, summary updated above. Thx.

  21. trjExpensify commented on Sep 25, 2026

    @trjExpensify
    Contributor

    approved $250 for @QichenZhu

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 productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions