feat(code): improve small ux nit on onboarding#2015
Merged
Conversation
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/onboarding/components/ProjectSelectStep.tsx:206-208
The `value as Org | null` cast is redundant when `Combobox` is already parameterised as `Combobox<Org>` — `onValueChange` should already be typed `(value: Org | null) => void`. If the library's callback doesn't propagate the generic, it may be worth filing an issue; leaving explicit casts like this makes refactors (e.g., renaming `Org`) error-prone because TypeScript won't catch the stale cast. The same pattern appears in the project combobox below.
```suggestion
onValueChange={(org) => {
if (org && org.id !== currentOrg?.id) {
```
Reviews (1): Last reviewed commit: "feat(code): improve small ux nit on onbo..." | Re-trigger Greptile |
Comment on lines
+206
to
+208
| onValueChange={(value) => { | ||
| const org = value as Org | null; | ||
| if (org && org.id !== currentOrg?.id) { |
Contributor
There was a problem hiding this comment.
The
value as Org | null cast is redundant when Combobox is already parameterised as Combobox<Org> — onValueChange should already be typed (value: Org | null) => void. If the library's callback doesn't propagate the generic, it may be worth filing an issue; leaving explicit casts like this makes refactors (e.g., renaming Org) error-prone because TypeScript won't catch the stale cast. The same pattern appears in the project combobox below.
Suggested change
| onValueChange={(value) => { | |
| const org = value as Org | null; | |
| if (org && org.id !== currentOrg?.id) { | |
| onValueChange={(org) => { | |
| if (org && org.id !== currentOrg?.id) { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/ProjectSelectStep.tsx
Line: 206-208
Comment:
The `value as Org | null` cast is redundant when `Combobox` is already parameterised as `Combobox<Org>` — `onValueChange` should already be typed `(value: Org | null) => void`. If the library's callback doesn't propagate the generic, it may be worth filing an issue; leaving explicit casts like this makes refactors (e.g., renaming `Org`) error-prone because TypeScript won't catch the stale cast. The same pattern appears in the project combobox below.
```suggestion
onValueChange={(org) => {
if (org && org.id !== currentOrg?.id) {
```
How can I resolve this? If you propose a fix, please make it concise.
adboio
approved these changes
May 4, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Problem
The organization and project pickers in the onboarding flow used a custom
Command-based popover implementation. This approach had layout inconsistencies and lacked proper anchor-width matching for the dropdown content.Changes
Command+Popovercombination in theProjectSelectStepwith theComboboxcomponents from@posthog/quill(Combobox,ComboboxTrigger,ComboboxContent,ComboboxInput,ComboboxEmpty,ComboboxList,ComboboxItem) for both the organization and project pickers.sortedOrgsandsortedProjects, and selected values are tracked viaselectedOrgandselectedProjectderived state.refs as anchors so dropdown content width correctly matches the trigger width.ProjectSelect.cssfile dependency and the inlineBoxwrapper around list item text, simplifying the markup.