Skip to content

[Due for payment 2026-07-21] Action badges missing until Home page / search is opened (OpenApp no longer returns the underlying report actions) #94674

Closed

Description

@melvin-bot

Problem

Action badges (e.g. outstanding child request indicators) are missing on app load. They only reappear after the user opens the Home page or otherwise triggers a search call, then navigates back to Inbox.

Root cause (suspected)

A recent change to OpenApp pulled out certain results — specifically the report actions the badges were derived from are no longer returned. hasOutstandingChildRequest is just a boolean flag, so it isn't enough on its own to render the badges; the badge state was being derived from the report actions that are now omitted.

The individual Search calls do still return those actions, so opening the Home page (or the Spend page) populates the data and the badges reappear. But if the user never opens those pages, the data is never fetched and the badges stay missing.

Expected behavior

The three searches that backfill this data should be triggered asynchronously on sign-in and on reconnect (i.e. every time we call OpenApp / ReconnectApp), so the badge data is always present without the user needing to manually open the Home/Spend page.

Steps to reproduce

  1. Sign in (or reconnect) so OpenApp runs.
  2. Observe that action badges are missing in the Inbox.
  3. Open the Home page, then navigate back to Inbox.
  4. ✅ Badges reappear — confirming the data is available via search but not fetched on initial load.

Reported in Slack.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    InternalRequires API changes or must be handled by Expensify staff
    on Jun 26, 2026
  2. Ayesha-Ashraf-Dev commented on Jun 26, 2026

    @Ayesha-Ashraf-Dev

    Contributor details

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

    Proposal
    Problem Understanding
    Action badges (outstanding child request indicators) are missing on app load because OpenApp no longer returns the underlying report actions they depend on. hasOutstandingChildRequest is just a boolean — it's insufficient to render badges without the actual report actions. The three Search calls that do return this data are only triggered when the user manually opens Home/Spend pages, leaving badges missing until then.
    Root Cause
    The recent OpenApp change removed certain report action results from the response. Badge state was derived from those actions, and now that they're absent from initial load, badges don't render. The data exists on the server and is correctly returned by Search calls — it's just never fetched at sign-in time.
    Proposed Solution
    Trigger the three badge-relevant Search calls asynchronously immediately after OpenApp / ReconnectApp completes, so badge data is always populated without user interaction.
    In OpenApp.ts (or wherever OpenApp/ReconnectApp are dispatched):
    typescript// After OpenApp/ReconnectApp resolves, fire badge-backfill searches async
    const triggerBadgeBackfillSearches = () => {
    // Fire all three searches non-blocking
    SearchActions.search({ query: CONST.SEARCH.BADGE_BACKFILL_QUERY_1 });
    SearchActions.search({ query: CONST.SEARCH.BADGE_BACKFILL_QUERY_2 });
    SearchActions.search({ query: CONST.SEARCH.BADGE_BACKFILL_QUERY_3 });
    };

    // Called after OpenApp and ReconnectApp both
    triggerBadgeBackfillSearches();
    These fire asynchronously (non-blocking) so they don't delay the initial app load — they run in the background and populate Onyx with the badge data as soon as the responses arrive.
    Implementation Steps

    Identify the exact three Search queries responsible for returning badge-relevant report actions (inspect network calls made when opening the Home page and note which queries return the missing actions)
    Create a triggerBadgeBackfillSearches() utility in the appropriate actions file (likely src/libs/actions/App.ts or a dedicated search helper)
    Call it after OpenApp in the sign-in flow
    Call it after ReconnectApp in the reconnect flow (network recovery, app foreground resume)
    Verify no duplicate calls — ensure these don't double-fire if the user opens Home page simultaneously (Onyx deduplication should handle this, but worth confirming)

    Files Likely Touched

    src/libs/actions/App.ts — add triggerBadgeBackfillSearches() call after OpenApp and ReconnectApp
    src/libs/actions/Search.ts (or equivalent) — reuse existing search action, no new API needed
    src/CONST.ts — optionally define the three query constants if not already named

    Why This Approach

    Minimal risk — reuses existing Search calls that already work correctly; no changes to OpenApp response structure
    Non-blocking — async fire means zero impact on sign-in performance
    Fixes both cases — sign-in (OpenApp) and reconnect (ReconnectApp) covered
    No data model changes — badge rendering logic stays untouched; we're just ensuring the data arrives earlier

    What This Does NOT Change

    OpenApp response structure stays as-is (no revert needed)
    Badge rendering logic untouched
    Search call behavior unchanged — same queries, same responses, just triggered earlier

  3. melvin-bot commented on Jun 26, 2026

    @melvin-bot
    Author

    ⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

  4. s77rt commented on Jun 29, 2026

    @s77rt
    Member

    Update: Raised PR.

  5. s77rt commented on Jul 2, 2026

    @s77rt
    Member

    Update: We went with a different approach than the initial plan and got a new command SearchForTodos added.

  6. 13 remaining items

  7. melvin-bot commented on Jul 14, 2026

    @melvin-bot
    Author

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  8. melvin-bot commented on Jul 20, 2026

    @melvin-bot
    Author

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • 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//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
  9. shubham1206agra commented on Jul 23, 2026

    @shubham1206agra
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: NA (BE change)
      Link to the comment on the Issue: NA

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: NA

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/663680

    Regression Test Proposal

    Test:

    1. Open Network tab.
    2. Login
    3. Verify after OpenApp request there is a SearchForTodos request
    4. Refresh page
    5. Verify after ReconnectApp request there is a SearchForTodos request
    6. Go to Troubleshoot and click on "Clear cache and restart"
    7. Verify after OpenApp request there is a SearchForTodos request

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-8840-a218-3e14-c427058bb344
  10. melvin-bot commented on Jul 23, 2026

    @melvin-bot
    Author

    @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  11. mallenexpensify commented on Jul 23, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @shubham1206agra due $250 via NewDot

    ^ Test case created. Thx

  12. JmillsExpensify commented on Aug 10, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @shubham1206agra

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 productionDailyKSv2InternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions