From 455fb558571711f41e155875c22054a4b5d8de44 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Sun, 9 Aug 2026 12:42:32 -0400 Subject: [PATCH] Let the Scheduler's views shrink so the assistant can grow into them Flex items default to min-height:auto, so a view holding a log ignored the height it was given and pushed the composer out of a panel that clips instead of scrolling. --- Plugin/unraid/css/varaverk.css | 6 ++++++ Plugin/unraid/pages/scheduler.php | 19 +++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Plugin/unraid/css/varaverk.css b/Plugin/unraid/css/varaverk.css index 7adc7d8..4f3b68f 100644 --- a/Plugin/unraid/css/varaverk.css +++ b/Plugin/unraid/css/varaverk.css @@ -145,6 +145,12 @@ body.vv-fullscreen #displaybox { padding-left: 1rem !important; padding-top: .5r #vv-sched-left { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-self: flex-start; } #vv-sched-cards { flex: 1; } #vv-sched-right { display: none; flex: 1 1 0; min-width: 0; flex-direction: column; overflow: hidden; align-self: flex-start; } +/* Flex items default to min-height:auto, which resolves to their content size — so a view with a + long log in it refuses to shrink. The assistant below it is flex-shrink:0 and this panel is a + fixed height with overflow:hidden, so whatever will not fit is not scrolled, it is clipped off + the bottom: the assistant's own composer, which is the last thing in the panel. vvFitRight() + sizes these explicitly and this is what lets that size actually take effect. */ +#vv-sched-right > * { min-height: 0; } #vv-sched-right.vv-panel-visible { display: flex; } .vv-log-card { flex: 1; display: flex; flex-direction: column; padding-bottom: 0; } .vv-log-right-pre { max-height: none; overflow-y: auto; } diff --git a/Plugin/unraid/pages/scheduler.php b/Plugin/unraid/pages/scheduler.php index 783a392..d591ba8 100644 --- a/Plugin/unraid/pages/scheduler.php +++ b/Plugin/unraid/pages/scheduler.php @@ -1237,12 +1237,23 @@ function vvFitRight() { // expanded at the new panel size instead of snapping back to the resting share. The floors keep // the same 1:2 relationship, or on a very short viewport the two states would clamp to the same // number and the control would appear to do nothing. - if (vvSchedChat) { - vvSchedChat.setHeights(Math.max(70, Math.round(availH * 0.20)) + 'px', - Math.max(140, Math.round(availH * 0.40)) + 'px'); + const dock = document.getElementById('vv-ai-dock'); + if (vvSchedChat && dock) { + // The share is of the transcript, but what the panel has to find room for is the whole + // assistant — composer, control row, padding. Measured rather than assumed, because it is a + // wrapped row of buttons whose height depends on how narrow the panel is. + const chatBox = document.getElementById('vv-sched-ai-chat'); + const chrome = chatBox ? Math.max(0, dock.offsetHeight - chatBox.offsetHeight) : 0; + // Hard ceiling, not a preference. This panel is a fixed height with overflow:hidden, so a + // transcript that asks for more than is left is not scrolled into place — it pushes its own + // composer out of the panel and the panel cuts it off. VIEW_MIN keeps the thing being + // discussed on screen too; a chat that covers it entirely is not worth the room it took. + const VIEW_MIN = 90; + const room = Math.max(60, availH - VIEW_MIN - chrome); + vvSchedChat.setHeights(Math.min(room, Math.max(70, Math.round(availH * 0.20))) + 'px', + Math.min(room, Math.max(140, Math.round(availH * 0.40))) + 'px'); } // Measured after the heights are applied, so this reads the clamped height, not the natural one. - const dock = document.getElementById('vv-ai-dock'); const dockH = dock ? dock.offsetHeight : 0; const contentH = Math.max(80, availH - dockH); if (pre.style.display !== 'none') {