fix(next): contain project and environment dropdowns

Closed
TE
7d ago
+568-545

Project and environment dropdown containment

Follow-up replacement for #26636's project/environment menu containment work. Menus use shared down-first placement, flip above only when below truly lacks room, and keep folder/project result viewports inside their popup in short windows. Project galleries keep 3/8/15 rows visibly distinct with bounded scrolling; environment and folder lists remain reachable. Model-picker behavior is unchanged.

The implementation preserves the existing pinned-action keyboard collection and scrollbar behavior. It uses flex min-height: 0 and bounded nested viewports so popup bounds, not intrinsic list height, control layout.

Leo's direction: “For these left two dropdowns, we want to make it not cover the, you know, not open upwards, right? Like if you see the other dropdowns, you'll note that they open downwards, aka away from the chat. They don't hide the chat.”

Gallery/design work from #26636 is retained in design/composer-menus.md, with aligned, airy and quiet-icon variants.

Base: feat-cmux-next
Head: cb669ab23044eb3d8f8ac240164bbbc836593a04

Validation pending on the exact head: focused containment tests and web check through cmux-ci. Native captures are not required for this webview-only change.

Changelog

Changed: keep project and environment dropdowns contained and down-first while preserving keyboard and scrollbar behavior.

Agent session: agent session


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Changes the composer's project and environment dropdowns to open downward, away from the chat, instead of upward, and keeps their result lists contained inside the popup in short windows. Placement flips above only when the space below is too small.

  • Menus pick their side once on open and keep it while filtering, so rows never jump.
  • Project galleries keep 3/8/15 rows visible with bounded scrolling; environment and folder lists stay reachable.
  • Scratch folders stay searchable but out of the unfiltered project list unless selected.
  • The current environment leads the environment list.
  • Project badges fall back to a quiet monogram instead of a generic folder tile when no icon is found.
  • Existing pinned-action keyboard navigation and scrollbar behavior is preserved.