You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expense - Search input in category list is automatically cleared when turning to lanscape mode #103137
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.
Open the Expensify app.
Tap on FAB > "Create Expense" > "Manual"
Tap on "Category" field.
Enter any category on search input.
Turn to landscape mode.
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.
👋 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:
Identify the pull request that introduced this issue and revert it.
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.
What changes do you think we should make in order to solve the problem?
In CategoryPickerModal, pass shouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false} to PopoverWithMeasuredContent, the same way FilterPopupButton does.
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}
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.
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
@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!
Activity
applause-bot commentedon Oct 6, 2026
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
melvin-bot commentedon Oct 6, 2026
Triggered auto assignment to @jasperhuangg (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Oct 6, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 6, 2026
👋 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:
MelvinBot commentedon Oct 6, 2026
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
anchoredFieldDropdownsbeta 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.BaseModalwraps a bottom-docked modal's children in aScrollViewonly in landscape mode. Rotating the phone changes the element tree, so React unmounts and remounts the picker. The search text lives in local state insideCategoryPicker, 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.
CategoryPickerModaldoesn'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
true: BaseModal.tsx:91EmojiPicker,PopoverReactionList,DecisionModal,PopoverMenuv2 anduseReportSubmitToPopoveralso opt out.isSmallScreenWidthis alwaystrue, so rotation never switches between popover and bottom sheet: useResponsiveLayout/index.native.ts:37What changes do you think we should make in order to solve the problem?
CategoryPickerModal, passshouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false}toPopoverWithMeasuredContent, the same wayFilterPopupButtondoes.What alternative solutions did you explore? (Optional)
Lift the search value out of
CategoryPickerso 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:UI-4Opt bottom-docked modals with local state out of the landscape ScrollView wrapperPopover,PopoverWithMeasuredContentorModalthat can be bottom-docked and whose children hold local state (search input, form fields), unless it passesshouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false}.BaseModaladds aScrollViewonly in landscape, so rotating remounts the children and wipes their state (this issue).<PopoverWithMeasuredContent|<Popover|<Modalblocks whose children include aSelectionList/TextInput, withoutshouldWrapModalChildrenInScrollViewIfBottomDockedInLandscapeMode={false}The full rule file would go in App's
app-coding-standardsskill. 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.
[-]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[/+]melvin-bot commentedon Oct 6, 2026
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.
trjExpensify commentedon Oct 6, 2026
behind a beta, demoting.
7 remaining items
melvin-bot commentedon Oct 13, 2026
@DylanDylann 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
DylanDylann commentedon Oct 14, 2026
will test again after #103552 is merged
melvin-bot commentedon Oct 19, 2026
@DylanDylann Huh... This is 4 days overdue. Who can take care of this?
DylanDylann commentedon Oct 20, 2026
melvin-bot commentedon Oct 20, 2026
@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!
DylanDylann commentedon Oct 22, 2026
@ikevin127 @trjExpensify Fixed on main
Screen.Recording.2026-10-22.at.11.49.22.mov
melvin-bot commentedon Oct 27, 2026
@DylanDylann Eep! 4 days overdue now. Issues have feelings too...