From 2e646f82b4ab1e2513bddc1ac8f79be22a7f47fd Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Mon, 17 Aug 2026 17:56:32 -0400 Subject: [PATCH] Sync expand state between the two chat modes, and soften the mark To the operator there is one box on screen, so expanding while reading the assistant and finding the mesh collapsed reads as the card forgetting. --- Plugin/unraid/include/ai_chat.php | 4 +- Plugin/unraid/include/node_chat.php | 64 ++++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 13 deletions(-) diff --git a/Plugin/unraid/include/ai_chat.php b/Plugin/unraid/include/ai_chat.php index 82af21d..f665cf7 100644 --- a/Plugin/unraid/include/ai_chat.php +++ b/Plugin/unraid/include/ai_chat.php @@ -162,8 +162,8 @@ function vv_ai_chat_assets(): void { .vv-ai-chat-wrap { background:#0b0b0b; border-radius:6px; } .vv-ai-chat-wrap::before { content:''; position:absolute; inset:0; z-index:0; pointer-events:none; - background:url('/plugins/varaverk/icons/varaverk.png') center/min(78%,460px) no-repeat; - opacity:.05; filter:grayscale(1); + background:url('/plugins/varaverk/icons/varaverk.png') center 58%/min(84%,520px) no-repeat; + opacity:.032; filter:grayscale(1); } .vv-ai-empty { color:#3a3a3a; font-size:12px; text-align:center; padding:60px 20px; line-height:1.7; } .vv-ai-msg { margin-bottom:16px; } diff --git a/Plugin/unraid/include/node_chat.php b/Plugin/unraid/include/node_chat.php index 51a52b9..70c678f 100644 --- a/Plugin/unraid/include/node_chat.php +++ b/Plugin/unraid/include/node_chat.php @@ -260,8 +260,8 @@ function vv_nc_pane_markup(string $prefix, bool $meshDefault = false, it can carry the badge without competing with the text. -->
{ + if (_vvNcSyncing) return; + // After its own handler has run, so the class reflects the new state. + setTimeout(() => vvNcGrow(aiBtn.classList.contains('vv-ai-grow-on')), 0); + }); + } + // Restore the expanded state before the first paint, so the card does not visibly resize. - try { if (localStorage.getItem('vvNcBig:' + prefix) === '1') vvNcGrow(); } catch (_) {} + try { + if (localStorage.getItem('vvNcBig:' + prefix) === '1') { + _vvNcBig = true; + _vvNcApplyBig(); + // Bring the assistant along, so both halves start the session agreeing. + if (aiBtn && !aiBtn.classList.contains('vv-ai-grow-on')) { + _vvNcSyncing = true; aiBtn.click(); _vvNcSyncing = false; + } + } + } catch (_) {} vvNcMode(want); vvNcChans(); _vvNcSchedule();