Separate whether the chat is expanded from how big expanded is

One is an action taken constantly and the other a preference set once, so the banner names the
size and the composer keeps the toggle.
This commit is contained in:
Gmer4Lfe
2026-08-09 12:59:30 -04:00
parent 455fb55857
commit c3ed7262cd
4 changed files with 124 additions and 44 deletions
+7 -5
View File
@@ -1224,10 +1224,11 @@ function vvFitRight() {
// its floor, and nothing ever raised it again.
const availH = Math.max(80, lf.getBoundingClientRect().top - 32
- toolbar.getBoundingClientRect().bottom);
// 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.
// Three shares of the panel: 13% collapsed, 20% expanded at Medium, 40% at Large. Collapsed is
// deliberately small — enough to see the last exchange and type, while the log, conf or script
// being discussed keeps the panel, which is what you are usually asking about. Medium is for
// following an answer without giving up the view; Large is for sitting and reading one, and
// still leaves the majority above it 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.
@@ -1250,7 +1251,8 @@ function vvFitRight() {
// 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',
vvSchedChat.setHeights(Math.min(room, Math.max(60, Math.round(availH * 0.13))) + 'px',
Math.min(room, Math.max(100, 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.