Commit 8b9fcd5
authored
🤖 fix: use container queries for responsive chat controls (#526)
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`_1 parent bdecff0 commit 8b9fcd5
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
| 839 | + | |
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| |||
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
869 | | - | |
| 869 | + | |
870 | 870 | | |
871 | | - | |
| 871 | + | |
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| |||
896 | 896 | | |
897 | 897 | | |
898 | 898 | | |
899 | | - | |
900 | | - | |
| 899 | + | |
| 900 | + | |
901 | 901 | | |
902 | 902 | | |
903 | 903 | | |
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
916 | | - | |
917 | | - | |
| 916 | + | |
| 917 | + | |
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
| |||
0 commit comments