feat(plugin): sidebar nav buttons for Adwright + BTE (v0.5.0)
plugin-tests / test (push) Failing after 5s

JP feedback: floating BTE launcher + always-visible Adwright panel were
"very fucked up" UX. Replaced with proper hermes-webui sidebar integration.

New static/svrnty_nav.js:
- Injects 2 nav-tab buttons into .sidebar-nav matching the existing
  data-panel + nav-tab + has-tooltip pattern
- Adwright: bullseye icon (marketing intelligence)
- BTE: sparkle/palette icon (creative studio)
- Wraps window.switchPanel to add main.svrnty-showing-{adwright,bte}
  classes so our panels participate in the existing main-view show/hide
  system without editing upstream panels.js
- Dispatches "svrnty:panel-switch" CustomEvent so panel modules can
  lazy-init / open / close based on which panel is active

Adwright panel:
- adwright.css: hidden by default; shows only when main has
  .svrnty-showing-adwright. When showing, occupies full main width
  and hides all other main children (chat etc).
- adwright.js: no change to mount logic (already mounted inside <main>).

BTE panel:
- bte.js: removed _installLauncher (no more floating bottom-right button).
  Init now listens for svrnty:panel-switch events to open/close the
  overlay. Defensively removes any stale .svrnty-bte-launcher DOM nodes
  from prior plugin versions.
- bte.css: launcher styles replaced with display:none !important.

manifest.yaml: bumped 0.4.0 → 0.5.0, svrnty_nav.js added to assets in
the correct load order (after app.js, before adwright.js + bte.js).
CONNECTION-MAP regenerated.

Karpathy 4 rules: no upstream edit, smallest possible wrap of switchPanel
to keep our panels coexisting with native panels (chat, tasks, kanban,
etc), CSS-only visibility (no DOM thrashing).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Svrnty
2026-05-24 12:45:01 -04:00
parent f8ce6b21f1
commit 80420e0d01
5 changed files with 36 additions and 68 deletions
+12 -19
View File
@@ -4,36 +4,29 @@
.svrnty-aw-*, themed via WebUI CSS vars so light/dark token-flips for free.
============================================================================ */
/* ── Layout — 60/40 panel/chat split inside <main class="main"> ──────────── */
/* When the Adwright panel is mounted, force main into a row flex so the
panel sits at 60% and #mainChat (existing) sits at 40%. We only override
when our wrapper is present so we don't break other views. */
main.main:has(> .svrnty-aw-panel) {
display: flex;
flex-direction: row;
align-items: stretch;
}
main.main:has(> .svrnty-aw-panel) > .svrnty-aw-panel {
flex: 0 0 60%;
max-width: 60%;
}
main.main:has(> .svrnty-aw-panel) > #mainChat {
flex: 0 0 40%;
max-width: 40%;
}
/* ── Visibility — hidden unless sidebar button activates us ──────────────── */
/* The panel is mounted inside <main> but only shows when svrnty_nav.js sets
main.svrnty-showing-adwright (sidebar button click). Default: hidden. */
.svrnty-aw-panel { display: none; }
.svrnty-aw-panel {
main.main.svrnty-showing-adwright > .svrnty-aw-panel {
display: flex;
flex-direction: column;
flex: 1 1 100%;
max-width: 100%;
height: 100%;
min-height: 0;
background: var(--bg);
color: var(--text);
font-family: var(--font-ui);
border-right: 1px solid var(--border2);
overflow: hidden;
}
/* When our panel is showing, hide every sibling in <main> (chat, etc). */
main.main.svrnty-showing-adwright > *:not(.svrnty-aw-panel) {
display: none !important;
}
/* ── Header ─────────────────────────────────────────────────────────────── */
.svrnty-aw-header {
display: flex;