Skip to content

fix(desktop): make v2 new-workspace project dropdown scrollable#3628

Merged
Kitenite merged 1 commit into
mainfrom
project-dropdown-scrollability-and-branch-selectio
Apr 21, 2026
Merged

fix(desktop): make v2 new-workspace project dropdown scrollable#3628
Kitenite merged 1 commit into
mainfrom
project-dropdown-scrollability-and-branch-selectio

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Apr 21, 2026

Summary

  • The project picker in the v2 new-workspace modal didn't scroll when there were many projects — wheel events bubbled to the modal scroll area behind, and the popover had no constraint tying it to available viewport space.
  • Constrains the CommandList to min(320px, --radix-popover-content-available-height) so the list always fits inside the popover's available room and scrolls internally.
  • Stops wheel propagation on PopoverContent so scrolling inside the dropdown doesn't scroll the modal behind. Mirrors the existing pattern in CompareBaseBranchPicker.

Test plan

  • Open the v2 new-workspace modal with an org that has many projects
  • Open the project picker — list should scroll internally with mouse wheel and trackpad
  • Confirm the modal scroll area behind the popover does not move while scrolling inside the dropdown
  • Confirm the popover stays inside the viewport when the trigger is near the bottom of the screen

Summary by cubic

Fixes the v2 new-workspace project dropdown so it scrolls inside the popover and stays within the viewport.
Constrains the CommandList to min(320px, var(--radix-popover-content-available-height)) and stops wheel propagation on PopoverContent to prevent the modal behind from scrolling.

Written for commit efaed13. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed scroll-wheel interactions in the project picker from affecting parent scrolling.
    • Improved layout by constraining the project picker list height relative to available space.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a48cb861-8444-4395-96da-901939ff24db

📥 Commits

Reviewing files that changed from the base of the PR and between 9e8b08c and efaed13.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/components/ProjectPickerPill/ProjectPickerPill.tsx

📝 Walkthrough

Walkthrough

Added a wheel-event handler to PopoverContent to prevent scroll propagation from the project picker, and constrained the CommandList height using a CSS class that respects the available popover space.

Changes

Cohort / File(s) Summary
Project Picker UI Enhancement
apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/components/ProjectPickerPill/ProjectPickerPill.tsx
Added onWheel handler to prevent scroll-event bubbling and applied max-height constraint to CommandList using max-h-[min(320px,var(--radix-popover-content-available-height))] class to cap list size relative to available popover height.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A picker once scrolled without care,
So I trapped the wheel in its lair,
Heights constrained, neat and tight,
The popover now behaves just right! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: making the v2 new-workspace project dropdown scrollable, which is the core issue being fixed.
Description check ✅ Passed The description includes a clear summary of the problem and solution, details the specific changes made, and provides a comprehensive test plan covering the main scenarios.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch project-dropdown-scrollability-and-branch-selectio

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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR fixes two related UX issues in the ProjectPickerPill dropdown inside the v2 new-workspace modal: wheel events were bubbling through to the modal's scroll area, and the CommandList had no height constraint tied to the available viewport space.

  • Adds onWheel={(event) => event.stopPropagation()} to PopoverContent — identical to the existing pattern in CompareBaseBranchPicker at line 129 of the sibling file.
  • Constrains CommandList height with max-h-[min(320px,var(--radix-popover-content-available-height))], using Radix UI's injected CSS variable to keep the list within the popover's available room and enable internal scrolling.

Confidence Score: 5/5

Safe to merge — minimal, focused fix with no logic changes and a direct precedent in the codebase.

The two-line change mirrors an identical existing pattern (CompareBaseBranchPicker), uses a well-supported Radix UI CSS variable, and introduces no new logic or state. No regressions are plausible.

No files require special attention. Note that CompareBaseBranchPicker uses a fixed max-h-[400px] without the min() viewport constraint — a follow-up to align it with this newer approach could be worthwhile but is not a blocker.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/DashboardNewWorkspaceForm/PromptGroup/components/ProjectPickerPill/ProjectPickerPill.tsx Adds onWheel stopPropagation to PopoverContent and a viewport-aware max-height to CommandList — a clean, minimal fix that mirrors the established CompareBaseBranchPicker pattern.

Sequence Diagram

sequenceDiagram
    participant User
    participant CommandList
    participant PopoverContent
    participant Modal

    Note over User,Modal: Before fix
    User->>CommandList: wheel event
    CommandList-->>PopoverContent: bubble
    PopoverContent-->>Modal: bubble (modal scrolls)

    Note over User,Modal: After fix
    User->>CommandList: wheel event
    CommandList->>CommandList: scroll internally (max-h constrained)
    CommandList-->>PopoverContent: bubble
    PopoverContent->>PopoverContent: stopPropagation()
    Note over Modal: Modal does NOT scroll
Loading

Reviews (1): Last reviewed commit: "fix(desktop): make v2 new-workspace proj..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@Kitenite Kitenite merged commit 1456892 into main Apr 21, 2026
7 checks passed
@Kitenite Kitenite deleted the project-dropdown-scrollability-and-branch-selectio branch April 21, 2026 22:39
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

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.

1 participant