Skip to content

[Due for payment 2026-10-01] Android & iOS - Copilot - Copilot tooltip is out of view #101151

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.4.78-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: #100817
Email or phone of affected tester (no customers): sdiuhbdsiuhusih@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 15 Pro Max / iOS 26.6.1
App Component: User Settings

Action Performed:

  1. Launch Expensify app.
  2. Go to Account > Agents.
  3. Create an agent.
  4. Return to Account page.

Expected Result:

Copilot tooltip will not be out of view.

Actual Result:

Copilot tooltip is out of view.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7259895_1789435933175.5.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7259895

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. applause-bot commented on Sep 15, 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/cdbb694e49e464f72ee8a06db02603792d463ff355e9dcc445d9948001cdfd03

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

    @melvin-bot

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

  4. github-actions commented on Sep 15, 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 Sep 15, 2026

    @melvin-bot

    @stitesExpensify @grgia @huult you have been assigned to this deploy blocker because you reviewed the offending PR: #100817

  6. melvin-bot commented on Sep 15, 2026

    @melvin-bot

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

  7. MelvinBot commented on Sep 15, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #100817 - "[Design Polish] Use a bigger centered avatar and h1 name on the Account page on mobile" by @MelvinBot (approved by @huult, @grgia, @stitesExpensify) (High confidence)
    Related Issues: None found

    Recommendation: ROLL FORWARD

    The Copilot (account switcher) educational tooltip is right-aligned to the "Switch" button, and #100817 moved that button from the right edge of the header row to the horizontal center on native narrow layouts, so the tooltip now extends past the left edge of the screen — and on native the off-screen clamp is disabled by default. The fix is a 2-3 line change in AccountSwitcher.tsx (center the tooltip anchor in the stacked layout and/or opt into computeHorizontalShiftForNative), which is far smaller and safer than reverting a PR that also changed the skeleton view, avatar sizing and styles; if a fix isn't up before the deploy window closes, revert #100817.

    Assigned: @huult, @grgia, @stitesExpensify (approving reviewers of #100817) — already assigned by Melvin, no change needed
    Labels: No changes. DeployBlockerCash kept (App-side fix required); DeployBlocker was not present, so nothing was removed.

    📋 Detailed Analysis

    Evidence

    Verification

    Affected files (all on e9e328b):

    Confirmed #100817 modifies src/components/AccountSwitcher.tsx (and src/pages/settings/InitialSettingsPage.tsx, which mirrors the same shouldStackHeader condition for the skeleton). It does not modify the tooltip utils — those were already native-permissive; the PR simply moved the anchor into the position where that pre-existing gap becomes visible.

    Root Cause

    For a right-aligned tooltip the wrapper's left edge is computed as:

    rootWrapperLeft = xOffset + manualShiftHorizontal + (tooltipTargetWidth - tooltipWidth)
    

    i.e. the tooltip's right edge is pinned to the anchor's right edge and it grows leftwards.

    Why native only: computeHorizontalShift is what normally pulls a tooltip back inside the gutters, but the native implementation returns 0 immediately unless the caller passes computeHorizontalShiftForNative (index.native.ts#L19-L22). AccountSwitcher does not pass it. On web/mWeb the same overflow is silently corrected by the web implementation, which always clamps — which is exactly why the bug reproduces on Android/iOS App only.

    Suggested fix (in AccountSwitcher.tsx tooltip props): when shouldStackHeader is true, use ANCHOR_ORIGIN_HORIZONTAL.CENTER with shiftHorizontal: 0 so the tooltip is centered over the now-centered button, and pass computeHorizontalShiftForNative as a safety net so native clamps anything that still overflows.

    💡 Suggested AI code review rule

    This bug looks like a recurring, mechanically detectable pattern, so it may be worth a coding-standards rule so the AI reviewer catches the next one. Proposed for Expensify/App:

    • Rule: UI-4 Opt into computeHorizontalShiftForNative for edge-aligned tooltips
    • Condition: When a Tooltip/EducationalTooltip sets anchorAlignment.horizontal to LEFT or RIGHT, it must also pass computeHorizontalShiftForNative (or center the anchor), otherwise the tooltip can render off-screen on iOS/Android because the native computeHorizontalShift returns 0 by default and never clamps to the viewport.
    • Why: Edge-aligned tooltips grow away from the anchor; if the anchor is not near that screen edge, the tooltip overflows the viewport. Web clamps automatically, native does not, so the bug ships past web-only testing — as it did in [Design Polish] Use a bigger centered avatar and h1 name on the Account page on mobile #100817 / this issue.
    • Search pattern: rg -n "ANCHOR_ORIGIN_HORIZONTAL\.(LEFT|RIGHT)" src --glob '*.tsx' and, for each hit inside a Tooltip/EducationalTooltip prop object, check the same element for computeHorizontalShiftForNative. Other current call sites with this shape: src/components/ThreeDotsMenu/index.tsx, src/components/MoneyRequestConfirmationList/ConfirmationFooterContent.tsx.
    • Offending code (❌): AccountSwitcher.tsx#L161-L184 combined with the now-centered anchor at AccountSwitcher.tsx#L339-L354
    • Fix (✅): center the anchor alignment in the stacked layout and pass computeHorizontalShiftForNative (see Suggested fix above); the clamp itself lives in computeHorizontalShift/index.native.ts#L19-L22

    The full rule file, with the ❌/✅ code inline in App's coding-standards format, would go in Expensify/App itself (.claude/skills/app-coding-standards/rules/). If it's worth adding, a maintainer can open it there as a draft PR.

  8. shawnborton commented on Sep 15, 2026

    @shawnborton
    Contributor

    Let's just use a centered tooltip style here. @MelvinBot can you implement the fix?

  9. 9 remaining items

  10. changed the title [-]Android & iOS - Copilot - Copilot tooltip is out of view[/-] [+][Due for payment 2026-10-01] Android & iOS - Copilot - Copilot tooltip is out of view[/+] on Sep 24, 2026
  11. melvin-bot commented on Sep 24, 2026

    @melvin-bot

    @huult

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.92-8 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-10-01. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  12. huult commented on Sep 25, 2026

    @huult
    Contributor

    No payment is needed

  13. melvin-bot commented on Sep 28, 2026

    @melvin-bot

    @huult Whoops! This issue is 2 days overdue. Let's get this updated quick!

  14. huult commented on Sep 29, 2026

    @huult
    Contributor

    Not overdue

  15. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Sep 29, 2026
  16. melvin-bot commented on Sep 30, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  17. melvin-bot commented on Sep 30, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  18. huult commented on Oct 1, 2026

    @huult
    Contributor

    @grgia we can close this ticket

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething 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