Skip to content

long press account switch#29454

Merged
zoom-ua merged 4 commits into
masterfrom
joshblum/account-switch
Jul 21, 2026
Merged

long press account switch#29454
zoom-ua merged 4 commits into
masterfrom
joshblum/account-switch

Conversation

@zoom-ua

@zoom-ua zoom-ua commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a “long press to switch accounts” affordance to the native navigation header avatar, including remembering/restoring the previously-selected tab after an account switch on mobile.

Changes:

  • Introduces shared account-switch utilities (MRU selection + pending tab remember/consume/clear) with unit tests.
  • Adds a native header avatar component that supports press (open switcher) and long-press (switch to most-recent account), and wires it into the native stack header options.
  • Adjusts People and Files headers to use the new shared header avatar behavior/components.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
shared/router-v2/router.tsx Adds native header-left avatar on root screens and consumes/clears pending post-switch tab selection on navigation ready.
shared/router-v2/account-switcher/index.tsx Remembers the current tab before initiating a mobile account switch via the account switcher UI.
shared/router-v2/account-switch.tsx New helpers for MRU account selection and storing/consuming a pending tab to restore after account switch.
shared/router-v2/account-switch.test.tsx Unit tests for MRU selection and pending-tab behavior.
shared/router-v2/account-switch-header-avatar.native.tsx New native header avatar with press-to-open and long-press-to-switch-to-MRU behavior (with haptics + a11y strings).
shared/router-v2/account-switch-header-avatar.desktop.tsx Desktop stub for the header avatar module.
shared/people/routes.tsx Removes per-route header avatar now handled at the router header level.
shared/fs/nav-header/mobile-header.tsx Adds the header avatar into the custom Android Files header layout and keeps the title centered via spacing.

@zoom-ua
zoom-ua merged commit d254aaa into master Jul 21, 2026
2 checks passed
@zoom-ua
zoom-ua deleted the joshblum/account-switch branch July 21, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants