svrnty-hermes-webui-plugin/static/bte.css
Svrnty 80420e0d01
Some checks failed
plugin-tests / test (push) Failing after 5s
feat(plugin): sidebar nav buttons for Adwright + BTE (v0.5.0)
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>
2026-05-24 12:45:01 -04:00

327 lines
9.8 KiB
CSS

/* ============================================================================
svrnty-bte: BTE Command Center panel — brand asset gen + rate + iterate.
Class prefix .svrnty-bte-* on EVERY selector. CSS vars only (no hex colors).
Loaded after app.css. Skin-agnostic — inherits whatever WebUI vars resolve.
============================================================================ */
/* Local scope tokens (svrnty-bte-only — keep all color values inside :root-like
blocks per app.css convention; downstream selectors reference these vars).
--svrnty-bte-on-accent: text color rendered atop --accent (brand-fixed white).
--svrnty-bte-shadow: elevation shadow (CSS-var-compatible neutral). */
.svrnty-bte-launcher,
.svrnty-bte-overlay {
--svrnty-bte-on-accent: #FFFFFF;
--svrnty-bte-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
/* ── Launcher removed — sidebar nav (svrnty_nav.js) opens BTE now ──────── */
.svrnty-bte-launcher { display: none !important; }
/* ── Full-screen overlay panel ────────────────────────────────────────────── */
.svrnty-bte-overlay {
position: fixed;
inset: 0;
z-index: 9991;
background: var(--bg);
display: grid;
grid-template-rows: auto 1fr;
font-family: var(--font-ui, sans-serif);
color: var(--text);
}
.svrnty-bte-overlay[hidden] { display: none; }
/* ── Top toolbar ──────────────────────────────────────────────────────────── */
.svrnty-bte-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px 14px;
padding: 10px 16px;
background: var(--sidebar);
border-bottom: 1px solid var(--border);
}
.svrnty-bte-toolbar-title {
font-size: 13px;
font-weight: 600;
color: var(--strong);
margin-right: 4px;
}
.svrnty-bte-toolbar-group {
display: inline-flex;
align-items: center;
gap: 4px;
}
.svrnty-bte-toolbar-label {
font-size: 11px;
color: var(--muted);
margin-right: 4px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.svrnty-bte-close {
margin-left: auto;
background: none;
border: 1px solid var(--border2);
color: var(--text);
padding: 4px 10px;
border-radius: var(--radius-sm, 8px);
font-size: 12px;
cursor: pointer;
}
.svrnty-bte-close:hover { background: var(--hover-bg); }
/* ── Pills (mode / media / recipe) ────────────────────────────────────────── */
.svrnty-bte-pill {
background: var(--input-bg);
color: var(--text);
border: 1px solid var(--border2);
padding: 5px 12px;
border-radius: var(--radius-pill, 9999px);
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: background 0.12s;
}
.svrnty-bte-pill:hover:not(:disabled) { background: var(--hover-bg); }
.svrnty-bte-pill[aria-pressed="true"] {
background: var(--accent-bg-strong);
color: var(--accent-text);
border-color: var(--accent);
}
.svrnty-bte-pill:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* ── Selects + steppers ───────────────────────────────────────────────────── */
.svrnty-bte-select,
.svrnty-bte-stepper {
background: var(--input-bg);
color: var(--text);
border: 1px solid var(--border2);
border-radius: var(--radius-sm, 8px);
padding: 4px 8px;
font-size: 12px;
font-family: inherit;
}
.svrnty-bte-stepper { width: 60px; text-align: center; }
/* ── Generate button ──────────────────────────────────────────────────────── */
.svrnty-bte-generate {
background: var(--accent);
color: var(--svrnty-bte-on-accent);
border: none;
padding: 7px 18px;
border-radius: var(--radius-sm, 8px);
font-size: 13px;
font-weight: 600;
cursor: pointer;
}
.svrnty-bte-generate:hover:not(:disabled) { background: var(--accent-hover); }
.svrnty-bte-generate:disabled {
background: var(--surface);
color: var(--muted);
cursor: not-allowed;
}
/* ── Main pane: grid + right rail ─────────────────────────────────────────── */
.svrnty-bte-body {
display: grid;
grid-template-columns: 1fr 380px;
overflow: hidden;
}
.svrnty-bte-main {
overflow-y: auto;
padding: 16px;
background: var(--main-bg);
}
.svrnty-bte-rail {
border-left: 1px solid var(--border);
background: var(--surface);
overflow-y: auto;
padding: 14px;
display: flex;
flex-direction: column;
gap: 12px;
}
/* ── Status bar / banners ─────────────────────────────────────────────────── */
.svrnty-bte-banner {
padding: 8px 12px;
margin-bottom: 12px;
border-radius: var(--radius-sm, 8px);
font-size: 12px;
border: 1px solid var(--border2);
}
.svrnty-bte-banner-info {
background: var(--accent-bg);
color: var(--text);
border-color: var(--accent);
}
.svrnty-bte-banner-warn {
background: var(--input-bg);
color: var(--warning);
border-color: var(--warning);
}
/* ── Asset grid ───────────────────────────────────────────────────────────── */
.svrnty-bte-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 12px;
}
.svrnty-bte-card {
background: var(--surface);
border: 1px solid var(--border2);
border-radius: var(--radius-card, 12px);
overflow: hidden;
cursor: pointer;
display: flex;
flex-direction: column;
}
.svrnty-bte-card:hover { border-color: var(--accent); }
.svrnty-bte-card-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--focus-glow); }
.svrnty-bte-card-thumb {
aspect-ratio: 1 / 1;
background: var(--code-bg);
display: flex;
align-items: center;
justify-content: center;
color: var(--muted);
font-size: 11px;
}
.svrnty-bte-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.svrnty-bte-card-meta {
padding: 8px 10px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
font-size: 11px;
}
.svrnty-bte-status {
padding: 2px 8px;
border-radius: var(--radius-pill, 9999px);
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.svrnty-bte-status-generating { background: var(--accent-bg); color: var(--accent-text); }
.svrnty-bte-status-approved { background: var(--input-bg); color: var(--success); }
.svrnty-bte-status-rejected { background: var(--input-bg); color: var(--error); }
.svrnty-bte-status-golden { background: var(--input-bg); color: var(--gold); }
/* ── Rate buttons (on detail view) ────────────────────────────────────────── */
.svrnty-bte-rate-row {
display: flex;
align-items: center;
gap: 6px;
margin-top: 8px;
}
.svrnty-bte-rate-btn {
background: var(--input-bg);
color: var(--text);
border: 1px solid var(--border2);
border-radius: var(--radius-sm, 8px);
padding: 4px 10px;
font-size: 12px;
cursor: pointer;
}
.svrnty-bte-rate-btn:hover { background: var(--hover-bg); }
.svrnty-bte-rate-btn-up:hover { color: var(--success); }
.svrnty-bte-rate-btn-down:hover { color: var(--error); }
/* ── Asset detail view ───────────────────────────────────────────────────── */
.svrnty-bte-detail {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 16px;
margin-top: 16px;
padding: 16px;
background: var(--surface);
border: 1px solid var(--border2);
border-radius: var(--radius-card, 12px);
}
.svrnty-bte-detail-preview {
background: var(--code-bg);
border-radius: var(--radius-sm, 8px);
display: flex;
align-items: center;
justify-content: center;
min-height: 320px;
}
.svrnty-bte-detail-preview img { max-width: 100%; max-height: 480px; }
.svrnty-bte-detail-meta { font-size: 12px; }
.svrnty-bte-detail-meta dt {
color: var(--muted);
font-size: 11px;
margin-top: 8px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.svrnty-bte-detail-meta dd {
margin: 2px 0 0;
color: var(--text);
}
.svrnty-bte-comment {
width: 100%;
margin-top: 8px;
background: var(--input-bg);
color: var(--text);
border: 1px solid var(--border2);
border-radius: var(--radius-sm, 8px);
padding: 6px 8px;
font-family: inherit;
font-size: 12px;
resize: vertical;
min-height: 60px;
}
/* ── Right rail: embedded CMO chat reference + run status ─────────────────── */
.svrnty-bte-rail-section h4 {
margin: 0 0 6px;
font-size: 12px;
font-weight: 600;
color: var(--strong);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.svrnty-bte-rail-section p {
margin: 0;
font-size: 12px;
color: var(--muted);
line-height: 1.4;
}
.svrnty-bte-cmo-link {
display: inline-block;
margin-top: 6px;
padding: 5px 12px;
background: var(--accent-bg);
color: var(--accent-text);
border: 1px solid var(--accent);
border-radius: var(--radius-sm, 8px);
font-size: 12px;
cursor: pointer;
}
.svrnty-bte-cmo-link:hover { background: var(--accent-bg-strong); }
.svrnty-bte-run-log {
font-family: var(--font-ui, monospace);
font-size: 11px;
color: var(--muted);
background: var(--code-bg);
border-radius: var(--radius-sm, 8px);
padding: 8px;
max-height: 200px;
overflow-y: auto;
white-space: pre-wrap;
}
.svrnty-bte-empty {
text-align: center;
padding: 40px 20px;
color: var(--muted);
font-size: 13px;
}