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
[Due for payment 2026-03-30] Android - FAB - Menu item icons become green when reopening FAB #85685
Version Number: 9.3.40-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:#83299 Email or phone of affected tester (no customers):sdjsdjosijnsodiosd@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Samsung Galaxy S25 FE / Android 16 App Component: Left Hand Navigation (LHN)
Action Performed:
Launch Expensify app.
Open FAB.
Close FAB.
Open FAB.
Expected Result:
Menu item icons will remain white when reopening FAB.
👋 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.
Classification: Frontend bug Causing PR: #83299 - "FAB popover decomposition" by @TMisiukiewicz (High confidence) Related Issues: None
Recommendation: REVERT
This is a frontend regression introduced by the FAB refactor. The PR is relatively recent (merged March 17) and the bug affects a core UI component. Reverting is the safest path to unblock the deploy while a proper fix can be developed.
Labels: Keeping DeployBlockerCash (App PR caused the issue); DeployBlocker is not present so no label changes needed.
📋 Detailed Analysis
Evidence
PR #83299 refactored the FAB (Floating Action Button) popover from a monolithic ~800-line component into a composable architecture using context and custom hooks. The issue describes menu item icons becoming green (focused state) when reopening the FAB, which only occurs on staging (where this PR is deployed) and not on production.
The bug was first reported on version 9.3.40-0, and PR #83299 is listed in the StagingDeployCash checklist at position #32 in the chronological merge order.
Verification
The PR modifies the core FAB implementation files:
/home/runner/_work/App/App/src/pages/inbox/sidebar/FloatingActionButtonAndPopover.tsx - Main FAB component (rewritten)
/home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/FABPopoverMenu.tsx - New popover menu component
/home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/FABFocusableMenuItem.tsx - New focusable menu item
/home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/useFABMenuItem.ts - Hook for menu item focus management
These files directly control the FAB menu rendering and icon states reported in the bug.
Root Cause
The issue is in the focus state management when the FAB menu reopens.
In /home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/FABPopoverMenu.tsx (lines 71-75):
The problem: useState only uses initialFocusedIndex on the first render. When the FAB closes and reopens, the focusedIndex state persists from the previous session because there is no useEffect to reset it when isActive changes from false to true.
While line 86 of FABPopoverMenu.tsx calls setFocusedIndex(-1) when an item is pressed, this doesn't guarantee proper reset on menu close/reopen cycles, especially if the menu is dismissed without selecting an item (e.g., clicking outside).
In /home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/useFABMenuItem.ts (line 36):
constisFocused=focusedIndex===itemIndex;
This causes menu items to render with focused state (green icons) based on the stale focusedIndex, which then propagates to MenuItem icon fill colors via the focused prop.
Please re-state the problem that we are trying to solve in this issue.
On Android, when opening the FAB menu, closing it (via backdrop tap or back button), and reopening it, the menu item icons become green instead of remaining their normal gray/white color.
What is the root cause of that problem?
PR #83299 ("FAB popover decomposition") refactored the FAB popover from using PopoverMenu (which renders items from a data array) to a decomposed component structure (FABPopoverMenu + FABFocusableMenuItem). During this refactor, a critical focusedIndex reset mechanism was lost.
Old behavior (PopoverMenu): The PopoverMenu component had a handleModalHide callback (PopoverMenu.tsx:488-498) that fired every time the modal was hidden. This callback called setFocusedIndex(getSelectedItemIndex(menuItems)), which returns -1 for FAB items (since none have isSelected: true), effectively resetting the focus state on every close.
New behavior (FABPopoverMenu): The new FABPopoverMenu.tsx has no equivalent onModalHide handler. The focusedIndex is only reset to -1 inside onItemPress (line 86), which only fires when a user actively selects a menu item. When the menu is closed by tapping the backdrop or pressing back, focusedIndex retains its stale value.
Here's the chain of events:
FAB opens → focusedIndex = -1 → icons show normal color (gray theme.icon)
On Android, the modal's focus management (via FocusTrapForModal or native accessibility) triggers onFocus on a menu item → setFocusedIndex(itemIndex) fires (FABFocusableMenuItem.tsx:27)
User closes FAB via backdrop tap → focusedIndex stays at the stale value (no reset)
FAB reopens → stale focusedIndex → affected item renders with focused=true → getIconFillColor(ACTIVE, true, isPaneMenu=true) returns theme.iconMenu (green #03D47C) instead of theme.icon
Additionally, FocusableMenuItem uses useSyncFocus (line 11) which calls .focus() on the element when isFocused=true, which can trigger further onFocus events, reinforcing the stale focus state.
What changes do you think we should make in order to solve the problem?
Add a focusedIndex reset when the FAB menu becomes invisible. In FABPopoverMenu.tsx, pass an onModalHide callback to PopoverWithMeasuredContent that resets focusedIndex to -1:
onModalHide={() => setFocusedIndex(-1)}
This mirrors the behavior of the old PopoverMenu.handleModalHide that was lost during the decomposition refactor.
What alternative solutions did you explore? (Optional)
An alternative would be to add a useEffect watching isVisible and resetting focusedIndex when it becomes false. However, using onModalHide is more precise — it fires after the modal animation completes, matching the timing of the old behavior exactly. Resetting in a useEffect on isVisible would reset during the close animation, which could cause a visual flash.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Android - FAB - Menu item icons become green when reopening FAB[/-][+][Due for payment 2026-03-30] Android - FAB - Menu item icons become green when reopening FAB[/+]on Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Activity
melvin-bot commentedon Mar 18, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #83299
melvin-bot commentedon Mar 18, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 18, 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:
OSBotify commentedon Mar 18, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #83299 - "FAB popover decomposition" by @TMisiukiewicz (High confidence)
Related Issues: None
Recommendation: REVERT
This is a frontend regression introduced by the FAB refactor. The PR is relatively recent (merged March 17) and the bug affects a core UI component. Reverting is the safest path to unblock the deploy while a proper fix can be developed.
Labels: Keeping
DeployBlockerCash(App PR caused the issue);DeployBlockeris not present so no label changes needed.📋 Detailed Analysis
Evidence
PR #83299 refactored the FAB (Floating Action Button) popover from a monolithic ~800-line component into a composable architecture using context and custom hooks. The issue describes menu item icons becoming green (focused state) when reopening the FAB, which only occurs on staging (where this PR is deployed) and not on production.
The bug was first reported on version 9.3.40-0, and PR #83299 is listed in the StagingDeployCash checklist at position #32 in the chronological merge order.
Verification
The PR modifies the core FAB implementation files:
/home/runner/_work/App/App/src/pages/inbox/sidebar/FloatingActionButtonAndPopover.tsx- Main FAB component (rewritten)/home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/FABPopoverMenu.tsx- New popover menu component/home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/FABFocusableMenuItem.tsx- New focusable menu item/home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/useFABMenuItem.ts- Hook for menu item focus managementThese files directly control the FAB menu rendering and icon states reported in the bug.
Root Cause
The issue is in the focus state management when the FAB menu reopens.
In
/home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/FABPopoverMenu.tsx(lines 71-75):The
useArrowKeyFocusManagerhook (in/home/runner/_work/App/App/src/hooks/useArrowKeyFocusManager.tsline 60) initializes focus state with:The problem:
useStateonly usesinitialFocusedIndexon the first render. When the FAB closes and reopens, thefocusedIndexstate persists from the previous session because there is nouseEffectto reset it whenisActivechanges from false to true.While line 86 of FABPopoverMenu.tsx calls
setFocusedIndex(-1)when an item is pressed, this doesn't guarantee proper reset on menu close/reopen cycles, especially if the menu is dismissed without selecting an item (e.g., clicking outside).In
/home/runner/_work/App/App/src/pages/inbox/sidebar/FABPopoverContent/useFABMenuItem.ts(line 36):This causes menu items to render with focused state (green icons) based on the stale
focusedIndex, which then propagates to MenuItem icon fill colors via thefocusedprop.MelvinBot commentedon Mar 18, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Android, when opening the FAB menu, closing it (via backdrop tap or back button), and reopening it, the menu item icons become green instead of remaining their normal gray/white color.
What is the root cause of that problem?
PR #83299 ("FAB popover decomposition") refactored the FAB popover from using
PopoverMenu(which renders items from a data array) to a decomposed component structure (FABPopoverMenu+FABFocusableMenuItem). During this refactor, a criticalfocusedIndexreset mechanism was lost.Old behavior (
PopoverMenu): ThePopoverMenucomponent had ahandleModalHidecallback (PopoverMenu.tsx:488-498) that fired every time the modal was hidden. This callback calledsetFocusedIndex(getSelectedItemIndex(menuItems)), which returns-1for FAB items (since none haveisSelected: true), effectively resetting the focus state on every close.New behavior (
FABPopoverMenu): The newFABPopoverMenu.tsxhas no equivalentonModalHidehandler. ThefocusedIndexis only reset to-1insideonItemPress(line 86), which only fires when a user actively selects a menu item. When the menu is closed by tapping the backdrop or pressing back,focusedIndexretains its stale value.Here's the chain of events:
focusedIndex = -1→ icons show normal color (graytheme.icon)FocusTrapForModalor native accessibility) triggersonFocuson a menu item →setFocusedIndex(itemIndex)fires (FABFocusableMenuItem.tsx:27)focusedIndexstays at the stale value (no reset)focusedIndex→ affected item renders withfocused=true→getIconFillColor(ACTIVE, true, isPaneMenu=true)returnstheme.iconMenu(green#03D47C) instead oftheme.iconAdditionally,
FocusableMenuItemusesuseSyncFocus(line 11) which calls.focus()on the element whenisFocused=true, which can trigger furtheronFocusevents, reinforcing the stale focus state.What changes do you think we should make in order to solve the problem?
Add a
focusedIndexreset when the FAB menu becomes invisible. InFABPopoverMenu.tsx, pass anonModalHidecallback toPopoverWithMeasuredContentthat resetsfocusedIndexto-1:This mirrors the behavior of the old
PopoverMenu.handleModalHidethat was lost during the decomposition refactor.What alternative solutions did you explore? (Optional)
An alternative would be to add a
useEffectwatchingisVisibleand resettingfocusedIndexwhen it becomesfalse. However, usingonModalHideis more precise — it fires after the modal animation completes, matching the timing of the old behavior exactly. Resetting in auseEffectonisVisiblewould reset during the close animation, which could cause a visual flash.Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot to refine this analysis, or explain why you are rejecting Melvin's proposal.
13 remaining items
IuliiaHerets commentedon Mar 19, 2026
Passed in 9.3.40-8
Screenrecorder-2026-03-19-16-02-49-47.mp4
cristipaval commentedon Mar 19, 2026
Thanks! Closing
[-]Android - FAB - Menu item icons become green when reopening FAB[/-][+][Due for payment 2026-03-30] Android - FAB - Menu item icons become green when reopening FAB[/+]melvin-bot commentedon Mar 23, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-03-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 23, 2026
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon Mar 23, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)