Skip to content

Categories -Offline indicator shown briefly for second time when returning to portrait mode #103171

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.5.3-0
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: #102665
Email or phone of affected tester (no customers): ibellicotest+3215@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: Money Requests

Action Performed:

Prerequisite: Account has a workspace with categories enabled.
Prerequisite 2: anchoredFieldDropdowns enabled in "Troubleshoot"

  1. Open the Expensify app.
  2. Tap on FAB > "Create Expense" > "Manual"
  3. Turn off internet connection.
  4. Tap on "Category" field.
  5. Note that offline indicator is visible below search input.
  6. Switch to landscape mode.
  7. Return to portrait mode.
  8. Note that offline indicator appears briefly for a second time, on top of categories list.

Expected Result:

Offline indicator shouldn´t be displayed for a second time on categories list when user switches to landscape or portrait mode.

Actual Result:

Offline indicator is displayed briefly for a second time, on top of categories list, when user switches to portrait mode.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7278427_1791256939939.Container_3.mp4
Image

View all open jobs on GitHub

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

Issue OwnerCurrent Issue Owner: @DylanDylann

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 6, 2026
  2. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  3. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    @puneetlath @ikevin127 you have been assigned to this deploy blocker because you reviewed the offending PR: #102665

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

    @melvin-bot

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

  6. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  7. MelvinBot commented on Oct 6, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: [CFI] Open the Category list in a container anchored to its row (high confidence). This PR added the anchoredFieldDropdowns beta and the CategoryPickerModal path, so the repro path did not exist before it.

    Root cause: On native, the category picker opens as a bottom-docked Modal. BaseModal wraps its children in a ScrollView only in landscape (BaseModal.tsx:429). Each rotation changes the element type, so React remounts the whole CategoryPicker. On return to portrait, the offline hint (CategoryPicker/index.tsx:91) renders again while the sheet re-lays out.

    Recommended fix: Add shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false} to the PopoverWithMeasuredContent in CategoryPickerModal.tsx:97-112. The same fix also resolves Expense - Search input in category list is automatically cleared when turning to lanscape mode.

    Recommendation: demote and fix forward. The flash is brief and cosmetic. It only shows with the beta on, while offline, after rotating. A revert would remove the whole feature (17 files). If maintainers prefer a revert because of the other blockers from this PR, revert this PR.

    Investigation details
    • CategoryPickerModal doesn't pass the ScrollView prop. PopoverWithMeasuredContent forwards it as undefined (index.tsx:19,43), so BaseModal uses its default of true (BaseModal.tsx:91). The wrap applies only in bottom-docked landscape mode (BaseModal.tsx:314-316).
    • On native, isSmallScreenWidth is always true, so the popover always renders as a BOTTOM_DOCKED modal.
    • Other pickers with local state already turn this prop off, including PopoverReactionList, EmojiPicker, and FilterPopupButton.
    • Other PRs on the checklist that touch this area were ruled out. Fetch policy categories and tags on demand in shared pickers skips its fetch logic while offline. Chore/remove dead list item props only removes unused props.
    • The remount is confirmed from code. The exact flash timing is inferred from the code and the bug report. It was not reproduced on a device.

    Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.


    view run

  8. 5 remaining items

  9. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    @DylanDylann 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  10. DylanDylann commented on Oct 14, 2026

    @DylanDylann
    Contributor

    will test again after #103552 is merged

  11. melvin-bot commented on Oct 19, 2026

    @melvin-bot

    @DylanDylann Eep! 4 days overdue now. Issues have feelings too...

  12. DylanDylann commented on Oct 20, 2026

    @DylanDylann
    Contributor

    will test again after #103552 is merged

  13. melvin-bot commented on Oct 20, 2026

    @melvin-bot

    @puneetlath @ikevin127 @DylanDylann this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  14. DylanDylann commented on Oct 22, 2026

    @DylanDylann
    Contributor

    @MelvinBot Investigate this bug again

  15. MelvinBot commented on Oct 22, 2026

    @MelvinBot
    Contributor

    Updated Issue Analysis

    Conclusion: The cause I found earlier is already fixed on main. Please retest on Android. Close this issue if the flash is gone.

    What changed: Fix: Open full screen category popover on phones in landscape mode merged on 2026-10-21. It turns off the landscape ScrollView wrap that remounted the picker on rotation (CategoryPickerModal.tsx:199-201). This is the fix my earlier analysis recommended.

    If it still reproduces: It is likely a one-frame layout glitch while Android re-lays out the sheet. It is not a second indicator. I found no other remount and no second offline indicator in the code. Please attach a frame-by-frame recording before anyone changes code, so we can see which element flashes.

    Investigation details

    I checked the code at 439f896 (after the PR merged):

    • BaseModal now renders children directly, because shouldWrapChildrenInScrollView is false (BaseModal.tsx:317, BaseModal.tsx:431). The element type no longer changes on rotation, so CategoryPicker stays mounted.
    • Landscape only changes the sheet height (CategoryPickerModal.tsx:136-137). It is the same bottom-docked modal. There is no separate full-screen screen with its own OfflineIndicator.
    • The popover's visibility is local state in ExpenseFieldDropdown. Rotation does not close or reopen it. useReopenAfterReturn runs only after you navigate away and come back.
    • The only offline UI inside the sheet is the search input hint (CategoryPicker/index.tsx:103, index.tsx:164). SelectionList has no offline indicator of its own.
    • The page's OfflineIndicator sits behind the sheet, which is a separate Android dialog window. It can't draw on top of the list.

    Not tested: This bug needs a real Android rotation. Desktop web never counts as landscape, so a web test can't reproduce it. If the flash still shows on Android, two untested options are: keep the old sheet height until the new layout settles, or hide the hint briefly on orientation change.


    Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.

  16. DylanDylann commented on Oct 22, 2026

    @DylanDylann
    Contributor

    @trjExpensify This bug is a very rare edge case caused by the rotation animation, and it only happens while offline. I tried a few fixes, but no matter what, the UI briefly breaks during rotation before updating to the correct dimensions. So I’d vote to leave this bug as is to avoid a tricky fix

    cc @ikevin127

  17. trjExpensify commented on Oct 22, 2026

    @trjExpensify
    Contributor

    Sounds good to me, agreed it's a rare edge case. Let's move on!

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions