feat(orchestrator): hub requirements 066 to 082 and 084

Radio footer, rules page, schedules editor (System timers and Claude
tasks through signed runner jobs), account usage bar, usage explorer
with a streamed usage.jsonl, queue Controls tab and override, running
tasks on the board, stale task prune with the generic dial, greyed card
stamps, commit-tree diffs from the runner preview, VS Code path links,
expired asks and decisions that stay as EXPIRED cards (asks keyed by a
call digest; an async PostToolUse hook closes those answered in the
terminal), the Match refresh hourglass, attachments by paste, drop and
paperclip in every text field (page CSP gains img-src blob: for the
thumbnails) and the limits board with profiles and a passkey to loosen.
Fixes: one red accept on a red-gate commit and no release while a risk
is open, the send bar footer segments share one height, the mic button
survives a redraw, new Match cards queue before the release card.

E2E specs were still running at commit time (operator order); their
failures follow as separate fixes.

🎯 Fix: 88 %
💥 Break: 8 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 81
🚦 Gate: ⛔ fix 88 % < 90, break 8 % > 5 (committed on the operator's word)

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-27 19:05:38 +00:00
1 parent dc0d578eca
commit f356083a24
149 files changed
+10646 -963

No files matched your search

+103
View File
@@ -0,0 +1,103 @@
const Attachments = (() => {
"use strict";
const MARK = "📎 ";
const WARN = "⚠️ ";
const BROWSER_PASTE = "image.png";
const two = (number) => String(number).padStart(2, "0");
const pathLine = (path) => `${MARK}${path}`;
const placeholder = (name) => `${MARK}uploading ${name}…`;
/**
* @param {string} name the file name.
* @param {string} reason why the upload failed, on one or more lines.
* @returns {string} one line naming the file and the reason; it carries no path.
*/
function failed(name, reason) {
const said = String(reason).replace(/\s+/g, " ").trim().slice(0, 200);
return `${WARN}${name}: ${said || "upload failed"}`;
}
/**
* @param {Date} when the moment of the paste.
* @returns {string} YYYYMMDD-HHMMSS in local time.
*/
function stamp(when) {
return `${when.getFullYear()}${two(when.getMonth() + 1)}${two(when.getDate())}-${two(when.getHours())}${two(when.getMinutes())}${two(when.getSeconds())}`;
}
/**
* @param {File} file a file from the clipboard, read for its name and type.
* @param {Date} when the moment of the paste.
* @returns {string} the file's own name, or paste-<stamp>.<ext> for an image without one.
*/
function pastedName(file, when) {
// Trip-wire: Chromium and Firefox name every pasted screenshot "image.png", so that name counts as none.
const own = file.name && file.name !== BROWSER_PASTE ? file.name : "";
if (own) {
return own;
}
const kind = String(file.type || "").split("/");
const ext = kind[0] === "image" && /^[a-z0-9]+/.test(kind[1] || "") ? kind[1].match(/^[a-z0-9]+/)[0] : "png";
return `paste-${stamp(when)}.${ext}`;
}
/**
* @param {string} value the text of the field.
* @param {number} start the start of its selection.
* @param {number} end the end of its selection.
* @param {string} line the line to insert in place of the selection.
* @param {string} gap "\n" for a textarea, " " for a one-line field.
* @returns {Object} {value, caret}: value with line as its own line (or word) at the selection, the caret right after it.
*/
function placed(value, start, end, line, gap) {
const before = value.slice(0, start);
const after = value.slice(end);
const lead = before && !before.endsWith(gap) ? gap : "";
const tail = after && !after.startsWith(gap) ? gap : "";
return {value: `${before}${lead}${line}${tail}${after}`, caret: before.length + lead.length + line.length};
}
/**
* @param {string} value the text of the field.
* @param {string} from the line to replace, such as a placeholder.
* @param {string} to its replacement.
* @param {number} caret the caret before the swap.
* @returns {Object} {value, caret, found}: value with the first from replaced, the caret moved with the text after it.
*/
function swapped(value, from, to, caret) {
const at = value.indexOf(from);
if (at < 0) {
return {value, caret, found: false};
}
const moved = caret >= at + from.length ? caret + to.length - from.length : Math.min(caret, at + to.length);
return {value: `${value.slice(0, at)}${to}${value.slice(at + from.length)}`, caret: moved, found: true};
}
/**
* @param {string} value the text of a textarea.
* @returns {string[]} the host path of every path line, in text order.
*/
function paths(value) {
return value.split("\n").filter((line) => line.startsWith(`${MARK}/`)).map((line) => line.slice(MARK.length));
}
/**
* @param {string} value the text of a textarea.
* @param {string} path the host path whose line goes.
* @returns {string} value without the first line that is exactly the path line; other lines stay as they are.
*/
function removed(value, path) {
const lines = value.split("\n");
const at = lines.indexOf(pathLine(path));
return at < 0 ? value : [...lines.slice(0, at), ...lines.slice(at + 1)].join("\n");
}
const baseName = (path) => path.slice(path.lastIndexOf("/") + 1);
const pictured = (type) => String(type || "").startsWith("image/");
return {pathLine, placeholder, failed, stamp, pastedName, placed, swapped, paths, removed, baseName, pictured};
})();
if (typeof module === "object" && module.exports) {
module.exports = Attachments;
}