Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Chat controls now compact based on actual available space instead of window size.

Problem

Responsive chat controls used viewport-based media queries (max-[550px]) which checked the entire window width. When dev tools were open, the window was still wide even though the component had less space, so controls didn't compact.

Solution

Use CSS container queries instead of viewport media queries:

  • Mark control bar as container context with @container
  • Replace max-[550px] with [@container(max-width:550px)]
  • Controls now respond to their actual container width

Testing

  • make typecheck passes
  • make lint passes
  • make test passes (955/956 tests)
  • Manually verified controls compact correctly when dev tools open

Generated with cmux

Replace viewport-based media queries with CSS container queries so chat
controls compact based on actual available space, not window size.

Fixes issue where controls don't compact when dev tools are open.
@ammario ammario merged commit 8b9fcd5 into main Nov 7, 2025
13 checks passed
@ammario ammario deleted the fix-chat-controls branch November 7, 2025 15:51
ibetitsmike pushed a commit that referenced this pull request Nov 7, 2025
Chat controls now compact based on actual available space instead of
window size.

## Problem

Responsive chat controls used viewport-based media queries
(`max-[550px]`) which checked the entire window width. When dev tools
were open, the window was still wide even though the component had less
space, so controls didn't compact.

## Solution

Use CSS container queries instead of viewport media queries:
- Mark control bar as container context with `@container`
- Replace `max-[550px]` with `[@container(max-width:550px)]`
- Controls now respond to their actual container width

## Testing

- ✅ `make typecheck` passes
- ✅ `make lint` passes  
- ✅ `make test` passes (955/956 tests)
- Manually verified controls compact correctly when dev tools open

_Generated with `cmux`_
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