Files
skills/orchestrator/templates/page-legend.js
T
Kevin Veen-BirkenbachandClaude Opus 5.5 0fad1bfae3 feat: hub and skills requirements 032 to 063
Hub: send in the field (032), coherent speak box (033), stream head band (034), Match at full width with its pile (035, 036), Home without the outer box (037), badge to Match (038), rejects that survive a changed or withdrawn card (039), the release card (040), code marks in the review diff (041), why Deny is off (042), the undo window clock (043), widgets without inner boxes (044), the Artifacts head on one line (045), accepting a red gate's risk (046), one code box (047), done rows greyed and folded (048), one control height (049), menus that stay open (050), radio settings in the Device card (051), bubbles beside the modes (052), agent settings on every face and name (053), pin only by menu (054), WASD in Match (055), the flowing card edge (056), Schedules in Controls (057) and the hub poll cost (059).

Skills: the coach leaves for its own repository kevinveenbirkenbach/coach (058; test_install pins its four skills in skills-lock.json and stays red until that repository is published and pinned), hooks and timers start fewer processes (060), council files on hot paths stay bounded and mirror by marker instead of mtime (061), scripts and hooks hand agents less output (062), and block.py builds the commit table and message block in one run (063). Requirement documents 032 to 063 with their implementation amendments.

MEDUSA false positives accepted after kvb-think-criticize (36 lines): MM-SCAN-058 (pla inside replace or plan), JB-SCAN-616/641 (the local clip helper), CODEGEN-SCAN-001 (drop-in paths), CGS-SCAN-029 (systemctl argv from constants), CGS-SCAN-040 (runner poll loop), FLA-SCAN-055 (feedback), WM-SCAN-354, AI-BACKDOOR-006, GENAI-SCAN-1270, B604 (runner shell path for passkey-verified commands), TC004, EXA002, EXA006, EXA010 and WEB-SSRF.

🎯 Fix: 92 %
💥 Break: 8 %
💸 Tokens: 89 %
⏱️ Velocity: –
🛡️ Security: ~100 %
🏆 Score: 95
🚦 Gate: ⛔ break 8 % > 5

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 08:44:15 +00:00

96 lines
3.4 KiB
JavaScript

const LEGEND_PARTS = ".legend, .res-legend, .home-metric > .legend-chips";
const LEGEND_PATHS = {view: "legend.views", tile: "legend.tiles"};
const legendView = {buttons: new WeakMap()};
const legendShown = (path, key) => ViewStore.get(path)[key] !== false;
function legendToggle(path, key) {
const show = !legendShown(path, key);
ViewStore.update(path, (flags) => {
const next = {...flags};
delete next[key];
return show ? next : {...next, [key]: false};
});
}
function legendButton(path, key) {
const button = iconBtn("bi-info-circle", "Legend", "btn small ghost legend-toggle", (event) => {
event.stopPropagation();
legendToggle(path, key);
});
button.dataset.legendKey = key;
button.addEventListener("pointerdown", (event) => event.stopPropagation());
return button;
}
function paintLegend(owner, button, shown) {
const state = shown ? "shown" : "hidden";
if (owner.dataset.legend !== state) {
owner.dataset.legend = state;
}
if (button.getAttribute("aria-pressed") !== String(shown)) {
button.setAttribute("aria-pressed", String(shown));
button.title = `Legend: ${shown ? "shown, press to hide it" : "hidden, press to show it"}`;
}
}
/**
* @param owner - a panel of a view or a Home tile.
* @param path - the view-store key of its kind, legend.views or legend.tiles.
* @param key - its panel id or pin key there.
* @param place - (button) => void putting the button in its spot, or null when the owner holds no legend.
*/
function legendFor(owner, path, key, place) {
const made = legendView.buttons.get(owner);
if (!place) {
if (made) {
made.remove();
legendView.buttons.delete(owner);
}
if (owner.dataset.legend) {
delete owner.dataset.legend;
}
return;
}
const button = made && made.dataset.legendKey === key ? made : legendButton(path, key);
legendView.buttons.set(owner, button);
place(button);
paintLegend(owner, button, legendShown(path, key));
}
const ownOf = (host, selector) => [...host.querySelectorAll(selector)].find((node) => node.closest(Panels.HOSTS) === host) || null;
function legendSlot(host) {
const own = ownOf(host, "[data-legend-slot]") || [...host.children].find((child) => child.classList.contains("legend-row"));
if (own) {
return own;
}
const row = h("div", {class: "legend-row"});
host.prepend(row);
return row;
}
function markLegends() {
for (const host of document.querySelectorAll("#main [data-panel]")) {
if (host.closest(".home-tile")) {
continue;
}
const slot = ownOf(host, LEGEND_PARTS) ? legendSlot(host) : null;
legendFor(host, LEGEND_PATHS.view, host.dataset.panel, slot ? (button) => slot.lastElementChild !== button && slot.append(button) : null);
}
for (const tile of document.querySelectorAll(".home-tile[data-pin]")) {
const open = tile.querySelector(".home-open");
legendFor(tile, LEGEND_PATHS.tile, tile.dataset.pin, tile.querySelector(`.home-body :is(${LEGEND_PARTS})`) ? (button) => open.previousElementSibling !== button && open.before(button) : null);
}
}
function legendBoot() {
new MutationObserver(markLegends).observe(document.body, {childList: true, subtree: true});
ViewStore.on("legend", () => {
markLegends();
drawHome();
drawResources();
});
markLegends();
}