Skip to content

feat: merge sign-out into the account menu with a confirm dialog - #38

Merged
debba merged 1 commit into
mainfrom
feat/account-menu-signout-confirm
Sep 3, 2026
Merged

feat: merge sign-out into the account menu with a confirm dialog#38
debba merged 1 commit into
mainfrom
feat/account-menu-signout-confirm

Conversation

@debba

@debba debba commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

The top bar showed the signed-in login twice: in the account switcher and on the sign-out button at the far right. This PR unifies them into one control at the right end of the bar.

  • Account menu (src/components/AccountSwitcher.tsx) moves to the last position in topbar-actions and now contains: account list with switch/remove, "Add account", and "Sign out". When the auth mode cannot sign out from the UI (gh-cli / token), the menu shows the "Authenticated externally" note instead.
  • Confirm dialog (src/components/common/ConfirmDialog.tsx): themed replacement for window.confirm on the shared modal chrome. Compact width, danger variant for destructive actions, Escape and backdrop cancel, focus lands on Cancel. Used for sign-out and for removing an account.
  • New i18n keys in all six languages: common.cancel, common.remove, accounts.kind, accounts.removeTitle, auth.signOutTitle, auth.signOutMessage.
  • CSS: .confirm-modal, .confirm-foot, .btn.danger, .modal-icon.danger, account menu footer/sign-out styles. The dead .auth-btn .label rule becomes .account-switcher-btn .label.

Verification

  • npm run typecheck, npm test (24 files, 123 tests), npm run build all pass.
  • Checked in a headless browser against the built app: one login label in the bar, menu opens with accounts + add + sign-out, dialog closes on Escape and on Cancel without signing out, dark and light themes both render correctly.

🤖 Generated with Claude Code

The top bar showed the signed-in login twice: once in the account
switcher and again on the sign-out button at the far right. The account
switcher now sits at the right end and owns the whole account surface:
switching, adding and removing accounts, and signing out. When the auth
mode cannot sign out from the UI the menu shows the external-auth note
instead.

Signing out and removing an account now ask for confirmation through a
new ConfirmDialog component built on the shared modal chrome (themed for
dark and light, Escape/backdrop to cancel, focus on Cancel), replacing
window.confirm.
@debba
debba merged commit e8db61d into main Sep 3, 2026
@debba
debba deleted the feat/account-menu-signout-confirm branch September 3, 2026 14:22
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