Skip to content

Expense - Search input in category list is automatically cleared when turning to lanscape mode #103137

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: https://github.com/Expensify/Mobile-Expensify/pull/14155
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 beta enabled in troubleshoot.

  1. Open the Expensify app.
  2. Tap on FAB > "Create Expense" > "Manual"
  3. Tap on "Category" field.
  4. Enter any category on search input.
  5. Turn to landscape mode.
  6. Note that search input is cleared and no search is triggered.

Expected Result:

Text in search input should remain visible after turning to lanscape mode in category list, and search should still be triggered.

Actual Result:

Text in search input in category list, is cleared after turning to landscape mode and search is not triggered.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7278386_1791249788769.Container_2.1.mp4

View all open jobs on GitHub

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

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. applause-bot commented on Oct 6, 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/4f9eb922d5250db69f8ef9a7921a7e2e6915f7977bb48c7e2ecfcd3b2c74fc24

  3. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    Triggered auto assignment to @jasperhuangg (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Oct 6, 2026

    @melvin-bot

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

  5. 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.
  6. 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 (author DylanDylann, merged 2026-10-05, in 9.5.3-0). Confidence: high.

    Recommendation: Fix forward. The fix is one prop, and only users with the anchoredFieldDropdowns beta see the bug. Reverting would back out 17 files. If a fix can't land quickly, demote the blocker, since the feature is beta-gated.

    Proposal

    What is the root cause of that problem?

    With the beta on, the Category field opens CategoryPickerModal. On Android phones this is always a bottom-docked modal.

    BaseModal wraps a bottom-docked modal's children in a ScrollView only in landscape mode. Rotating the phone changes the element tree, so React unmounts and remounts the picker. The search text lives in local state inside CategoryPicker, so the remount resets it to empty and the filter goes away.

    Six other pickers that hold local state already opt out of this wrapping. CategoryPickerModal doesn't, so the default (true) applies. Before this PR the category list was a full page, which doesn't remount on rotation. That's why production isn't affected.

    Code references

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

    1. In CategoryPickerModal, pass shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false} to PopoverWithMeasuredContent, the same way FilterPopupButton does.
    2. Cap the picker's height in landscape. It currently gets a fixed 416px. Without the scroll wrapper, the sheet is limited to 75% of window height, so the list's own scroll must handle overflow on short screens.

    What alternative solutions did you explore? (Optional)

    Lift the search value out of CategoryPicker so it survives a remount. This works, but it treats the symptom; the remount would still happen.

    💡 Suggested AI code review rule

    This pattern has already been opted out of six times, so a rule may help the AI reviewer catch the next one. Proposed for Expensify/App:

    • Rule: UI-4 Opt bottom-docked modals with local state out of the landscape ScrollView wrapper
    • Condition: Flag a Popover, PopoverWithMeasuredContent or Modal that can be bottom-docked and whose children hold local state (search input, form fields), unless it passes shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false}.
    • Why: BaseModal adds a ScrollView only in landscape, so rotating remounts the children and wipes their state (this issue).
    • Search pattern: <PopoverWithMeasuredContent|<Popover|<Modal blocks whose children include a SelectionList/TextInput, without shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false}
    • Offending code (❌): CategoryPickerModal.tsx:97-123
    • Fix (✅): FilterPopupButton.tsx:156

    The full rule file would go in App's app-coding-standards skill. A maintainer can open it there as a draft PR.


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

  7. changed the title [-]Expense-Search input in category list is automatically cleared when turning to lanscape mode[/-] [+]Expense - Search input in category list is automatically cleared when turning to lanscape mode[/+] on Oct 6, 2026
  8. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  9. trjExpensify commented on Oct 6, 2026

    @trjExpensify
    Contributor

    behind a beta, demoting.

  10. 7 remaining items

  11. melvin-bot commented on Oct 13, 2026

    @melvin-bot

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

  12. DylanDylann commented on Oct 14, 2026

    @DylanDylann
    Contributor

    will test again after #103552 is merged

  13. melvin-bot commented on Oct 19, 2026

    @melvin-bot

    @DylanDylann Huh... This is 4 days overdue. Who can take care of this?

  14. DylanDylann commented on Oct 20, 2026

    @DylanDylann
    Contributor

    will test again after #103552 is merged

  15. 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!

  16. DylanDylann commented on Oct 22, 2026

    @DylanDylann
    Contributor

    @ikevin127 @trjExpensify Fixed on main

    Screen.Recording.2026-10-22.at.11.49.22.mov
  17. melvin-bot commented on Oct 27, 2026

    @melvin-bot

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

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