Skip to content

fix: repair passkey rename flow - #829

Merged
swolfand merged 1 commit into
mainfrom
sam/mobile-600-spike-passkey-rename-can-never-save
Jul 30, 2026
Merged

fix: repair passkey rename flow#829
swolfand merged 1 commit into
mainfrom
sam/mobile-600-spike-passkey-rename-can-never-save

Conversation

@swolfand

@swolfand swolfand commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

  • Use the edited passkey name to enable Save and submit rename requests.
  • Include the active Clerk session ID on passkey get, update, and delete requests.
  • Reset the rename ViewModel after success so the screen can be reopened for subsequent renames.
  • Add regression coverage for form validation, authenticated passkey endpoints, and success-state reset.

Why

MOBILE-600 identified that the rename form compared and submitted the immutable route parameter instead of the editable input, leaving Save disabled. Runtime testing also exposed two related issues: passkey update requests omitted _clerk_session_id, and the activity-scoped rename ViewModel retained Success, causing later rename attempts to immediately navigate back.

Users can now rename a passkey repeatedly, and the requests are authenticated with the active session.

Screen_recording_20260729_165958.mp4

Note

Fix passkey rename flow so the Save button correctly tracks edited input

  • Fixes a bug (MOBILE-600) where the Save button checked passkeyName instead of passkeyNameInput, keeping it permanently disabled and submitting the wrong value if triggered.
  • Adds updatedPasskeyNameOrNull in UserProfilePasskeyRenameView.kt to validate that the edited name is non-blank and differs from the original before enabling Save.
  • Adds resetState() to UserProfilePasskeyRenameViewModel.kt and calls it after a successful rename to return the VM to Idle.
  • Adds _clerk_session_id as an optional query parameter to getPasskey, deletePasskey, and updatePasskey endpoints in UserApi.kt, defaulting to Clerk.session?.id.

🖇️ Linked Issues

Resolves MOBILE-600 — "Passkey rename can never save" — by fixing the button enablement and submission logic to use the live input field rather than the original name.

Macroscope summarized 08bec27.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@swolfand, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 271df94c-3af7-460b-8088-a26499930a1a

📥 Commits

Reviewing files that changed from the base of the PR and between 6ed250b and 08bec27.

📒 Files selected for processing (6)
  • source/api/src/main/kotlin/com/clerk/api/network/api/UserApi.kt
  • source/api/src/test/java/com/clerk/api/network/api/UserApiTest.kt
  • source/ui/src/main/java/com/clerk/ui/userprofile/security/passkey/rename/UserProfilePasskeyRenameView.kt
  • source/ui/src/main/java/com/clerk/ui/userprofile/security/passkey/rename/UserProfilePasskeyRenameViewModel.kt
  • source/ui/src/test/java/com/clerk/ui/userprofile/security/passkey/rename/UserProfilePasskeyRenameViewModelTest.kt
  • source/ui/src/test/java/com/clerk/ui/userprofile/security/passkey/rename/UserProfilePasskeyRenameViewTest.kt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@swolfand
swolfand marked this pull request as ready for review July 30, 2026 00:06
@swolfand
swolfand merged commit f9f25d7 into main Jul 30, 2026
17 checks passed
@swolfand
swolfand deleted the sam/mobile-600-spike-passkey-rename-can-never-save branch July 30, 2026 01:34
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