Skip to content

fix(web): keep project switcher rows inside the dropdown - #8616

Closed
anjulahettige wants to merge 2 commits into
pingdotgg:mainfrom
anjulahettige:fix/project-switcher-dropdown-overflow
Closed

fix(web): keep project switcher rows inside the dropdown#8616
anjulahettige wants to merge 2 commits into
pingdotgg:mainfrom
anjulahettige:fix/project-switcher-dropdown-overflow

Conversation

@anjulahettige

@anjulahettige anjulahettige commented Aug 29, 2026

Copy link
Copy Markdown

What Changed

Added min-w-0 to the popup element inside ComboboxPopup (one class in apps/web/src/components/ui/combobox.tsx) so a width-constrained combobox popup clips and truncates its content instead of letting rows spill past the panel edge.

Why

Fixes #8612.

The sidebar project switcher pins its popup to the trigger width with w-(--anchor-width). That class lands on the dropdown-glass panel span in ComboboxPopup, but the Base UI popup inside is a flex child without min-w-0, so its automatic minimum size is the min-content width of its widest row, and the truncate on row labels cannot reduce that. With a project name wider than the sidebar trigger, the rows, each row's settings gear, and the search field's underline all render past the panel's right edge, floating over the thread list behind the dropdown. Nothing on that path clips horizontally.

With min-w-0 the popup shrinks to the panel width, labels truncate, and the gears sit inside the panel. Popups without an explicit width class are unaffected: the panel still sizes to content between min-w-(--anchor-width) and max-w-(--available-width).

The regression shipped with #5931 (first stable release v0.0.36); before that the project filter was a MenuPopup, which puts the width class directly on the panel and wraps children in a w-full scroller.

Verified with vp fmt --check, vp lint, and tsgo --noEmit scoped to the change, plus the before/after below from a dev instance.

UI Changes

Project switcher open, one project name wider than the trigger.

Before:

before-project-switcher-overflow

After:

after-project-switcher-fixed

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (static layout fix, no motion)

Diagnosed and written by Claude Code running Claude Fable 5, via t3 triage.


Note

Low Risk
Single Tailwind class on shared combobox popup styling; no logic or data-path changes, with broad but positive layout behavior in constrained-width popups.

Overview
Fixes horizontal overflow in width-pinned combobox popups (notably the sidebar project switcher with w-(--anchor-width) on ComboboxPopup).

Adds min-w-0 to the inner ComboboxPrimitive.Popup in combobox.tsx so the flex child can shrink below its min-content width. Long project names and row actions now stay inside the panel and truncate on labels works instead of drawing over the thread list.

Reviewed by Cursor Bugbot for commit fea9aef. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix project switcher overflow by adding min-w-0 to ComboboxPopup

Adds the Tailwind class min-w-0 to the popup element in combobox.tsx. This lets the popup shrink below its intrinsic minimum width inside flex containers, keeping project switcher rows contained within the dropdown.

Macroscope summarized fea9aef.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f0f2ebe6-eff5-4caf-a7d3-017bdfaf952f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Aug 29, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 5e253d5

Macroscope's review found this PR approvable — This is a narrowly scoped UI layout fix that adds one sizing utility to the shared combobox popup, keeping width-constrained project-switcher content inside its dropdown without changing data or user flows. It does not modify product defaults or introduce broader runtime capabilities.

You can add or adjust custom eligibility rules. Learn more.

ComboboxPopup pins the glass panel to the trigger width when a caller
passes w-(--anchor-width), but the Base UI popup inside is a flex child
without min-w-0. Its automatic minimum size is the min-content width of
the widest row, which truncate on the row labels cannot reduce, so with
a project name wider than the sidebar trigger the rows, their settings
gears, and the search underline all render past the panel edge with no
horizontal clipping.

min-w-0 lets the popup shrink to the panel width so labels truncate and
content clips. Popups without an explicit width class are unaffected:
the panel still sizes to content between min-w-(--anchor-width) and
max-w-(--available-width).

Fixes pingdotgg#8612
@anjulahettige
anjulahettige force-pushed the fix/project-switcher-dropdown-overflow branch from 5e253d5 to 11cc2b3 Compare August 29, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Project switcher dropdown renders each row's settings button outside the dropdown

2 participants