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
Copilot menu is misaligned under Account switch and has excessive padding in the top group label #95756
Version Number: 9.4.32-2 Reproducible in staging?: Y Reproducible in production?: N (New feature) If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@shawnborton Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
Navigate to Account.
Click the Copilot switch/button to open the menu.
Observe the menu position relative to the switch.
Observe the spacing below the top group label.
Expected Result:
The Copilot menu should open directly below the switch button, aligned consistently with other menus.
The top group label should have appropriate bottom padding, consistent with the rest of the menu.
Actual Result:
The Copilot menu does not launch directly below the switch button.
The top group label has excessive bottom padding, creating unnecessary whitespace.
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
👋 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.
Please re-state the problem that we are trying to solve in this issue.
The account/Copilot switcher menu on the Account (Settings) page (1) doesn't open directly below the switch button, and (2) has too much whitespace below the "Switch account" header label.
1. Misalignment: the popover is anchored to a hardcoded screen coordinate, not to the button. AccountSwitcher.tsx:305 passes anchorPosition={CONST.POPOVER_ACCOUNT_SWITCHER_POSITION}, which is a fixed {horizontal: 12 + navigationTabBarSize, vertical: 72} → {84, 72} (CONST/index.ts:265, navigationTabBarSize = 72). PopoverMenu forwards this fixed point to PopoverWithMeasuredContent, so the menu lands at {84, 72} regardless of where the switch actually sits. Because the switch is offset by the header's pv4/ph5 padding, vertical: 72 no longer lines up with the bottom of the button.
2. Excessive header padding:PopoverMenu renders the header label with styles.pv3 (12px top and bottom) at PopoverMenu/index.tsx:541. AccountSwitcher overrides only the top via headerStyles={styles.pt0} (AccountSwitcher.tsx:313), leaving a full 12px below the "Switch account" label → the extra whitespace.
What changes do you think we should make in order to solve the problem?
Padding: reduce the header's bottom padding, e.g. headerStyles={[styles.pt0, styles.pb2]} (8px) or styles.pb0, tuned to match the spacing of the menu rows below it.
Alignment: make the menu open directly under the switch instead of a fixed point — either tune POPOVER_ACCOUNT_SWITCHER_POSITION to account for the header's pv4/ph5 offset, or anchor to the measured buttonRef position so it stays correct regardless of surrounding padding. The exact offset values are a design decision — shawnborton should confirm the intended spacing.
What alternative solutions did you explore?
Adjusting the wrapping header container padding in InitialSettingsPage instead of headerStyles — rejected because the excess padding is inside the popover header, not the page header.
Confidence & verification notes
Padding cause is high confidence — directly traceable in code (pv3 = 12px, pt0 removes only top).
Alignment cause is medium confidence — the hardcoded-anchor mechanism is clear, but I did not run the app to confirm the exact pixel offset. Worth a quick browser check after adjusting the constant.
Not a duplicate of Expensify/App#92253 (Copilot discoverability, unrelated).
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/95756) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Classification: Frontend bug Causing PR: #93393 - "Make Copilot switching discoverable with a dedicated Switch button on the Accounts page" by @wildan-m (High confidence) Related Issues: #95693, #95717 (also caused by the same PR, per the revert)
Recommendation: REVERT
The reported symptoms (Copilot "Switch" button, misaligned menu, and top-group-label padding) come entirely from PR #93393, which introduced the dedicated Switch button. A revert (#95748) has already been merged and cherry-picked to staging, so this blocker should resolve on the next staging build — please re-verify and check it off once the build lands.
Assigned: @wildan-m (PR author), @eh2077 and @inimaga (approving reviewers) from the causing PR #93393 Labels: No label changes. Kept DeployBlockerCash (this is a frontend/App bug blocking the App deploy). There was no DeployBlocker label to remove.
Affected files/areas: the "Copilot switch" and its menu live in src/components/AccountSwitcher.tsx; the menu positioning constant lives in src/CONST/index.ts (POPOVER_ACCOUNT_SWITCHER_POSITION); the surrounding Account page is src/pages/settings/InitialSettingsPage.tsx.
The diff replaces the old full-row PressableWithFeedback with a small Button (text={translate('delegate.switch')}, iconRight={CaretUpDown}) and keeps the PopoverMenu anchored to that button via buttonRef using the fixed anchorPosition={CONST.POPOVER_ACCOUNT_SWITCHER_POSITION}.
Root Cause
Misaligned menu: The PopoverMenu still uses the fixed offset POPOVER_ACCOUNT_SWITCHER_POSITION ({ horizontal: 12 + navigationTabBarSize, vertical: 72 }), which was tuned for the previous full-width pressable row. With the new, small right-aligned "Switch" button as the anchor, this fixed offset no longer lands the menu directly beneath the button.
Excessive bottom padding on the top group label: The popover header text is rendered with styles.pv3 (vertical padding, top and bottom) in src/components/PopoverMenu/index.tsxrenderHeaderText(). AccountSwitcher passes headerStyles={styles.pt0}, which zeroes only the top padding and leaves the pv3 bottom padding, producing the excess whitespace under the top group label.
Both are pure client-side (App repo) layout issues introduced by #93393, so this is a frontend bug and reverting #93393 is the correct fix.
Activity
melvin-bot commentedon Jul 9, 2026
Triggered auto assignment to @Valforte (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jul 9, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 9, 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 Jul 9, 2026
Proposal (🤖 preliminary — medium confidence)
Please re-state the problem that we are trying to solve in this issue.
The account/Copilot switcher menu on the Account (Settings) page (1) doesn't open directly below the switch button, and (2) has too much whitespace below the "Switch account" header label.
What is the root cause of that problem?
Both come from
AccountSwitcher.tsx, which renders inside the Settings header (InitialSettingsPage.tsx:580, wrapped instyles.pv4= 16px vertical padding).1. Misalignment: the popover is anchored to a hardcoded screen coordinate, not to the button.
AccountSwitcher.tsx:305passesanchorPosition={CONST.POPOVER_ACCOUNT_SWITCHER_POSITION}, which is a fixed{horizontal: 12 + navigationTabBarSize, vertical: 72}→{84, 72}(CONST/index.ts:265,navigationTabBarSize = 72).PopoverMenuforwards this fixed point toPopoverWithMeasuredContent, so the menu lands at{84, 72}regardless of where the switch actually sits. Because the switch is offset by the header'spv4/ph5padding,vertical: 72no longer lines up with the bottom of the button.2. Excessive header padding:
PopoverMenurenders the header label withstyles.pv3(12px top and bottom) atPopoverMenu/index.tsx:541.AccountSwitcheroverrides only the top viaheaderStyles={styles.pt0}(AccountSwitcher.tsx:313), leaving a full 12px below the "Switch account" label → the extra whitespace.What changes do you think we should make in order to solve the problem?
headerStyles={[styles.pt0, styles.pb2]}(8px) orstyles.pb0, tuned to match the spacing of the menu rows below it.POPOVER_ACCOUNT_SWITCHER_POSITIONto account for the header'spv4/ph5offset, or anchor to the measuredbuttonRefposition so it stays correct regardless of surrounding padding. The exact offset values are a design decision —shawnbortonshould confirm the intended spacing.What alternative solutions did you explore?
Adjusting the wrapping header container padding in
InitialSettingsPageinstead ofheaderStyles— rejected because the excess padding is inside the popover header, not the page header.Confidence & verification notes
pv3= 12px,pt0removes only top).Expensify/App#92253(Copilot discoverability, unrelated).Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/95756)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
OSBotify commentedon Jul 9, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #93393 - "Make Copilot switching discoverable with a dedicated Switch button on the Accounts page" by @wildan-m (High confidence)
Related Issues: #95693, #95717 (also caused by the same PR, per the revert)
Recommendation: REVERT
The reported symptoms (Copilot "Switch" button, misaligned menu, and top-group-label padding) come entirely from PR #93393, which introduced the dedicated Switch button. A revert (#95748) has already been merged and cherry-picked to staging, so this blocker should resolve on the next staging build — please re-verify and check it off once the build lands.
Assigned: @wildan-m (PR author), @eh2077 and @inimaga (approving reviewers) from the causing PR #93393
Labels: No label changes. Kept
DeployBlockerCash(this is a frontend/App bug blocking the App deploy). There was noDeployBlockerlabel to remove.📋 Detailed Analysis
Evidence
StagingDeployCashchecklist (Deploy Checklist: New Expensify 2026-07-09 #95677).Verification
src/components/AccountSwitcher.tsx; the menu positioning constant lives insrc/CONST/index.ts(POPOVER_ACCOUNT_SWITCHER_POSITION); the surrounding Account page issrc/pages/settings/InitialSettingsPage.tsx.src/components/AccountSwitcher.tsx,src/CONST/index.ts, andsrc/pages/settings/InitialSettingsPage.tsx(plus language files and a newtests/ui/AccountSwitcherTest.tsx).PressableWithFeedbackwith a smallButton(text={translate('delegate.switch')},iconRight={CaretUpDown}) and keeps thePopoverMenuanchored to that button viabuttonRefusing the fixedanchorPosition={CONST.POPOVER_ACCOUNT_SWITCHER_POSITION}.Root Cause
PopoverMenustill uses the fixed offsetPOPOVER_ACCOUNT_SWITCHER_POSITION({ horizontal: 12 + navigationTabBarSize, vertical: 72 }), which was tuned for the previous full-width pressable row. With the new, small right-aligned "Switch" button as the anchor, this fixed offset no longer lands the menu directly beneath the button.styles.pv3(vertical padding, top and bottom) insrc/components/PopoverMenu/index.tsxrenderHeaderText().AccountSwitcherpassesheaderStyles={styles.pt0}, which zeroes only the top padding and leaves thepv3bottom padding, producing the excess whitespace under the top group label.Both are pure client-side (App repo) layout issues introduced by #93393, so this is a frontend bug and reverting #93393 is the correct fix.
inimaga commentedon Jul 9, 2026
Should be fixed once this revert makes it to staging: #95748
Valforte commentedon Jul 9, 2026
Thanks @inimaga
inimaga commentedon Jul 10, 2026
Retest requested here.
IuliiaHerets commentedon Jul 10, 2026
Issue is still reproducible when login with Copilot's accounts (not only Agent), Windows 11 / Chrome in v9.4.32-3
bandicam.2026-07-10.14-20-52-967.mp4
IuliiaHerets commentedon Jul 10, 2026
Not reproducible after clearing cookies
bandicam.2026-07-10.15-03-31-256.mp4
inimaga commentedon Jul 10, 2026
Thanks for confirming!
Open the account switcher menu directly below the Switch button