Skip to content

feat(accounts): remove a specific account from the switcher#559

Open
shukiv wants to merge 1 commit into
bulwarkmail:mainfrom
shukiv:feat/account-remove-button
Open

feat(accounts): remove a specific account from the switcher#559
shukiv wants to merge 1 commit into
bulwarkmail:mainfrom
shukiv:feat/account-remove-button

Conversation

@shukiv

@shukiv shukiv commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The account switcher only offered sign out of active and sign out of all — there was no way to drop a single non-active account. That leaves you stuck if an account lands in an error state you can't switch into to sign out of.

This adds a hover × on non-active, non-default rows and a removeAccount(id) auth-store action that:

  • stops the account's refresh timer and disconnects/evicts its client,
  • removes it from the account registry,
  • clears its per-slot session/token cookies.

Removing the active account defers to logout() (which handles switching away / redirecting). Locale keys (sidebar.remove_account, sidebar.remove_account_confirm) added to all 20 locales — English fallback for the untranslated ones.

Depends on #517 (account-switcher redesign). Until #517 merges, this PR's diff includes those commits. Rebase onto main once #517 lands.

Test plan

  • Hover a non-active account → × appears; default and active rows show none.
  • Click × → confirm → account leaves the switcher; active account unchanged.
  • Re-add via + Add account works afterward (slot cookies were cleared).
  • Removing the only other account collapses the switcher correctly.

The switcher only offered 'sign out of active' and 'sign out of all' — no
way to drop a single non-active account (e.g. one stuck in an error state you
can't switch into to sign out). Add a hover × on non-active, non-default rows
and a removeAccount(id) auth action that tears down the client, drops it from
the registry, and clears its per-slot session/token cookies.

Stacks on the switcher redesign in bulwarkmail#517.
@shukiv
shukiv force-pushed the feat/account-remove-button branch from ae1c015 to 5432e88 Compare July 18, 2026 04:45
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.

1 participant