Halve the assistant's share of the Scheduler panel

It was the largest thing there before being asked anything, and the view above it is what the
question is usually about.
This commit is contained in:
Gmer4Lfe
2026-08-09 12:28:31 -04:00
parent 6be765a9bf
commit bb5daad3cc
+13 -6
View File
@@ -1224,15 +1224,22 @@ function vvFitRight() {
// its floor, and nothing ever raised it again.
const availH = Math.max(80, lf.getBoundingClientRect().top - 32
- toolbar.getBoundingClientRect().bottom);
// Expanded takes most of the panel rather than all of it. The view above is what the question
// is usually about — a log, a conf, a script — and a chat that covers it entirely turns every
// follow-up into a round trip through the collapse button.
// A fifth of the panel at rest, two fifths expanded. Both were double this, which made the
// assistant the largest thing in the panel before it had been asked anything — and the view
// above is what the question is usually about. Expanded still leaves the majority to the log,
// conf or script being discussed, so a follow-up does not need the panel handed back first.
//
// It grows upward: the panel is pinned at the bottom and everything above it is sized from what
// is left, a few lines down. So the top edge rises and the thing being read stays where it is.
//
// Both heights handed to the chat rather than one cap applied to it, because the component owns
// which of the two it is currently at. Recomputed on every fit so a resize while expanded stays
// expanded at the new panel size instead of snapping back to the resting share.
// 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(90, Math.round(availH * 0.40)) + 'px',
Math.max(90, Math.round(availH * 0.82)) + 'px');
vvSchedChat.setHeights(Math.max(70, Math.round(availH * 0.20)) + 'px',
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');