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>
78 lines
3.9 KiB
JavaScript
78 lines
3.9 KiB
JavaScript
const POPUP_CHOICES = [
|
|
["resources", "Resource warnings", "watch.py: RAM, disk and queue warnings"],
|
|
["mayday", "MAYDAY calls", "radio.py: a MAYDAY on the radio"],
|
|
["dream", "Dream reminder", "kvb-dream: the daily dream reminder"],
|
|
];
|
|
const SNOOZE_HOUR = 3600;
|
|
let notifySaves = Promise.resolve();
|
|
|
|
function notifyFold(part) {
|
|
part.notify = h("div", {class: "notify-sets"});
|
|
part.notifySig = "";
|
|
return h("details", {class: "radio-notify", on: {toggle: (event) => placeStation(event.currentTarget)}},
|
|
h("summary", {title: "Notifications: the hub's channels and the GNOME desktop popups"}, caret(), h("h3", {class: "group-title"}, "Notifications")),
|
|
h("div", {class: "station-body"}, part.notify));
|
|
}
|
|
|
|
/**
|
|
* @param {function(object): object} change the keys to save, built from the
|
|
* settings current when the save runs, so quick clicks queue and none
|
|
* overwrites the one before it.
|
|
*/
|
|
function saveNotify(change) {
|
|
notifySaves = notifySaves.then(async () => {
|
|
if (!await saveSettings({...settings, space: savedSpace(), ...change(settings)})) {
|
|
liveParts("devices").forEach((part) => {
|
|
part.notifySig = "";
|
|
});
|
|
drawNotify();
|
|
}
|
|
});
|
|
}
|
|
|
|
function channelBox(id, label) {
|
|
const box = h("input", {type: "checkbox", name: `channel-${id}`, "data-focus": `channel-${id}`, checked: settings.channels[id]});
|
|
box.addEventListener("change", () => {
|
|
const on = box.checked;
|
|
saveNotify((now) => ({channels: {...now.channels, [id]: on}}));
|
|
});
|
|
return h("label", {class: "check"}, box, label);
|
|
}
|
|
|
|
function popupRow([id, label, hint], now) {
|
|
const entry = settings.popups[id];
|
|
const put = (next) => saveNotify((current) => ({popups: {...current.popups, [id]: next}}));
|
|
const snoozed = entry.on && entry.until > now;
|
|
const state = entry.on ? (snoozed ? "snoozed" : "on") : "off";
|
|
const box = h("input", {type: "checkbox", name: `popup-${id}`, "data-focus": `popup-${id}`, checked: entry.on});
|
|
box.addEventListener("change", () => put({on: box.checked, until: 0}));
|
|
const act = (key, text, title, next) => h("button", {type: "button", class: "btn small ghost", "data-focus": `${key}-${id}`, title: `${label}: ${title}`, on: {click: () => put(next())}}, text);
|
|
return h("div", {class: "notify-source", "data-source": id, "data-state": state},
|
|
h("label", {class: "check", title: hint}, box, label),
|
|
h("span", {class: "muted notify-state"}, snoozed ? `snoozed until ${clock.format(stampOf(entry.until))}` : state),
|
|
snoozed ? act("resume", "Resume", "popups again from now", () => ({on: true, until: 0})) : null,
|
|
entry.on ? act("hour", "1 h", "no popup for 1 hour", () => ({on: true, until: Math.floor(nowSeconds()) + SNOOZE_HOUR})) : null,
|
|
entry.on ? act("morning", "8:00", "no popup until 8 am tomorrow", () => ({on: true, until: tomorrow()})) : null);
|
|
}
|
|
|
|
function drawNotify() {
|
|
const now = nowSeconds();
|
|
const sig = JSON.stringify([settings.channels, settings.popups, Math.floor(now / 60)]);
|
|
for (const part of liveParts("devices")) {
|
|
if (sig === part.notifySig) {
|
|
continue;
|
|
}
|
|
part.notifySig = sig;
|
|
const focused = part.notify.contains(document.activeElement) ? document.activeElement.dataset.focus : "";
|
|
part.notify.replaceChildren(
|
|
h("fieldset", {class: "channels"}, h("legend", {}, "Notification channels"), CHANNEL_CHOICES.map(([id, label]) => channelBox(id, label))),
|
|
h("fieldset", {class: "popups"}, h("legend", {}, "GNOME popups"),
|
|
h("p", {class: "muted"}, "A muted source still reaches the Stream and the radio; only its desktop popup stays away. Your passkey signs every change."),
|
|
POPUP_CHOICES.map((choice) => popupRow(choice, now))));
|
|
const again = focused ? part.notify.querySelector(`[data-focus="${focused}"]`) : null;
|
|
if (again) {
|
|
again.focus();
|
|
}
|
|
}
|
|
}
|