Skip to content

[CP Staging] Revert "Make Copilot switching discoverable with a dedicated Switch button on the Accounts page"#95748

Merged
inimaga merged 1 commit into
mainfrom
revert-93393-wildan/92253-copilot-switch-button
Jul 9, 2026
Merged

[CP Staging] Revert "Make Copilot switching discoverable with a dedicated Switch button on the Accounts page"#95748
inimaga merged 1 commit into
mainfrom
revert-93393-wildan/92253-copilot-switch-button

Conversation

@inimaga

@inimaga inimaga commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Reverts #93393

Fixes a multitude of deploy blockers including:

Original issue: #92253

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@inimaga inimaga requested review from a team as code owners July 9, 2026 18:58
@melvin-bot melvin-bot Bot requested review from flaviadefaria and stitesExpensify and removed request for a team July 9, 2026 18:58
@melvin-bot

melvin-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

@stitesExpensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot removed the request for review from a team July 9, 2026 18:58
@OSBotify

OSBotify commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 3d2611ddadf..d2d28c0419d 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -10184,7 +10184,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`,
     productTrainingTooltip: {
         conciergeLHNGBR: '<tooltip>¡Comienza <strong>aquí</strong>!</tooltip>',
         saveSearchTooltip: '<tooltip><strong>Renombra tus búsquedas guardadas</strong> aquí</tooltip>',
-        accountSwitcher: '<tooltip>Accede a tus <strong>cuentas copiloto</strong> aquí</tooltip>',
+        accountSwitcher: '<tooltip>Accede a tus <strong>cuentas Copilot</strong> aquí</tooltip>',
         outstandingFilter: '<tooltip>Filtra los gastos\nque <strong>necesitan aprobación</strong></tooltip>',
         scanTestDriveTooltip: '<tooltip>¡Envía este recibo para\n<strong>completar la prueba</strong>!</tooltip>',
         gpsTooltip: '<tooltip>¡Seguimiento por GPS en curso! Cuando termines, detén el seguimiento a continuación.</tooltip>',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index c72fe038527..913cc70d278 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -9989,7 +9989,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
     productTrainingTooltip: {
         conciergeLHNGBR: '<tooltip>Begin <strong>hier!</strong></tooltip>',
         saveSearchTooltip: '<tooltip><strong>Hernoem hier je opgeslagen zoekopdrachten</strong>!</tooltip>',
-        accountSwitcher: '<tooltip>Krijg hier toegang tot je <strong>Copilot-accounts</strong></tooltip>',
+        accountSwitcher: '<tooltip>Je <strong>Copilot-accounts</strong> vind je hier</tooltip>',
         outstandingFilter: '<tooltip>Filter voor uitgaven\ndie <strong>goedkeuring nodig hebben</strong></tooltip>',
         scanTestDriveTooltip: '<tooltip>Stuur deze bon om\n<strong>de proefrit te voltooien!</strong></tooltip>',
         gpsTooltip: '<tooltip>GPS-tracking bezig! Als je klaar bent, stop dan hieronder met bijhouden.</tooltip>',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 6bdb3473d4d..bf2839c754e 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -9963,7 +9963,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
     productTrainingTooltip: {
         conciergeLHNGBR: '<tooltip>Rozpocznij <strong>tutaj!</strong></tooltip>',
         saveSearchTooltip: '<tooltip><strong>Zmień nazwę zapisanych wyszukiwań</strong> tutaj!</tooltip>',
-        accountSwitcher: '<tooltip>Uzyskaj tutaj dostęp do <strong>kont Copilot</strong></tooltip>',
+        accountSwitcher: '<tooltip>Uzyskaj dostęp do swoich <strong>kont Copilot</strong> tutaj</tooltip>',
         outstandingFilter: '<tooltip>Filtruj wydatki,\nktóre <strong>wymagają zatwierdzenia</strong></tooltip>',
         scanTestDriveTooltip: '<tooltip>Wyślij ten paragon, aby\n<strong>zakończyć jazdę próbną!</strong></tooltip>',
         gpsTooltip: '<tooltip>Śledzenie GPS w toku! Gdy skończysz, zatrzymaj śledzenie poniżej.</tooltip>',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 367a9053251..da72260dd96 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -9978,7 +9978,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
     productTrainingTooltip: {
         conciergeLHNGBR: '<tooltip>Comece <strong>aqui!</strong></tooltip>',
         saveSearchTooltip: '<tooltip><strong>Renomeie suas buscas salvas</strong> aqui!</tooltip>',
-        accountSwitcher: '<tooltip>Acesse suas <strong>contas Copilot</strong> aqui</tooltip>',
+        accountSwitcher: '<tooltip>Acesse suas <strong>contas do Copilot</strong> aqui</tooltip>',
         outstandingFilter: '<tooltip>Filtrar despesas\nque <strong>precisam de aprovação</strong></tooltip>',
         scanTestDriveTooltip: '<tooltip>Envie este recibo para\n<strong>concluir o test drive!</strong></tooltip>',
         gpsTooltip: '<tooltip>Rastreamento por GPS em andamento! Quando terminar, pare o rastreamento abaixo.</tooltip>',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 971d7aaa182..3543891cca9 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -9682,7 +9682,7 @@ ${reportName}`,
     productTrainingTooltip: {
         conciergeLHNGBR: '<tooltip>从<strong>这里</strong>开始!</tooltip>',
         saveSearchTooltip: '<tooltip>在这里<strong>重命名已保存的搜索</strong>!</tooltip>',
-        accountSwitcher: '<tooltip>在此访问你的<strong>Copilot 账户</strong></tooltip>',
+        accountSwitcher: '<tooltip>在这里访问你的<strong>Copilot 账户</strong></tooltip>',
         outstandingFilter: '<tooltip>筛选<strong>待审批</strong>的报销</tooltip>',
         scanTestDriveTooltip: '<tooltip>发送此收据以\n<strong>完成试用体验!</strong></tooltip>',
         gpsTooltip: '<tooltip>正在进行 GPS 跟踪!完成后,请在下方停止跟踪。</tooltip>',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/index.ts 94.81% <ø> (ø)
src/pages/settings/InitialSettingsPage.tsx 75.47% <50.00%> (-0.66%) ⬇️
src/components/AccountSwitcher.tsx 0.00% <0.00%> (-78.89%) ⬇️
... and 18 files with indirect coverage changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 658bde1c7e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 128 to 132
shiftVertical: variables.accountSwitcherTooltipShiftVertical,
shiftHorizontal: variables.accountSwitcherTooltipShiftHorizontal,
wrapperStyle: styles.productTrainingTooltipWrapper,
onTooltipPress: onPressSwitcher,
// The switcher lives in the settings sidebar, which isn't the navigation-focused screen on wide layouts.
// Without this the educational tooltip is suppressed (it relies on the screen being focused), so keep it shown until dismissed.
shouldHideOnNavigate: false,
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the Copilot training tooltip visible in the sidebar

When the Accounts page is shown in the wide settings split with a right-hand settings pane focused, BaseEducationalTooltip defaults shouldHideOnNavigate to true and suppresses itself whenever useIsFocused() is false. This switcher is gated with useIsSidebarRouteActive instead, so removing the shouldHideOnNavigate={false} override means the Copilot product-training tooltip can register but never become visible for desktop users with delegators. Please keep that override on the educational tooltip props.

Useful? React with 👍 / 👎.

@inimaga inimaga merged commit 8119a52 into main Jul 9, 2026
49 checks passed
@inimaga inimaga deleted the revert-93393-wildan/92253-copilot-switch-button branch July 9, 2026 19:22
@mountiny mountiny changed the title Revert "Make Copilot switching discoverable with a dedicated Switch button on the Accounts page" [CP Staging] Revert "Make Copilot switching discoverable with a dedicated Switch button on the Accounts page" Jul 9, 2026
OSBotify pushed a commit that referenced this pull request Jul 9, 2026
…pilot-switch-button

Revert "Make Copilot switching discoverable with a dedicated Switch button on the Accounts page"

(cherry picked from commit 8119a52)

(cherry-picked to staging by Julesssss)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Jul 9, 2026
@OSBotify

OSBotify commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.4.32-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Help site review: no changes required.

I reviewed the changes in this PR against the help site articles under docs/articles, and no updates are needed.

What this PR does: It reverts Expensify/App#93393, removing the dedicated Switch button that had been added to the account switcher at the top of the Account page and restoring the original avatar + name + caret UI (you tap the account owner's name to open the account switcher). It also restores the status picker button and reverts the accountSwitcher product-training tooltip copy across all locales.

Why no docs change is needed:

  • The reverted top-of-page Switch button was a purely UI/discoverability change and was never documented on the help site (the original PR Make Copilot switching discoverable with a dedicated Switch button on the Accounts page #93393 did not touch docs/articles, and neither does this revert).
  • The relevant article, Act as a Copilot, already describes the flow that this revert restores:
    • Switching into a Copilot account is documented via Account > Copilot > Switch (the button inside the Copilot: Delegated Access settings section — unrelated to and unaffected by this revert).
    • Exiting a Copilot account is documented as: "At the top of the page, select the account owner's name to open the account switcher" — which matches the avatar/name behavior this PR restores.
  • The only copy changes are productTrainingTooltip.accountSwitcher in the language files. Product-training tooltips are in-app educational copy and are not surfaced in any help site article.

Since the help site already reflects the post-revert behavior, I did not create a docs PR.


@inimaga, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

(Note: no help site PR was created because no documentation changes are required — see above.)

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.4.32-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.4.33-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

@MelvinBot

Copy link
Copy Markdown
Contributor

Help site review — no changes required ✅

I reviewed the changes in this PR against the help site articles under docs/articles and no documentation updates are needed. No draft PR was created.

Why: This PR reverts #93393 ("Make Copilot switching discoverable with a dedicated Switch button on the Accounts page"). The revert removes that dedicated button and restores the previous behavior — the account switcher is opened by pressing the account name/avatar area (which shows a caret), and the status picker button is re-added next to it. The diff is limited to src/ code and src/languages/* tooltip copy; it touches no files under docs/articles.

The only customer-facing help article that describes this UI is Act-as-a-Copilot.md, and it already matches the restored (post-revert) behavior:

  • "How to exit a Copilot account and return to your own account" (L56-L60) tells members to "select the account owner's name to open the account switcher" — i.e. pressing the name, exactly the behavior this PR restores. It never referenced the reverted "Switch" button.
  • "How to switch to a Copilot account" (L34-L38) uses the separate Account > Copilot delegated-access settings page, which this PR does not change.

The tooltip/product-training copy changes (e.g. productTrainingTooltip.accountSwitcher) are in-app onboarding strings and are not documented on the help site, so they require no article changes either.


@inimaga, since no help site changes are required, I did not open a draft docs PR. If you believe the account-switcher flow should be documented differently, let me know and I can draft one.

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

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants