Merge feature/workbench-w1-operator-tasks into unify/skills-20261112

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-12 16:23:36 +00:00
commit eb4a335984
34 files changed
+2449 -111

No files matched your search

+60
View File
@@ -0,0 +1,60 @@
const Diffs = (() => {
"use strict";
const COLLAPSE = 400;
const QUOTE_LIMIT = 2000;
const HUNK = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/;
const KINDS = {"+": "add", "-": "del", " ": "ctx"};
function rows(patch) {
const found = [];
let [old, now] = [0, 0];
String(patch).split("\n").forEach((text, index) => {
const line = index + 1;
const hunk = HUNK.exec(text);
if (hunk) {
[old, now] = [Number(hunk[1]), Number(hunk[2])];
found.push({kind: "hunk", line, old: "", new: "", text});
return;
}
const kind = KINDS[text[0]];
if (!kind) {
return;
}
const row = {kind, line, old: kind === "add" ? "" : old, new: kind === "del" ? "" : now, text: text.slice(1)};
old += kind === "add" ? 0 : 1;
now += kind === "del" ? 0 : 1;
found.push(row);
});
return found;
}
const collapsed = (file) => file.additions + file.deletions > COLLAPSE;
function span(numbers) {
const known = numbers.filter((value) => Number.isInteger(value) && value > 0);
return known.length ? [Math.min(...known), Math.max(...known)] : null;
}
function lineSpan(text, quote) {
const full = String(text);
const at = full.indexOf(quote);
if (!quote || at < 0) {
return [1, full.split("\n").length];
}
const from = full.slice(0, at).split("\n").length;
return [from, from + quote.split("\n").length - 1];
}
function quoted(text) {
const clean = String(text).trim();
return clean.length > QUOTE_LIMIT ? `${clean.slice(0, QUOTE_LIMIT)}…` : clean;
}
const feedback = (ref, path, from, to, quote, words) => `Feedback on ${ref} ${path}:${from}-${to}: "${quoted(quote)}" ${String(words).trim()}`;
const feedbackOf = (messages, ref) => messages.filter((message) => String(message.text).startsWith(`Feedback on ${ref} `));
return {COLLAPSE, QUOTE_LIMIT, rows, collapsed, span, lineSpan, quoted, feedback, feedbackOf};
})();
if (typeof module === "object" && module.exports) {
module.exports = Diffs;
}
+7 -1
View File
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>{% if state.badges.inbox %}({{ state.badges.inbox }}) {% endif %}Agent Orchestrator</title>
<title>{% if state.badges.tasks %}({{ state.badges.tasks }}) {% endif %}Agent Orchestrator</title>
<style nonce="{{ nonce }}">
:root {
--sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
@@ -413,6 +413,8 @@ pre.notes { margin: 0; padding: 8px 10px; background: var(--sunken); border-radi
{% include "style-tasks.css" %}
{% include "style-bubbles.css" %}
{% include "style-diff.css" %}
</style>
</head>
<body>
@@ -455,6 +457,8 @@ pre.notes { margin: 0; padding: 8px 10px; background: var(--sunken); border-radi
{% include "bubbles.js" %}
{% include "diffs.js" %}
{% include "nav.js" %}
{% include "popup.js" %}
@@ -502,6 +506,8 @@ pre.notes { margin: 0; padding: 8px 10px; background: var(--sunken); border-radi
{% include "page-review.js" %}
{% include "page-diff.js" %}
{% include "page-filters.js" %}
{% include "page-stream.js" %}
+11 -3
View File
@@ -1,7 +1,8 @@
const Nav = (() => {
"use strict";
const TABS = [["stream", "Stream"], ["agents", "Agents"], ["artifacts", "Artifacts"], ["tasks", "Tasks"]];
const SUBS = {stream: [["inbox", "Inbox"], ["rules", "Firewall"]]};
const SUBS = {stream: [["rules", "Firewall"]]};
const PANES = {inbox: ["tasks", "operator"]};
const VIEWS = [["orbit", "Orbit"], ["chord", "Chord"], ["swimlane", "Swimlane"], ["tree", "Tree"], ["3d", "3D"]];
const TASK_VIEWS = [["list", "List"], ["board", "Board"], ["rasci", "RASCI"], ["gantt", "Gantt"], ["burn", "Burndown and burnup"], ["3d", "3D"]];
const OWN = {agents: [["hierarchy", "Hierarchy"]]};
@@ -15,10 +16,13 @@ const Nav = (() => {
const known = (screen, view) => viewsOf(screen).some(([id]) => id === view);
function tabOf(screen) {
return Object.keys(SUBS).find((tab) => SUBS[tab].some(([id]) => id === screen)) || screen;
return Object.hasOwn(PANES, screen) ? PANES[screen][0] : Object.keys(SUBS).find((tab) => SUBS[tab].some(([id]) => id === screen)) || screen;
}
function hashOf(screen, view) {
if (Object.hasOwn(PANES, screen)) {
return `#${PANES[screen].join("/")}`;
}
return tabOf(screen) === screen ? (view ? `#${screen}/${view}` : `#${screen}`) : `#${tabOf(screen)}/${screen}`;
}
@@ -27,6 +31,10 @@ const Nav = (() => {
if (head === "stream" && sub === "radio") {
return {screen: "stream", view: null, redirect: "#stream", spot: true};
}
const pane = Object.keys(PANES).find((screen) => PANES[screen][0] === head && PANES[screen][1] === sub);
if (pane || (head === "stream" && sub === "inbox")) {
return {screen: pane || "inbox", view: null, redirect: pane ? null : hashOf("inbox", null)};
}
if (Object.hasOwn(OLD, head)) {
const [screen, fallback] = OLD[head];
const view = known(screen, sub) ? sub : fallback;
@@ -41,7 +49,7 @@ const Nav = (() => {
return {screen: "stream", view: null, redirect: null};
}
return {TABS, SUBS, VIEWS, TASK_VIEWS, ICONS, viewsOf, route, hashOf, tabOf};
return {TABS, SUBS, PANES, VIEWS, TASK_VIEWS, ICONS, viewsOf, route, hashOf, tabOf};
})();
if (typeof module === "object" && module.exports) {
module.exports = Nav;
+2
View File
@@ -27,6 +27,8 @@
document.addEventListener("keydown", context, {once: true});
document.addEventListener("pointerdown", unlock);
document.addEventListener("keydown", keyboard);
document.addEventListener("contextmenu", feedbackMenu);
document.addEventListener("selectionchange", feedbackButton);
document.addEventListener("visibilitychange", refresh);
window.addEventListener("focus", refresh);
window.addEventListener("hashchange", apply);
+1 -1
View File
@@ -72,7 +72,7 @@
direct: [[740, 0, 0.2]],
radio: [[520, 0, 0.07]],
};
const KEYS = [["Ctrl+K", "Commands, views, agents and AI command"], ["1 · 2 · 3 · 4", "Stream · Agents · Artifacts · Tasks"], ["j / k", "Inbox: next / previous entry"], ["x", "Inbox: select entry"], ["a", "Inbox: grant entry (3 s to undo)"], ["Enter", "Inbox: open entry"], ["/", "Search the stream"], ["h", "Look at the sky: drag turns the view, wheel or two fingers zoom, Esc ends"], ["Arrows · + / − · 0", "Sky (focused): turn · zoom · reset"], ["Drag · wheel", "3D: turn, right drag pans, wheel zooms"],["🎙 hold", "Voice input into the agent field or the command line, never sent automatically"], ["?", "This help"], ["Esc", "Close"]];
const KEYS = [["Ctrl+K", "Commands, views, agents and AI command"], ["1 · 2 · 3 · 4", "Stream · Agents · Artifacts · Tasks"], ["j / k", "Waits on Operator: next / previous entry"], ["x", "Waits on Operator: select entry"], ["a", "Waits on Operator: grant entry (3 s to undo)"], ["Enter", "Waits on Operator: open entry"], ["f", "Feedback on the selected lines of a diff or a command"], ["/", "Search the stream"], ["h", "Look at the sky: drag turns the view, wheel or two fingers zoom, Esc ends"], ["Arrows · + / − · 0", "Sky (focused): turn · zoom · reset"], ["Drag · wheel", "3D: turn, right drag pans, wheel zooms"],["🎙 hold", "Voice input into the agent field or the command line, never sent automatically"], ["?", "This help"], ["Esc", "Close"]];
const calm = window.matchMedia("(prefers-reduced-motion: reduce)");
const relative = new Intl.RelativeTimeFormat("en", {numeric: "auto"});
const absolute = new Intl.DateTimeFormat("en-GB", {dateStyle: "medium", timeStyle: "short"});
+161
View File
@@ -0,0 +1,161 @@
const DIFF_TONES = {A: "ok", M: "info", D: "bad", R: "violet", B: "neutral"};
const diffView = {cache: new Map(), version: 0, float: null, picked: null, timer: 0};
function diffOf(item) {
if (!item || typeof item.diff !== "number" || !["review", "ask"].includes(item.kind)) {
return null;
}
const key = keyOf(item);
if (!diffView.cache.has(key)) {
diffView.cache.set(key, "loading");
fetch(`/api/diffs/${item.kind}/${encodeURIComponent(item.id)}`, {cache: "no-store"})
.then((response) => (response.ok ? response.json() : {diff: null}))
.then((data) => diffView.cache.set(key, Array.isArray(data.diff) ? data.diff : null))
.catch(() => diffView.cache.set(key, null))
.then(() => {
diffView.version += 1;
drawInbox();
drawStream();
});
}
return diffView.cache.get(key);
}
function patchRow(row) {
const number = row.new || row.old || null;
if (row.kind === "hunk") {
return h("tr", {class: "hunk"}, h("td", {colspan: 3}), h("td", {class: "code"}, row.text));
}
return h("tr", {class: row.kind, "data-line": number},
h("td", {class: "num"}, row.old), h("td", {class: "num"}, row.new), h("td", {class: "sign"}, SIGNS[row.kind] || " "), h("td", {class: "code"}, row.text));
}
function diffBlock(file) {
const tone = DIFF_TONES[file.status] || "neutral";
const head = [h("span", {class: "letter", "data-tone": tone}, file.status), h("code", {class: "path"}, file.path),
file.mode && file.mode !== "100644" ? h("code", {class: "mode", title: `mode: ${file.mode}`}, file.mode) : null, h("span", {class: "spacer"}),
file.note ? h("span", {class: "note", title: file.note}, icon("bi-eye-slash"), file.note) : null,
file.status === "B" ? icon("bi-file-earmark-binary") : h("span", {class: "stat"}, h("span", {class: "add"}, `+${file.additions}`), h("span", {class: "del"}, `-${file.deletions}`))];
if (file.status === "B" || !file.patch) {
return h("section", {class: "diff-file", "data-path": file.path, "data-status": file.status, "data-patch": "none"}, h("div", {class: "diff-head"}, head));
}
const table = h("table", {class: "diff"}, h("tbody", {}, Diffs.rows(file.patch).map(patchRow)));
return h("section", {class: "diff-file", "data-path": file.path, "data-status": file.status},
h("details", {open: !Diffs.collapsed(file)}, h("summary", {class: "diff-head"}, head), h("div", {class: "diff-scroll"}, table)));
}
function diffBlocks(item) {
const found = diffOf(item);
if (found === null || found === undefined) {
return null;
}
if (found === "loading") {
return h("p", {class: "muted"}, "…");
}
return h("div", {class: "diff-files", "aria-label": `Diff: ${found.length}`}, found.map(diffBlock));
}
function feedbackList(ref) {
const sent = Diffs.feedbackOf(state.messages, ref);
return sent.length ? h("ul", {class: "feedback-list", "aria-label": `Feedback: ${sent.length}`}, sent.map((message) => h("li", {}, icon("bi-chat-left-text"), h("span", {class: "text"}, message.text), when(message.created_ts)))) : null;
}
function selectionFeedback() {
const selection = window.getSelection();
if (!selection || selection.isCollapsed || !selection.rangeCount || !selection.toString().trim()) {
return null;
}
const range = selection.getRangeAt(0);
const elementOf = (node) => (node instanceof Element ? node : node.parentElement);
const region = elementOf(range.startContainer) && elementOf(range.startContainer).closest("[data-path]");
const card = region && region.closest("[data-ref]");
if (!card || !card.dataset.to || !elementOf(range.endContainer) || elementOf(range.endContainer).closest("[data-path]") !== region) {
return null;
}
const quote = selection.toString();
const code = region.querySelector("code");
const lines = region.classList.contains("command") && code
? Diffs.lineSpan(code.textContent, quote)
: Diffs.span([...region.querySelectorAll("tr[data-line]")].filter((row) => range.intersectsNode(row)).map((row) => Number(row.dataset.line)));
if (!lines) {
return null;
}
return {ref: card.dataset.ref, to: card.dataset.to, path: region.dataset.path, from: lines[0], until: lines[1], quote, rect: range.getBoundingClientRect()};
}
function feedbackSheet(picked) {
hideFeedback();
const words = h("textarea", {class: "field", rows: 4, "aria-label": "Feedback", title: "Feedback"});
const send = iconBtn("bi-send", "Send feedback", "btn primary", async () => {
if (!words.value.trim()) {
words.focus();
return;
}
send.disabled = true;
const sent = await radioSend({to: picked.to, text: Diffs.feedback(picked.ref, picked.path, picked.from, picked.until, picked.quote, words.value), upload: "", cls: "post", voice: ""});
send.disabled = false;
if (sent) {
closeSheet();
}
}, `Send feedback: a post to ${picked.to}`);
openSheet("Feedback", [
h("div", {class: "who"}, icon("bi-chat-left-text"), person(picked.to), h("code", {}, `${picked.path}:${picked.from}-${picked.until}`)),
h("pre", {class: "notes"}, Diffs.quoted(picked.quote)),
words,
h("div", {class: "actions"}, h("span", {class: "spacer"}), send)], false);
words.focus();
}
function hideFeedback() {
if (diffView.float) {
diffView.float.hidden = true;
}
diffView.picked = null;
}
function showFeedback(picked, x, y, menu) {
if (!diffView.float) {
diffView.float = h("div", {class: "feedback-float", hidden: true},
h("button", {type: "button", class: "btn small primary icon-only", ...named("Feedback", "Feedback (f): a post with the selected lines to the requesting agent"), on: {
mousedown: (event) => event.preventDefault(),
click: () => diffView.picked && feedbackSheet(diffView.picked),
}}, icon("bi-chat-left-text")));
document.body.append(diffView.float);
}
diffView.picked = picked;
diffView.float.setAttribute("role", menu ? "menu" : "toolbar");
diffView.float.firstChild.setAttribute("role", menu ? "menuitem" : "button");
diffView.float.style.left = `${Math.max(Math.min(x, window.innerWidth - 44), 4)}px`;
diffView.float.style.top = `${Math.max(Math.min(y, window.innerHeight - 44), 4)}px`;
diffView.float.hidden = false;
}
function feedbackButton() {
window.clearTimeout(diffView.timer);
diffView.timer = window.setTimeout(() => {
const picked = selectionFeedback();
if (picked) {
showFeedback(picked, picked.rect.right + 4, picked.rect.bottom + 4, false);
} else if (!diffView.float || !diffView.float.contains(document.activeElement)) {
hideFeedback();
}
}, 120);
}
function feedbackMenu(event) {
const picked = selectionFeedback();
if (!picked || !(event.target instanceof Element) || !event.target.closest("[data-path]")) {
return;
}
event.preventDefault();
showFeedback(picked, event.clientX, event.clientY, true);
diffView.float.firstChild.focus();
}
function feedbackKey() {
const picked = selectionFeedback();
if (picked) {
feedbackSheet(picked);
}
return Boolean(picked);
}
+23 -20
View File
@@ -152,32 +152,35 @@
function inboxItem(item, index) {
const red = item.kind === "review" && item.gate !== "pass";
const classes = ["item", isGreen(item) ? "green" : "", red ? "red" : "", item.held ? "held" : "", index === ui.cursor ? "cursor" : ""].filter(Boolean).join(" ");
const commanded = item.kind === "ask" || item.kind === "operator";
const classes = ["item", "entry", `k-${item.kind}`, "waiting", isGreen(item) ? "green" : "", red ? "red" : "", item.held ? "held" : "", index === ui.cursor ? "cursor" : ""].filter(Boolean).join(" ");
const box = h("input", {type: "checkbox", "aria-label": `Select ${item.title}`, checked: ui.selected.has(keyOf(item)), disabled: !pickable(item), on: {change: () => toggle(item, true)}});
return h("li", {class: classes, "data-index": index},
return h("li", {class: classes, "data-index": index, "data-ref": keyOf(item), "data-to": item.to || null},
box,
h("div", {},
h("div", {class: "head-row"},
pill(ITEM_LABELS[item.kind], KIND_TONES[item.kind]),
item.kind === "review" ? pill(item.gate === "pass" ? "Gate green" : "Gate red", item.gate === "pass" ? "ok" : "bad") : null,
item.warnings.map((warning) => pill(warning, "bad")),
item.pinned ? pill("pinned", "violet") : null,
item.until ? pill(`until ${absolute.format(stampOf(item.until))}`, "neutral") : null,
h("span", {class: "spacer"}), when(item.ts)),
h("button", {type: "button", class: "linkish", title: "Open", on: {click: () => openItem(item)}}, item.title),
item.agent ? h("div", {class: "muted"}, "from ", person(item.agent)) : null,
h("div", {class: "msg-meta"},
when(item.ts),
pill(ITEM_LABELS[item.kind], KIND_TONES[item.kind]),
item.kind === "review" ? pill(item.gate === "pass" ? "Gate green" : "Gate red", item.gate === "pass" ? "ok" : "bad") : null,
item.warnings.map((warning) => pill(warning, "bad")),
item.pinned ? pill("pinned", "violet") : null,
item.until ? pill(`until ${absolute.format(stampOf(item.until))}`, "neutral") : null),
h("div", {class: "entry-body"},
h("div", {class: "route"},
h("button", {type: "button", class: "linkish headline", title: "Open", on: {click: () => openItem(item)}}, item.kind === "operator" ? item.id : item.kind === "ask" ? item.title.split(": ")[0] : item.title),
item.agent ? [face(item.agent, false), person(item.agent)] : null),
item.kind === "review" ? h("div", {class: "muted"}, item.detail, item.score ? ` · ${item.score}` : "") : null,
item.kind === "operator" && item.title !== item.command ? h("div", {class: "command"}, h("code", {}, item.command)) : null,
item.kind === "operator" ? h("div", {class: "muted"}, `in ${dash(item.directory)}`, item.detail && item.detail !== "-" ? ` · ${item.detail}` : "") : null,
commanded ? h("div", {class: "command", "data-path": item.directory || "-"}, h("code", {}, item.command), copyButton(item.command)) : null,
commanded ? h("span", {class: "muted"}, `in ${dash(item.directory)}`) : null,
item.kind === "operator" && item.detail && item.detail !== "-" ? h("p", {class: "text reason"}, item.detail) : null,
diffBlocks(item),
item.job ? consoleOf(item.job) : null,
item.kind === "rule" ? ruleRequestBody(item) : null,
item.kind === "ask" ? h("div", {class: "muted"}, `in ${dash(item.directory)}`) : null,
item.kind === "decision" ? h("div", {class: "options"}, item.options.map((option) => h("button", {
type: "button", class: `option${option.label === item.recommended ? " recommended" : ""}`, title: `${option.label}: your passkey signs this answer, a post to ${item.agent}`, disabled: item.held, on: {click: () => chooseOne(item, option.label)},
}, h("strong", {}, option.label), option.description ? h("span", {}, option.description) : null))) : null),
h("div", {class: "item-actions"},
}, h("strong", {}, option.label), option.description ? h("span", {}, option.description) : null))) : null,
feedbackList(keyOf(item))),
h("div", {class: "item-actions line-actions"},
actionsFor(item),
item.kind === "operator" ? copyButton(item.command) : null,
h("span", {class: "spacer"}),
iconBtn("bi-hourglass-split", "1 h", "btn small ghost", () => mark(item, nowSeconds() + 3600, item.pinned), "1 h: snooze for one hour"),
iconBtn("bi-sunrise", "tomorrow", "btn small ghost", () => mark(item, tomorrow(), item.pinned), "tomorrow: snooze until 8 am tomorrow"),
@@ -202,7 +205,7 @@
ui.selected.delete(key);
}
}
const sig = JSON.stringify([items.map(withoutOutput), [...ui.selected], ui.cursor, ui.snoozed, ui.busy, Math.floor(nowSeconds() / 60)]);
const sig = JSON.stringify([items.map(withoutOutput), [...ui.selected], ui.cursor, ui.snoozed, ui.busy, Math.floor(nowSeconds() / 60), diffView.version, state.messages.map((message) => message.id)]);
if (sig === inboxSig) {
repaintConsoles(items);
return;
@@ -221,7 +224,7 @@
const deny = h("button", {type: "button", class: "btn small danger", ...named(`Deny selection (${deniable.length})`, `Deny selection (${deniable.length}): each requester gets its denial by post, one passkey signature, 3 s to undo`), disabled: !deniable.length || ui.busy, on: {click: () => bulk(chosen, "Deny selection", true)}}, icon("bi-x-square"), String(deniable.length));
const all = h("button", {type: "button", class: "btn small primary", ...named(`Grant all green (${green.length})`), disabled: !green.length || ui.busy, on: {click: () => bulk(green, "Grant all green", false)}}, icon("bi-check2-all"), String(green.length));
inboxDom.replaceChildren(
h("div", {class: "inbox-head"}, h("h2", {class: "group-title"}, "Inbox", counter(waitingCount())), h("span", {class: "spacer"}),
h("div", {class: "inbox-head"}, h("h2", {class: "group-title"}, "Waits on Operator", counter(waitingCount())), h("span", {class: "spacer"}),
hidden ? h("label", {class: "check"}, snoozed, `${hidden} snoozed`) : null),
h("div", {class: "inbox-actions"}, choose, deny, all),
onLocalhost() ? "" : h("p", {class: "muted"}, "The passkey signs grants only under ", localLink()),
+3 -1
View File
@@ -1,6 +1,6 @@
function helpSheet() {
openSheet("Keyboard shortcuts", [h("dl", {class: "keys"}, KEYS.map(([key, text]) => [h("dt", {}, key), h("dd", {}, text)])),
h("p", {class: "muted"}, "Control room: full screen with large type for a second screen, under ⚙ Ambience. j, k, x, a and Enter work in the inbox.")], false);
h("p", {class: "muted"}, "Control room: full screen with large type for a second screen, under ⚙ Ambience. j, k, x, a and Enter work in Waits on Operator.")], false);
}
function overlayOpen() {
@@ -68,6 +68,8 @@
if (current && !current.held) {
approveOne(current);
}
} else if (event.key === "f" && feedbackKey()) {
event.preventDefault();
} else if (event.key === "Enter" && current && target === document.body) {
event.preventDefault();
openItem(current);
+3 -3
View File
@@ -60,7 +60,7 @@
function render(force) {
for (const [id, {button}] of navButtons) {
button.setAttribute("aria-current", ui.screen === id ? "page" : "false");
button.setAttribute("aria-current", ui.screen === id || (!navButtons.has(ui.screen) && Nav.tabOf(ui.screen) === id) ? "page" : "false");
}
const sig = signature();
if (force || drawn.screen !== ui.screen || drawn.sig !== sig) {
@@ -98,13 +98,13 @@
const {badge} = navButtons.get(id);
badge.textContent = String(count);
badge.hidden = count === 0;
badge.className = `badge${id === "inbox" && count ? " urgent" : ""}`;
badge.className = `badge${id === "tasks" && count ? " urgent" : ""}`;
}
const banner = document.getElementById("mayday");
const silence = state.silence;
banner.hidden = !silence;
banner.replaceChildren(...(silence ? [h("p", {class: "text"}, `MAYDAY · ${dash(silence.by)}: ${silence.text}`), iconBtn("bi-x-octagon", "cancel", "btn small", () => confirmAct("clear-mayday", []), "cancel: end the mayday (radio.py clear)")] : []));
document.title = `${state.badges.inbox ? `(${state.badges.inbox}) ` : ""}Agent Orchestrator`;
document.title = `${state.badges.tasks ? `(${state.badges.tasks}) ` : ""}Agent Orchestrator`;
window.setTimeout(measure, 0);
}
+4 -2
View File
@@ -112,7 +112,7 @@
}
if (entry.kind === "ask" || entry.kind === "operator") {
const where = entry.kind === "ask" ? entry.ref.cwd : entry.ref.directory;
return [h("div", {class: "command"}, h("code", {}, entry.kind === "ask" ? entry.text : entry.title), copyButton(entry.kind === "ask" ? entry.text : entry.title)), h("span", {class: "muted"}, `in ${dash(where)}`), entry.kind === "operator" && entry.text !== "-" ? h("p", {class: "text"}, entry.text) : null];
return [h("div", {class: "command", "data-path": where || "-"}, h("code", {}, entry.kind === "ask" ? entry.text : entry.title), copyButton(entry.kind === "ask" ? entry.text : entry.title)), h("span", {class: "muted"}, `in ${dash(where)}`), entry.kind === "operator" && entry.text !== "-" ? h("p", {class: "text"}, entry.text) : null];
}
if (entry.kind === "review") {
return [entry.text ? h("pre", {class: "notes"}, entry.text) : null, h("div", {class: "line-actions"}, iconBtn("bi-eye", "View diff", "btn small soft", () => reviewSheet(entry.ref.id)))];
@@ -134,11 +134,13 @@
const renamed = entry.now && entry.now !== entry.agent ? h("span", {title: `now: ${entry.now}`}, person(entry.agent)) : person(entry.agent);
const who = entry.agent ? [face(entry.agent, false), renamed] : entry.session ? h("strong", {title: entry.session}, entry.session.slice(0, 8)) : null;
const headline = entry.kind === "transcript" || entry.kind === "ask" || entry.kind === "operator" ? null : h("span", {class: "headline"}, entry.title);
return h("li", {class: `entry k-${entry.kind}${entry.waiting ? " waiting" : ""}${alarm ? " alarm" : ""}`},
return h("li", {class: `entry k-${entry.kind}${entry.waiting ? " waiting" : ""}${alarm ? " alarm" : ""}`, "data-ref": item ? keyOf(item) : null, "data-to": item && item.to ? item.to : null},
h("div", {class: "msg-meta"}, when(entry.ts), kindPill(entry), extras(entry)),
h("div", {},
h("div", {class: "route"}, who, entry.sub ? h("button", {type: "button", class: "linkish muted", on: {click: () => focusSub(entry.session, entry.sub)}}, `› Subagent ${entry.sub.slice(0, 12)}`) : null, entry.kind === "ask" ? h("strong", {}, entry.title) : null, headline),
body(entry),
item ? diffBlocks(item) : null,
item ? feedbackList(keyOf(item)) : null,
item ? h("div", {class: "line-actions"}, actionsFor(item)) : null));
}
+23
View File
@@ -0,0 +1,23 @@
.inbox-list > .item.entry { grid-template-columns: auto 150px minmax(0, 1fr); align-items: start; padding: var(--sp-3); border: 1px solid var(--line); }
.inbox-list > .item.entry.waiting { box-shadow: inset 3px 0 0 var(--warn); }
.inbox-list > .item.entry.green { box-shadow: inset 3px 0 0 var(--ok); }
.inbox-list > .item.entry.red { box-shadow: inset 3px 0 0 var(--bad); }
.inbox-list > .item.entry > .entry-body { display: grid; gap: var(--sp-1); min-width: 0; }
.inbox-list > .item.entry .reason { margin: 0; }
@media (max-width: 640px) {
.inbox-list > .item.entry { grid-template-columns: auto minmax(0, 1fr); }
.inbox-list > .item.entry > .entry-body { grid-column: 1 / -1; }
}
.diff-files { display: grid; gap: var(--sp-2); min-width: 0; margin-top: var(--sp-1); }
.diff-file { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.diff-file > .diff-head, .diff-file summary.diff-head { padding: 6px 10px; cursor: default; }
.diff-file summary.diff-head { cursor: pointer; list-style: none; }
.diff-file summary.diff-head::-webkit-details-marker { display: none; }
.diff-file .diff-scroll { max-height: min(60vh, 640px); }
.diff-file .diff-head .mode { color: var(--warn); font-size: var(--fs-xs); }
.diff-file .diff-head .note .bi { margin-right: 4px; vertical-align: -2px; }
.diff-file .diff-head .note { display: inline-flex; align-items: center; color: var(--warn); font-size: var(--fs-xs); }
.feedback-list { display: grid; gap: 4px; margin: var(--sp-1) 0 0; padding: 0; list-style: none; }
.feedback-list li { display: flex; align-items: baseline; gap: 6px; padding: 4px 8px; border-radius: 8px; background: var(--info-soft); font-size: var(--fs-sm); }
.feedback-list .text { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.feedback-float { position: fixed; z-index: 40; padding: 2px; border-radius: 10px; background: var(--glass-card); box-shadow: var(--shadow); }