From ac5e6680396c8b7aaa09f98a7f7bb4da22a52047 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Tue, 22 Sep 2026 00:31:18 +0200 Subject: [PATCH] feat(theseus): plug-in dock under the Theseus menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aegis sat among the extension buttons and drifted as add-ons were installed or removed. First-class Silent Mode components (manifest category "plugin") now get a labelled chip at the right end of the favorites row, directly below the Theseus menu — always visible, never collapsed into the extensions overflow. The add-on host tags each sidebar panel and toolbar menu with the category so the chrome can split the two docks; the extensions dock keeps its behaviour. --- addons-host.js | 9 +++++++- chrome.html | 59 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 61 insertions(+), 7 deletions(-) diff --git a/addons-host.js b/addons-host.js index c0fbc7bd..19d108d0 100644 --- a/addons-host.js +++ b/addons-host.js @@ -687,9 +687,15 @@ class AddonHost { toolbarMenus: this.getToolbarMenus(), }; } + // `plugin` marks surfaces of a first-class Silent Mode component (manifest + // category "plugin", e.g. Aegis): the chrome pins those to their own dock + // instead of the extensions row. getSidebarPanels() { const out = []; - for (const active of this._active.values()) out.push(...active.sidebarPanels); + for (const active of this._active.values()) { + const plugin = active.manifest.category === "plugin"; + for (const p of active.sidebarPanels) out.push({ ...p, plugin, addonName: active.manifest.name }); + } return out; } // Menu declarations from every active add-on that carries a toolbar-menu @@ -704,6 +710,7 @@ class AddonHost { addonId: active.manifest.id, title: tm.title, icon: tm.icon, + plugin: active.manifest.category === "plugin", items: tm.items.map((it) => ({ id: it.id, label: it.label, icon: it.icon })), }); } diff --git a/chrome.html b/chrome.html index c71be915..f13e18eb 100644 --- a/chrome.html +++ b/chrome.html @@ -345,6 +345,17 @@ uniform fixed width so the row reads as a neat grid regardless of the underlying title length; the strip is 28px tall to fit the roomier chips. */ .bookmarks { display: flex; align-items: center; gap: 6px; padding: 4px 10px 6px; height: 28px; overflow: hidden; } + #bmlist { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; overflow: hidden; } + /* Plug-in dock: first-class Silent Mode components (Aegis) get a labelled + chip at the right end of the favorites row, directly under the Theseus + menu — always visible, never collapsed with the extensions. */ + .plugdock { margin-left: auto; flex: none; display: flex; align-items: center; gap: 4px; padding-left: 8px; } + .plugbtn { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px 0 8px; border-radius: 6px; + font: inherit; font-size: 12px; font-weight: 600; color: var(--mut); cursor: pointer; white-space: nowrap; + border: 1px solid var(--line); background: transparent; } + .plugbtn:hover { background: var(--line2); color: var(--ink); } + .plugbtn.active { background: rgb(from var(--acid) r g b / .12); color: var(--acid); border-color: color-mix(in srgb, var(--acid) 35%, transparent); } + .plugbtn img { display: block; } /* Ctrl+F find-in-page bar. Sits below the address bar (above tabs body), ~32px tall so it's part of the chrome view height like .tordisc / .bcnrbar. syncHeight in the tabs handler picks it up automatically. */ @@ -477,7 +488,7 @@
- +