Skip to content

fix(ui): wire back button on sign-up code and collect-field screens - #823

Merged
swolfand merged 2 commits into
clerk:mainfrom
texxo:fix/signup-back-button
Jul 29, 2026
Merged

fix(ui): wire back button on sign-up code and collect-field screens#823
swolfand merged 2 commits into
clerk:mainfrom
texxo:fix/signup-back-button

Conversation

@texxo

@texxo texxo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

The back button on two sign-up screens renders but does nothing.

ClerkThemedAuthScaffold defaults to onBackPressed: () -> Unit = {} with hasBackButton: Boolean = true,
so any call site that omits onBackPressed draws a chevron that silently no-ops.
SignUpCodeView and SignUpCollectFieldView both omitted it — every other auth screen passes authState::navigateBack. System back/gesture works on these screens, which is why only the button appears broken.

Verified on samples/prebuilt-ui: back now returns from the code screen to auth start, and from the
create-password screen to the code screen. Sign-in flow unchanged.

PS: this issue of non-working back-button only effects android, because the verification chain is different between the two native platforms.

Note

[!NOTE]

Wire back button on sign-up code and collect-field screens

Passes onBackPressed callbacks wired to authState.navigateBack() in SignUpCodeView.kt and SignUpCollectFieldView.kt. Previously, the back button had no effect on these screens.

Macroscope summarized 5c715b3.

Summary by CodeRabbit

  • Bug Fixes
    • Added consistent back-navigation support to the sign-up verification and information-entry screens.
    • Pressing the back button now returns users to the previous authentication step.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Back-button handling is added to the themed authentication scaffolds in the sign-up code and field-collection views, delegating navigation to the authentication state.

Changes

Sign-up navigation

Layer / File(s) Summary
Wire sign-up back navigation
source/ui/src/main/java/com/clerk/ui/signup/code/SignUpCodeView.kt, source/ui/src/main/java/com/clerk/ui/signup/collectfield/SignUpCollectFieldView.kt
Both sign-up scaffolds now provide back-press callbacks that invoke authState.navigateBack().

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: swolfand

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title is concise and clearly describes the main change: wiring the sign-up back button on two screens.
Description check ✅ Passed The description includes the required Summary of changes section and clearly explains the bug, fix, and verification.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@mikepitre
mikepitre requested a review from swolfand July 29, 2026 15:18
@swolfand
swolfand merged commit 0b2ed41 into clerk:main Jul 29, 2026
10 checks passed
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.

2 participants