feat: mobile-first chat layout — split mode, hidden desktop modes, 79 tests

Mobile (≤480px):
- Hide Side Panel, Floating, Full Screen buttons
- Show Split button (50vh vertical split, CV visible above)
- Compact mode: 55vh max bottom sheet
- Force desktop modes to compact if somehow activated
- Disable tooltips on mobile (overflow prevention)
- Tighter header padding

Desktop (>480px):
- Split button hidden, all modes available as before

Tests: 85-chat-mobile.test.mjs — 79 assertions across
iPhone SE (320x568), iPhone 14 (393x852), iPhone 14 Pro Max (430x932),
plus desktop sanity check
This commit is contained in:
juanatsap
2026-04-09 12:21:28 +01:00
parent edf302b302
commit 6e922fd1cb
3 changed files with 303 additions and 3 deletions
+4 -1
View File
@@ -20,6 +20,9 @@
<button class="chat-mode-btn active" data-mode="" title="{{if eq .Lang "es"}}Compacto{{else}}Compact{{end}}" onclick="setChatSize('')">
<iconify-icon icon="mdi:message-outline"></iconify-icon>
</button>
<button class="chat-mode-btn" data-mode="chat-split" title="{{if eq .Lang "es"}}Mitad de pantalla{{else}}Half screen{{end}}" onclick="setChatSize('chat-split')">
<iconify-icon icon="mdi:arrow-split-horizontal"></iconify-icon>
</button>
<button class="chat-mode-btn" data-mode="chat-half" title="{{if eq .Lang "es"}}Panel lateral{{else}}Side panel{{end}}" onclick="setChatSize('chat-half')">
<iconify-icon icon="mdi:page-layout-sidebar-right"></iconify-icon>
</button>
@@ -216,7 +219,7 @@ document.addEventListener('htmx:afterRequest', function(event) {
// Set chat panel size
function setChatSize(size) {
var panel = document.getElementById('chat-panel');
panel.classList.remove('chat-half', 'chat-full', 'chat-float');
panel.classList.remove('chat-half', 'chat-full', 'chat-float', 'chat-split');
// Reset all inline styles from drag/resize
panel.style.top = '';
panel.style.left = '';