Skip to content

feat(mosaic): wire up user profile active devices - #9992

Open
austincalvelage wants to merge 25 commits into
mainfrom
codex/active-devices-wire-up
Open

austincalvelage wants to merge 25 commits into
mainfrom
codex/active-devices-wire-up

Conversation

@austincalvelage

@austincalvelage austincalvelage commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Description

Wire the Mosaic active devices section to Clerk so users can view sessions and device details, then sign out another device. Show localized activity dates, current-device and impersonation badges, and revocation errors with retry actions. Locally rejected sign-outs use catalog copy for unavailable devices. Open details update their localized name and activity text when the locale changes. Keep the details dialog open while sign-out is pending and restore focus after removal.

Use the existing SDK session-list behavior. Results remain cached, and failed list requests resolve to an empty list. SDK API changes, list-load error/retry enhancements, and shared focus-hook changes are outside this PR. One browser run returned focus to the current-device fallback after sign-out from details instead of the next row; subsequent runs passed with the unchanged hook. The next-row regression test remains in place. This intermittent focus failure needs investigation before choosing a fix.

Session reverification UI is deferred. Requests that require it surface the API error and leave the device in place. Ignore stale work after the active user or session changes. Compose the connected section through the security panel's activeDevicesSlot. Bulk sign-out is deferred, with both gaps documented in feature tests. Full UserProfile assembly is outside this PR.

Checklist

  • pnpm test runs as expected. The scoped active-device and composition Chromium suites passed with 32 tests and 2 existing TODOs on the latest run. Active-device Chromium coverage lives in one colocated connected feature file. Existing bulk-action and delayed-row contracts remain in the unit suite. The intermittent focus failure remains unresolved. The targeted device, security-panel, error, and confirmation unit suites passed with 66 tests. Mosaic type checks, targeted lint, and formatting passed.
  • pnpm build runs as expected. The Mosaic JS, CSS, and bundle checks passed locally.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot

changeset-bot Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3b5b948

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 8, 2026 4:02am UTC
swingset Ready Ready Preview Oct 8, 2026 4:02am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 8da36339-a1b4-4b46-802e-8c894039041f
📥 Commits

Reviewing files that changed from the base of the PR and between af3b6f5 and 3b5b948.

📒 Files selected for processing (23)
  • .changeset/clear-active-devices.md
  • packages/mosaic/src/__tests__/feature/fake-fapi.ts
  • packages/mosaic/src/blocks/confirmation/confirmation.controller.test.ts
  • packages/mosaic/src/blocks/confirmation/confirmation.controller.ts
  • packages/mosaic/src/features/user-profile/__tests__/user-profile-device-actions.test.tsx
  • packages/mosaic/src/features/user-profile/__tests__/user-profile-passkeys-composition.feature.test.tsx
  • packages/mosaic/src/features/user-profile/__tests__/user-profile-security-panel.view.test.tsx
  • packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices-section.controller.ts
  • packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices-section.feature.test.tsx
  • packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices-section.model.ts
  • packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices-section.tsx
  • packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices-section.view.tsx
  • packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices.messages.ts
  • packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices.types.ts
  • packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-device-details.dialog.tsx
  • packages/mosaic/src/features/user-profile/user-profile-security-panel.view.tsx
  • packages/mosaic/src/localization/errors.messages.ts
  • packages/mosaic/src/localization/registry.ts
  • packages/swingset/src/app/(clerk)/live/active-devices/page.tsx
  • packages/swingset/src/lib/live-navigation.ts
  • packages/swingset/src/stories/fixtures/user-profile-active-devices.ts
  • packages/swingset/src/stories/fixtures/user-profile.tsx
  • packages/swingset/src/stories/user-profile-active-devices-section.stories.tsx
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 5 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour.


📝 Walkthrough

Walkthrough

The changes add a user-profile active-devices section that loads sessions, displays eligible devices, and supports revoking other sessions. The security panel now accepts the section through a slot, and a live page renders it for signed-in users. The changes also update fake API routes, localization, confirmation retry handling, fixtures, and tests.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to 3b5b9

No actionable issue is established that should block merging. The intermittent focus report remains unverified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 21 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: connecting the Mosaic user profile active-devices section to Clerk.
Description check ✅ Passed The description directly explains the active-devices integration, supported behavior, tests, deferred work, and known intermittent focus issue.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 3.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 21 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

@austincalvelage
austincalvelage force-pushed the austin/password-section-wire-up branch 2 times, most recently from d03939e to 8dca13f Compare October 1, 2026 18:28
@austincalvelage
austincalvelage force-pushed the codex/active-devices-wire-up branch from 84791ee to 1ab18cb Compare October 1, 2026 18:28
@austincalvelage
austincalvelage force-pushed the austin/password-section-wire-up branch 4 times, most recently from c917bd5 to e664a41 Compare October 1, 2026 21:55
Base automatically changed from austin/password-section-wire-up to main October 1, 2026 22:10
@austincalvelage
austincalvelage force-pushed the codex/active-devices-wire-up branch from 2cd2d16 to a0ab7dd Compare October 2, 2026 22:06
@pkg-pr-new

pkg-pr-new Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9992

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9992

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9992

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9992

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9992

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9992

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9992

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9992

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@9992

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9992

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9992

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9992

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9992

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9992

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9992

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@9992

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9992

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9992

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9992

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9992

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9992

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9992

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9992

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9992

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9992

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9992

commit: 3b5b948

This branch was successfully deployed

2 active deployments
Preview – swingset — 3b5b948b Deployed Oct 8, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 3b5b948b Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant