test: 38 layout mode tests + fix half/full/float CSS positioning

- Fix side panel and full screen not covering full viewport
- Fix floating mode initial position (near chat button, not top-right)
- Reset width/height inline styles when switching modes
- Add 84-chat-layout-modes.test.mjs: 38 assertions covering
  compact, side panel, full screen, floating, drag, rapid switching,
  and user avatar rendering
This commit is contained in:
juanatsap
2026-04-09 11:09:30 +01:00
parent 482350a924
commit 823030dcf2
3 changed files with 272 additions and 5 deletions
@@ -210,10 +210,13 @@ document.addEventListener('htmx:afterRequest', function(event) {
function setChatSize(size) {
var panel = document.getElementById('chat-panel');
panel.classList.remove('chat-half', 'chat-full', 'chat-float');
// Reset all inline styles from drag/resize
panel.style.top = '';
panel.style.left = '';
panel.style.right = '';
panel.style.bottom = '';
panel.style.width = '';
panel.style.height = '';
if (size) panel.classList.add(size);
// Update active button
document.querySelectorAll('.chat-mode-btn[data-mode]').forEach(function(btn) {