Repository navigation
feat(ui): add the Mosaic user profile password section #9750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
austincalvelage
merged 10 commits into
main
from
kylemac/security-panel-password-section
Sep 15, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
97c8bc8
feat(ui): add the Mosaic user profile password section
kylemac c85b47b
refactor(ui): name the password section's enterprise gate for its cause
kylemac 0881853
feat(ui): add managed-by label and no-password copy to the Mosaic pas…
prestonwebdev 59171f4
refactor(ui): remove obsolete enterprise password dialog state
austincalvelage af1bb06
fix(ui): hide unavailable standalone password sections
austincalvelage fab0cc5
fix(swingset): allow password error stories to recover on retry
austincalvelage 55f2009
refactor(ui): separate password row dialog and shared contracts
austincalvelage dbfff4b
test(ui): focus password coverage on section behavior
austincalvelage fd8776a
docs(swingset): describe password composition and retry states
austincalvelage a7daece
docs(ui): trim redundant password section comments
austincalvelage File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
35 changes: 35 additions & 0 deletions
35
packages/swingset/src/stories/fixtures/user-profile-edit-password.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import type { UserProfileFormError } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types'; | ||
| import { UserProfileSaveError } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types'; | ||
| import type { UserProfileEditPasswordValue } from '@clerk/ui/mosaic/features/user-profile/user-profile-password-section/user-profile-password-section.types'; | ||
| import { useState } from 'react'; | ||
|
|
||
| export interface UserProfileEditPasswordFixtureOptions { | ||
| hasPassword?: boolean; | ||
| requiresCurrentPassword?: boolean; | ||
| latency?: number; | ||
| /** Rejects the first save so the next attempt can succeed. */ | ||
| failWith?: UserProfileFormError; | ||
| } | ||
|
|
||
| export function useUserProfileEditPasswordFixture({ | ||
| hasPassword: initialHasPassword = true, | ||
| requiresCurrentPassword = true, | ||
| latency = 800, | ||
| failWith, | ||
| }: UserProfileEditPasswordFixtureOptions = {}) { | ||
| const [hasPassword, setHasPassword] = useState(initialHasPassword); | ||
| const [hasFailed, setHasFailed] = useState(false); | ||
|
|
||
| return { | ||
| hasPassword, | ||
| requiresCurrentPassword, | ||
| onSubmitPassword: async (_value: UserProfileEditPasswordValue) => { | ||
| await new Promise(resolve => setTimeout(resolve, latency)); | ||
| if (failWith && !hasFailed) { | ||
| setHasFailed(true); | ||
| throw new UserProfileSaveError(failWith.message ?? 'Something went wrong.', failWith.fields); | ||
| } | ||
| setHasPassword(true); | ||
| }, | ||
| }; | ||
| } |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add the mandatory documentation sections.
The page goes directly to story-specific headings. It does not provide
Playground,Props, andUsage.Add these sections in the required order. Place the examples under the prescribed hierarchy.
As per coding guidelines, “Playground / Props / Usage are mandatory and always in this order.”
🤖 Prompt for AI Agents
Source: Coding guidelines