Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@swolfand
Copy link
Collaborator

@swolfand swolfand commented Dec 2, 2025

Summary of changes

This pull request introduces a new UiActivity screen to the workbench app, updates dependencies to support new UI functionality, and improves robustness in the API model. The main changes are grouped below by theme:

New UI Feature:

  • Added a new UiActivity (workbench/src/main/java/com/clerk/workbench/UiActivity.kt) that displays a sign-in/sign-out button based on the user's authentication state, and updated the manifest to register this activity. [1] [2]
  • Modified MainActivity so that clicking the first item launches the new UiActivity using an explicit intent. [1] [2] [3]

Dependency Updates:

  • Updated gradle/libs.versions.toml to add the androidx.activity library version and include it in the dependency list, and added new dependencies for androidx.appcompat and material. [1] [2] [3]

API Model Improvement:

  • Made the logoUrl property in the UserSettings.Provider data class default to null, improving Kotlin serialization safety.

Summary by CodeRabbit

  • New Features

    • Added a new authentication interface with sign in/sign out functionality.
  • Chores

    • Updated and added UI framework dependencies for enhanced interface capabilities.

✏️ Tip: You can customize this high-level summary in your review settings.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
val user by Clerk.userFlow.collectAsStateWithLifecycle()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add lifecycle compose dependency for collectAsStateWithLifecycle

UiActivity calls Clerk.userFlow.collectAsStateWithLifecycle() but the workbench module only declares lifecycle-runtime-ktx; the compose extension lives in androidx.lifecycle:lifecycle-runtime-compose, so this new screen will not compile until that dependency is added.

Useful? React with πŸ‘Β / πŸ‘Ž.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

πŸ“ Walkthrough

Walkthrough

This change introduces a new UiActivity to the workbench module with Compose-based UI implementation. The activity observes Clerk user flow state and displays a button for sign-in or sign-out actions. Supporting changes include adding androidx.activity, androidx.appcompat, and material dependencies to the build configuration, registering the new activity in the Android manifest, updating MainActivity to navigate to UiActivity, adding a default null value to the SocialConfig.logoUrl property, and declaring the activity version alias in the Gradle versions catalog.

Pre-merge checks

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Make LogoUrl nullable' describes only one minor change (adding a default null to a single property) but the PR introduces major features like UiActivity, dependency updates, and manifest changes. Update the title to reflect the main change, such as 'Add UiActivity screen with sign-in/sign-out functionality' or 'Add UiActivity and update dependencies'.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
βœ… Passed checks (1 passed)
Check name Status Explanation
Description check βœ… Passed The PR description follows the template with a clear 'Summary of changes' section and provides comprehensive details organized by theme with proper references to affected files.

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

πŸ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 228a23d and 36fc3fa.

πŸ“’ Files selected for processing (6)
  • gradle/libs.versions.toml (2 hunks)
  • source/api/src/main/kotlin/com/clerk/api/network/model/environment/UserSettings.kt (1 hunks)
  • workbench/build.gradle.kts (1 hunks)
  • workbench/src/main/AndroidManifest.xml (1 hunks)
  • workbench/src/main/java/com/clerk/workbench/MainActivity.kt (3 hunks)
  • workbench/src/main/java/com/clerk/workbench/UiActivity.kt (1 hunks)
🧰 Additional context used
πŸ““ Path-based instructions (1)
**/*

βš™οΈ CodeRabbit configuration file

If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

**/*: Only comment on issues that would block merging, ignore minor or stylistic concerns.
Restrict feedback to errors, security risks, or functionality-breaking problems.
Do not post comments on code style, formatting, or non-critical improvements.
Keep reviews short: flag only issues that make the PR unsafe to merge.
Group similar issues into a single comment instead of posting multiple notes.
Skip repetition: if a pattern repeats, mention it once at a summary level only.
Do not add general suggestions, focus strictly on merge-blocking concerns.
If there are no critical problems, respond with minimal approval (e.g., 'Looks good'). Do not add additional review.
Avoid line-by-line commentary unless it highlights a critical bug or security hole.
Highlight only issues that could cause runtime errors, data loss, or severe maintainability issues.
Ignore minor optimization opportunities, focus solely on correctness and safety.
Provide a top-level summary of critical blockers rather than detailed per-line notes.
Comment only when the issue must be resolved before merge, otherwise remain silent.
When in doubt, err on the side of fewer comments, brevity and blocking issues only.
Avoid posting any refactoring issues.

Files:

  • workbench/src/main/AndroidManifest.xml
  • gradle/libs.versions.toml
  • workbench/src/main/java/com/clerk/workbench/UiActivity.kt
  • workbench/build.gradle.kts
  • workbench/src/main/java/com/clerk/workbench/MainActivity.kt
  • source/api/src/main/kotlin/com/clerk/api/network/model/environment/UserSettings.kt
🧬 Code graph analysis (1)
workbench/src/main/java/com/clerk/workbench/MainActivity.kt (1)
workbench/src/main/java/com/clerk/workbench/ui/theme/Theme.kt (1)
  • ClerkTheme (37-55)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build
  • GitHub Check: build
  • GitHub Check: semgrep-cloud-platform/scan
πŸ”‡ Additional comments (1)
workbench/src/main/java/com/clerk/workbench/UiActivity.kt (1)

1-40: Add tests for the new activity.

No tests were added for UiActivity. Please add tests to cover the sign-in/sign-out behavior and UI state changes.

if (user != null) {
Button(onClick = { scope.launch { Clerk.signOut() } }) { Text("Sign out") }
} else {
Button(onClick = {}) { Text("Sign in") }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

Sign-in button has no action.

The "Sign in" button has an empty onClick handler, so clicking it does nothing. This needs to be implemented or removed if not ready.

πŸ€– Prompt for AI Agents
In workbench/src/main/java/com/clerk/workbench/UiActivity.kt around line 34, the
Button for "Sign in" has an empty onClick handler so it does nothing; replace
the empty lambda with a real action: call your ViewModel's signIn() (or
appropriate authentication method), or if auth flow isn't implemented yet,
remove the button or disable it until ready. If calling signIn(), also trigger
UI state changes (set a loading flag, handle success by navigating or updating
state, and handle errors by showing a toast/snackbar), and ensure the onClick is
not a no-op.

@swolfand swolfand merged commit 82af0e0 into main Dec 2, 2025
6 checks passed
@swolfand swolfand deleted the sam/mobile-340-android-handle-custom-oauth branch December 2, 2025 20:08
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