Swap the banner's checkboxes with the mode, and put the mark behind the mesh transcript

The mesh had its own row inside the pane while the banner kept showing the assistant's three, so switching mode left controls on screen that governed nothing visible.
This commit is contained in:
Gmer4Lfe
2026-08-17 17:46:29 -04:00
parent b6a677a710
commit be10e78c7a
2 changed files with 39 additions and 18 deletions
+22 -1
View File
@@ -2427,7 +2427,7 @@ function vv_ai_chat_markup(string $prefix, array $o = []): void {
Both are view controls: neither changes what is asked, only what you watch while it
happens. That is why they sit here with the window controls rather than in the composer
beside the things that shape the question. -->
<span class="vv-ai-head-c">
<span class="vv-ai-head-c" id="<?= $p ?>-cb-ai">
<label class="vv-ai-cb" title="Show the model's reasoning as it is written, not after">
<input type="checkbox" id="<?= $p ?>-see-think"> <span>Reasoning</span>
</label>
@@ -2442,6 +2442,27 @@ function vv_ai_chat_markup(string $prefix, array $o = []): void {
</label>
</span>
<?php if (!empty($o['mesh'])): ?>
<!-- The mesh's three, in the same place and the same three slots. Switching mode swaps this
group for the one above rather than leaving the assistant's controls sitting over a
conversation they do not govern — which is what a second row inside the pane amounted to,
and why the banner looked unchanged after switching. -->
<span class="vv-ai-head-c" id="<?= $p ?>-cb-mesh" hidden>
<label class="vv-ai-cb"
title="Render colours, fonts and sizes as sent. Unticked shows every message as plain text.">
<input type="checkbox" id="vv-nc-fmt-on" checked onchange="vvNcPref();vvNcRender()"> <span>Formatting</span>
</label>
<label class="vv-ai-cb"
title="Show only what has arrived since you last looked. Unticked shows the whole conversation.">
<input type="checkbox" id="vv-nc-unread" onchange="vvNcRender()"> <span>Only New</span>
</label>
<label class="vv-ai-cb"
title="Follow the newest message. Unticks when you scroll up, re-ticks at the bottom.">
<input type="checkbox" id="vv-nc-follow" checked onchange="vvNcPref()"> <span>Auto Scroll</span>
</label>
</span>
<?php endif; ?>
<span class="vv-ai-head-r">
<button class="vv-ai-btn ghost vv-ai-size" id="<?= $p ?>-size" type="button"
style="display:none">Medium</button>
+17 -17
View File
@@ -246,32 +246,26 @@ function vv_nc_pane_markup(string $prefix, bool $meshDefault = false, string $he
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px;">
<select id="vv-nc-ch" class="vv-cf-sel" style="max-width:200px;font-size:11px;padding:3px 8px;"
onchange="vvNcSelect(this.value)"></select>
<!-- Three, in the same three positions the assistant uses: what to render, what to show,
whether to follow. Switching mode should move the eye no further than the labels.
Hostnames is a view preference too, but it is not one of the three and lives in the
Aa drawer rather than making this row a different length from the assistant's. -->
<label class="vv-ai-cb" style="font-size:10px;"
title="Render colours, fonts and sizes as sent. Unticked shows every message as plain text.">
<input type="checkbox" id="vv-nc-fmt-on" checked onchange="vvNcPref('fmtOn');vvNcRender()"> <span>Formatting</span>
</label>
<label class="vv-ai-cb" style="font-size:10px;"
title="Show only what has arrived since you last looked. Unticked shows the whole conversation.">
<input type="checkbox" id="vv-nc-unread" onchange="vvNcRender()"> <span>Only New</span>
</label>
<label class="vv-ai-cb" style="font-size:10px;"
title="Follow the newest message. Unticks when you scroll up, re-ticks at the bottom.">
<input type="checkbox" id="vv-nc-follow" checked onchange="vvNcPref('follow')"> <span>Auto Scroll</span>
</label>
<span id="vv-nc-status" style="margin-left:auto;font-size:9px;color:#3a3a3a;"></span>
</div>
<!-- Fixed height, not max-height. The assistant's transcript is a fixed box, so a mesh log
that grew with its content made the card jump size every time the mode was switched or a
message arrived — and on a dashboard a card that resizes shifts everything under it. -->
<!-- The mark sits behind the conversation rather than beside it. Faint enough to read
through — this is the one surface that is about the people rather than the machines, and
it can carry the badge without competing with the text. -->
<div style="position:relative;">
<img src="/plugins/varaverk/icons/varaverk.png" alt="" aria-hidden="true"
style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
width:min(70%,220px);opacity:.04;pointer-events:none;filter:grayscale(1);
z-index:0;">
<div id="vv-nc-log"
style="height:var(--vv-nc-h,300px);overflow-y:auto;padding:6px 2px;font-size:12px;">
style="position:relative;z-index:1;height:var(--vv-nc-h,300px);overflow-y:auto;
padding:6px 2px;font-size:12px;">
<div style="color:#444;font-size:11px;">Loading…</div>
</div>
</div><?php /* close the logo-backed frame */ ?>
<div style="display:flex;gap:6px;align-items:flex-start;margin-top:8px;flex-wrap:wrap;">
<textarea id="vv-nc-text" rows="2" placeholder="Message the mesh…"
@@ -566,6 +560,12 @@ function vvNcMode(force) {
_vvNcMeshOn = (force === undefined) ? !_vvNcMeshOn : !!force;
ai.hidden = _vvNcMeshOn;
me.hidden = !_vvNcMeshOn;
// The banner's controls belong to whichever conversation is showing. Leaving the assistant's
// three over a mesh transcript is what made the switch look like nothing had changed.
const cbA = document.getElementById(p + '-cb-ai');
const cbM = document.getElementById(p + '-cb-mesh');
if (cbA) cbA.hidden = _vvNcMeshOn;
if (cbM) cbM.hidden = !_vvNcMeshOn;
const lbl = document.getElementById(p + '-mode-l');
if (lbl) lbl.textContent = _vvNcMeshOn ? 'Assistant' : 'Mesh Chat';
const t = document.getElementById(p + '-title');