fix(plugin): hide native main-views when our panel active; BTE in-main not full-viewport
plugin-tests / test (push) Failing after 5s
plugin-tests / test (push) Failing after 5s
JP reported (Chrome) after b43e649:
- Sidebar buttons render ✓
- Adwright: useless middle black panel between sidebar and right area
- BTE: entire left sidebar disappears, only close-X recovers it
ROOT CAUSES:
1. webui CSS has `main.main:not(.showing-X):not(.showing-Y)... > #mainChat
{ display:flex }` which still matches when our class is svrnty-showing-*
(not in webui's whitelist). Chat rendered alongside our panel → the
empty void = "middle black panel".
2. BTE overlay was `position:fixed; inset:0; z-index:9991` — covered the
whole viewport including sidebar + topbar.
FIXES:
- Adwright + BTE CSS now `main.main.svrnty-showing-<id> > .main-view
{ display:none !important }` — explicitly hides every native main-view
(mainChat, mainSkills, mainTasks, ...) when our panel is active.
- BTE.css: overlay no longer position:fixed. Becomes a normal flex child
of main when svrnty-showing-bte is active. Sidebar + topbar stay visible.
- bte.js: _openOverlay now appends to <main class="main"> instead of
document.body. Migrates existing body-mounted overlay on first open.
Karpathy 4 rules: root-caused via direct CSS inspection (not guessing),
two-line CSS change per panel, no new abstractions.
This commit is contained in:
+10
-7
@@ -5,10 +5,18 @@
|
||||
============================================================================ */
|
||||
|
||||
/* ── 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. */
|
||||
/* Panel mounted inside <main>; shown only when svrnty_nav.js sets
|
||||
main.svrnty-showing-adwright (sidebar button click). Default: hidden.
|
||||
We must !important-hide native .main-view siblings because webui's CSS
|
||||
has a default rule `main.main:not(.showing-X)... > #mainChat { display:flex }`
|
||||
that still matches our svrnty-* class — chat would otherwise render next
|
||||
to us as a useless empty void. */
|
||||
.svrnty-aw-panel { display: none; }
|
||||
|
||||
main.main.svrnty-showing-adwright > .main-view {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
main.main.svrnty-showing-adwright > .svrnty-aw-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -22,11 +30,6 @@ main.main.svrnty-showing-adwright > .svrnty-aw-panel {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user