Skip to content

Spend - Empty state seen on background when switching to landscape mode on "Filters" page. #91678

Closed

Description

@applause-bot

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.82-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: #90029
Email or phone of affected tester (no customers): ibellicotest+2250@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app)
App Component: Search

Action Performed:

Prerequisite: Account has no expenses yet.

  1. Open the Expensify app.
  2. Navigate to "Spend" > "Expenses"
  3. Tap on "Filters" icon.
  4. While on filters page, switch to landscape mode.
  5. Note that empty state screen and insights are briefly visible on background.
  6. Switch to portrait mode.
  7. Note that empty state screen and insights are visible again.
  8. Open any filter. (For example: Status)
  9. Switch to landscape mode.
  10. Note that empty state screen and insights are visible again.

Expected Result:

Expenses list or empty state screen from "Spend" should not be visible on background while turning to landscape mode on "Filters" page.

Actual Result:

Empty state screen and insights are visible on background while turning to landscape mode on "Filters" page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7163089_1779758047062.Switch.mp4

View all open jobs on GitHub

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

Activity

  1. added
    DeployBlockerCash
    Bug
    on May 26, 2026
  2. applause-bot commented on May 26, 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/904f454353dbc4512fdca18c91a64bc799d86cd9a8c36e27fc801d1bc2be2b19

  3. melvin-bot commented on May 26, 2026

    @melvin-bot

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

  4. melvin-bot commented on May 26, 2026

    @melvin-bot

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

  5. github-actions commented on May 26, 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. MelvinBot commented on May 26, 2026

    @MelvinBot
    Contributor

    Proposal

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

    When opening the Filters page on "Spend > Expenses" (with no expenses) on Android and switching to landscape mode, the empty state screen and insights briefly flash visible in the background behind the filter overlay.

    What is the root cause of that problem?

    PR #90029 changed advanced filters from a navigation screen (which fully replaced the underlying view) to a modal overlay using PopoverWithMeasuredContent with smallScreenModalType=CENTERED_SWIPEABLE_TO_RIGHT.

    On Android native, isSmallScreenWidth is hardcoded to true, so useFullscreenAdvancedFilters() always returns true, and the filter always renders as a modal overlay (not a popup).

    The problem is in Backdrop/index.tsx:22-23: the Entering and Exiting Keyframe animations are recreated on every render (not memoized). When orientation changes trigger a re-mount of the Backdrop component, the fadeIn entering animation replays from opacity 0, causing a brief window where the background content is visible.

    Additionally, the backdropStyle is reactive to windowWidth/windowHeight, and the modal receives updated deviceWidth/deviceHeight props during orientation change — this cascade of state updates can cause intermediate render frames where the overlay doesn't fully cover the screen.

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

    Memoize the Keyframe animation objects in Backdrop/index.tsx using useMemo to prevent the fade-in animation from replaying during orientation-triggered re-renders:

    const Entering = useMemo(() => new Keyframe(getModalInAnimation('fadeIn')).duration(animationInTiming), [animationInTiming]);
    const Exiting = useMemo(() => new Keyframe(getModalOutAnimation('fadeOut')).duration(animationOutTiming), [animationOutTiming]);

    This ensures the entering animation only runs once when the modal first opens, and is not retriggered by dimension-change re-renders.

    Investigation details

    Data flow:

    1. User opens Filters → SearchAdvancedFiltersButton renders FilterPopupButton with smallScreenModalType=CENTERED_SWIPEABLE_TO_RIGHT
    2. PopoverWithMeasuredContent detects isSmallScreenWidth=true and renders a Modal
    3. Modal renders via BaseModal → ReanimatedModal with a Backdrop + Container
    4. User rotates device → windowWidth/windowHeight swap → re-renders cascade through the modal tree
    5. Backdrop's non-memoized Keyframe animations are recreated, potentially replaying the fade-in from opacity 0
    6. Background content (empty state + insights) is briefly visible through the transparent-to-opaque backdrop transition

    Alternative explanation considered: React Native's Modal component on Android may have known layout issues during orientation changes where its native overlay momentarily fails to cover the new screen dimensions. Even if this is a contributing factor, memoizing the animations would eliminate the most visible symptom (the replay of the fade-in).


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. bernhardoj commented on May 26, 2026

    @bernhardoj
    Contributor

    This is because we use modal. If we decided to use a navigation page/screen, then this issue will be gone.

  8. JS00001 commented on May 26, 2026

    @JS00001
    Contributor

    Lets use a navigation screen here

  9. JS00001 commented on May 26, 2026

    @JS00001
    Contributor

    Fixed by CP, popup no longer exists

  10. removed
    DeployBlockerCash
    on May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugEngineeringHourly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions