Skip to content

feat: add a bulk sign-out-all-other-sessions action to security settings - #1146

Open
VeronicDev wants to merge 1 commit into
Stellopay:mainfrom
VeronicDev:feat/security-tab-revoke-all-sessions
Open

feat: add a bulk sign-out-all-other-sessions action to security settings#1146
VeronicDev wants to merge 1 commit into
Stellopay:mainfrom
VeronicDev:feat/security-tab-revoke-all-sessions

Conversation

@VeronicDev

@VeronicDev VeronicDev commented Aug 4, 2026

Copy link
Copy Markdown

Closes #743.

What was Implemented

Adds a distinct "Sign out all other sessions" bulk revoke action to the Active sessions card in security-tab.tsx, alongside per-session sign-out controls. The current session is always excluded from both actions, and the bulk confirmation dialog states this explicitly.

Changes

  • Stateful sessions — converted the static sessions array into component state with an isCurrent flag and stable ids, so revokes actually update the list and the count badge.
  • Per-session revoke — each non-current session gets its own guarded "Sign out" control. The current session shows a "This device" badge and no revoke control (it can't be signed out remotely).
  • Bulk action — "Sign out all other sessions" is gated by the existing DestructiveActionDialog (rendered through components/ui/dialog.tsx, focus-trapped, requires typing LOGOUT). It excludes the current session and says so in the copy ("Your current session on this device stays signed in"). When no other sessions remain, it's replaced by a role="status" empty-state message.
  • Accessibility (WCAG 2.1 AA) — added an optional triggerAriaLabel to DestructiveActionDialog so the repeated "Sign out" buttons get unique accessible names (e.g. "Sign out iPhone 15 Pro"). The sessions list is a labelled <ul>. Backward-compatible prop.
  • Bug fix — removed a pre-existing duplicate DEMO_SECURITY import that broke the build for this component.
  • Docs — documented the two revoke paths and their accessibility behavior in design/settings-ia.md.

Responsive

Session rows and the bulk action stack vertically on small screens (flex-col) and lay out horizontally from sm: up, matching the Connected apps card pattern. Uses existing design tokens (zinc/red/emerald ring + bg utilities, rounded-2xl), light + dark mode.

Tests

Added an 11-test suite to security-tab.test.tsx covering: the current-session badge, distinct per-session controls, the exclusion copy in the bulk dialog, single-session revoke, bulk revoke, the empty state, and the success announcement.

  • security-tab.test.tsx — 100 passed
  • destructive-action-dialog.test.tsx — 7 passed
  • typecheck + lint clean on the changed files

Note

Several unrelated test files in app/settings/preferences/components/ (wallets-section, account-sectionDEMO_PROFILE is not defined, notifications-section.test.tsx — malformed import, settings-search.test.ts — JSX in a .ts file) fail on main independently of this change and are out of scope here.

Adds a distinct "Sign out all other sessions" bulk revoke action to the
Active sessions card, alongside per-session sign-out controls. The current
session is always excluded from both, and the bulk confirmation dialog states
this explicitly.

- Convert the static sessions array to stateful data with an `isCurrent` flag
- Per-session revoke via DestructiveActionDialog (distinct accessible name per
  device); the current session shows a "This device" badge and no control
- Bulk action guarded by DestructiveActionDialog; excludes current session and
  says so in the copy; replaced by a role="status" empty state when no other
  sessions remain
- Add optional triggerAriaLabel to DestructiveActionDialog so repeated
  "Sign out" buttons get unique accessible names (WCAG 2.1 AA)
- Fix pre-existing duplicate `DEMO_SECURITY` import that broke the build
- Add tests for per-session and bulk revoke, exclusion copy, and empty state
- Document the two revoke paths in design/settings-ia.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@VeronicDev is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel.

A member of the Team first needs to authorize it.

@VeronicDev

Copy link
Copy Markdown
Author

You unassigned me from an issue I already worked on, Why??? @Daggahh @darius-daniel @Hahfyeex

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.

Add a 'sign out all other sessions' bulk revoke action to security-tab.tsx

1 participant