Skip to content

feat(code): improve small ux nit on onboarding#2015

Merged
adboio merged 1 commit intomainfrom
05-04-feat_code_improve_small_ux_nit_on_onboarding
May 4, 2026
Merged

feat(code): improve small ux nit on onboarding#2015
adboio merged 1 commit intomainfrom
05-04-feat_code_improve_small_ux_nit_on_onboarding

Conversation

@k11kirky
Copy link
Copy Markdown
Contributor

@k11kirky k11kirky commented May 4, 2026

Screenshot 2026-05-04 at 10.24.02 PM.png

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

  • Replaced the Command + Popover combination in the ProjectSelectStep with the Combobox components from @posthog/quill (Combobox, ComboboxTrigger, ComboboxContent, ComboboxInput, ComboboxEmpty, ComboboxList, ComboboxItem) for both the organization and project pickers.
  • Organizations and projects are now pre-sorted alphabetically via memoized sortedOrgs and sortedProjects, and selected values are tracked via selectedOrg and selectedProject derived state.
  • Trigger buttons now use refs as anchors so dropdown content width correctly matches the trigger width.
  • Removed the ProjectSelect.css file dependency and the inline Box wrapper around list item text, simplifying the markup.
  • Fixed truncation on long project and organization names in the trigger button.
  • Corrected the "Plan & Usage" label to "Plan & usage" in the settings sidebar.

Copy link
Copy Markdown
Contributor Author

k11kirky commented May 4, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@k11kirky k11kirky marked this pull request as ready for review May 4, 2026 21:26
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 4, 2026

Prompt To Fix All With AI
Fix 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) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 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 adboio merged commit 74653f4 into main May 4, 2026
16 checks passed
@adboio adboio deleted the 05-04-feat_code_improve_small_ux_nit_on_onboarding branch May 4, 2026 21:46
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