feat: add a bulk sign-out-all-other-sessions action to security settings - #1146
Open
VeronicDev wants to merge 1 commit into
Open
feat: add a bulk sign-out-all-other-sessions action to security settings#1146VeronicDev wants to merge 1 commit into
VeronicDev wants to merge 1 commit into
Conversation
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>
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. |
Author
|
You unassigned me from an issue I already worked on, Why??? @Daggahh @darius-daniel @Hahfyeex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
sessionsarray into component state with anisCurrentflag and stable ids, so revokes actually update the list and the count badge.DestructiveActionDialog(rendered throughcomponents/ui/dialog.tsx, focus-trapped, requires typingLOGOUT). 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 arole="status"empty-state message.triggerAriaLabeltoDestructiveActionDialogso 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.DEMO_SECURITYimport that broke the build for this component.design/settings-ia.md.Responsive
Session rows and the bulk action stack vertically on small screens (
flex-col) and lay out horizontally fromsm: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.tsxcovering: 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 passeddestructive-action-dialog.test.tsx— 7 passedNote
Several unrelated test files in
app/settings/preferences/components/(wallets-section,account-section—DEMO_PROFILE is not defined,notifications-section.test.tsx— malformed import,settings-search.test.ts— JSX in a.tsfile) fail onmainindependently of this change and are out of scope here.