-
Notifications
You must be signed in to change notification settings - Fork 3
Make LogoUrl nullable #394
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
Conversation
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.
π‘ 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() |
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.
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 πΒ / π.
π WalkthroughWalkthroughThis 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)
β Passed checks (1 passed)
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. Comment |
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.
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.
π 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.xmlgradle/libs.versions.tomlworkbench/src/main/java/com/clerk/workbench/UiActivity.ktworkbench/build.gradle.ktsworkbench/src/main/java/com/clerk/workbench/MainActivity.ktsource/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") } |
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.
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.
Summary of changes
This pull request introduces a new
UiActivityscreen 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:
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]MainActivityso that clicking the first item launches the newUiActivityusing an explicit intent. [1] [2] [3]Dependency Updates:
gradle/libs.versions.tomlto add theandroidx.activitylibrary version and include it in the dependency list, and added new dependencies forandroidx.appcompatandmaterial. [1] [2] [3]API Model Improvement:
logoUrlproperty in theUserSettings.Providerdata class default tonull, improving Kotlin serialization safety.Summary by CodeRabbit
New Features
Chores
βοΈ Tip: You can customize this high-level summary in your review settings.