feat(hub): deny reason chips, patterned Match card heads and copyable place pills

The deny sheet shows the last five distinct deny reasons as chips (recent_reasons in denying.py, served as reasons in /api/state); a click fills the reason field. Match cards get a per-card pattern (dots, stripes, waves, grid, rings) and a two-hue gradient head, the repo, branch and worktree become copyable pills, Match keeps the last comments and peeks in local storage, and Home gets a slot label.

Rebased from its lane base 2754568 onto 96d332a: the scan copy's diff against 2aea6d1 would have reverted the release-flash fix, so the bundle was re-exported against 2754568; the one conflict in page-match.js keeps matchView.epoch next to the new COMMENTS_KEPT and PATTERNS. node --check passes.

Tests: test_deny_reason_chips_e2e plus Match review and waiting e2e and test_hub_deny, test_hub_state updates. Written, not run: the full suite runs once on master after all bundles (operator order).

Security: MEDUSA over the staged tree on master: 100, no findings; index.html.j2, style-home.css and style-match.css are not covered and were read by hand (style rules only, no url or import).

🎯 Fix: 90 %
💥 Break: 5 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 86
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

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-22 12:34:05 +00:00
1 parent 96d332a7cd
commit f95196ca82
15 files changed
+369 -24

No files matched your search

+20
View File
@@ -15,6 +15,26 @@ NOTED = ("review",)
DENY_KEYS = ("channel", "reason", "to")
DENY_CHANNELS = {**DIRECT, **{name: words for name, words in TO_ALL.items() if name != "mayday"}}
REASON_LIMIT = 2000
REASONS_SHOWN = 5
def recent_reasons(messages: list[dict]) -> list[str]:
"""Args:
messages: the stored messages; a denial's signed item holds its
reason.
Returns:
the last REASONS_SHOWN distinct non-empty denial reasons by
created_ts, newest first.
"""
recent: list[str] = []
for message in sorted(messages, key=lambda message: message["created_ts"], reverse=True):
reason = message["denial"]["reason"] if message.get("denial") else ""
if reason and reason not in recent:
recent.append(reason)
if len(recent) == REASONS_SHOWN:
break
return recent
def denial_note(raw: dict, requester: str) -> dict:
+4 -1
View File
@@ -15,6 +15,7 @@ from .council import (
silence_of,
)
from .crons import queue_entries
from .denying import recent_reasons
from .engines import pitch_of, sound_of
from .errors import ToolError
from .events import KINDS, VIEWS
@@ -137,6 +138,7 @@ class View:
order = stored_order(self.council / AGENT_ORDER)
rows = task_rows(tasks, queue, self.tree.get())
chain = grant_order(queue_chain(queue, tasks, order, now), queue_jobs)
stored = self.messages.listed()
return {
"settings": settings,
"media": media_origins(settings),
@@ -159,7 +161,8 @@ class View:
"reviews": [row for row in map(review_row, self.reviews.pending()) if row["created_ts"] <= end],
"asks": [ask_row(ask, names) for ask in self.asks.pending() if ask["expires"] > now and ask["created_ts"] <= end],
"decisions": [decision_row(decision) for decision in self.decisions.pending() if decision["created_ts"] <= end],
"messages": [{**message_row(message), **read_of(inlined, epoch(message.get("relay_ts")))} for message in self.messages.listed() if begin <= message["created_ts"] <= end],
"messages": [{**message_row(message), **read_of(inlined, epoch(message.get("relay_ts")))} for message in stored if begin <= message["created_ts"] <= end],
"reasons": recent_reasons(stored),
"operator": operator_rows(tasks),
"register": register_rows(tasks),
"tasks": rows,
+1
View File
@@ -151,6 +151,7 @@ pre.notes { max-height: 260px; margin: 12px 0 0; padding: 10px 12px; overflow: a
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.preset { font-weight: 650; }
.reason-chips .chip { max-width: 100%; }
.chip .x { padding: 0 2px; border: 0; background: none; color: inherit; cursor: pointer; }
.split { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
+1 -1
View File
@@ -37,7 +37,7 @@
const MOVE = 2000;
const RELAYOUT = 60000;
const SESSION_ID = /^[A-Za-z0-9_-]{1,128}$/;
const STORE = {views: "kvb-orchestrator.views", status: "kvb-orchestrator.status"};
const STORE = {views: "kvb-orchestrator.views", status: "kvb-orchestrator.status", comments: "kvb-orchestrator.match-comments", peeks: "kvb-orchestrator.match-peeks"};
const PRESENCE = {
working: ["Working", "bi-gear-fill", "info"],
alive: ["Alive", "bi-heart-pulse-fill", "ok"],
+24
View File
@@ -6,6 +6,29 @@
return submit([{...entryOf(item, "reject", ""), channel, reason, to: item.to}], `Denial (${CLASSES[channel]}): ${short(item.title)}`);
}
/**
* @param {HTMLTextAreaElement} field the field the chips fill.
* @param {string[]} texts the earlier texts, newest first.
* @param {string} label the accessible name of the chip group.
* @returns {Node|null} the texts as chips: a press puts its text into the field, which stays editable; null without
* texts.
*/
function presetChips(field, texts, label) {
if (!texts.length) {
return null;
}
return h("div", {class: "chips reason-chips", role: "group", "aria-label": label}, texts.map((text) => {
const chip = h("button", {type: "button", class: "chip", title: text}, short(text));
chip.addEventListener("click", () => {
field.value = text;
field.focus();
});
return chip;
}));
}
const reasonChips = (field) => presetChips(field, state.reasons, "Recent reasons");
function denySheet(item) {
const name = `deny-${keyOf(item)}`;
const choices = DENY_CHANNELS.map(([id, direct, hint]) => h("label", {class: "deny-channel"},
@@ -22,6 +45,7 @@
h("div", {class: "who"}, pill(ITEM_LABELS[item.kind], KIND_TONES[item.kind]), item.agent ? person(item.agent) : null),
h("p", {class: "text"}, item.title),
h("fieldset", {class: "deny-channels"}, h("legend", {}, "Channel"), choices),
reasonChips(reason),
h("label", {class: "deny-reason"}, "Reason (optional, the agent reads it too)", reason),
h("p", {class: "muted"}, "The passkey signs the denial with channel, recipient and reason; then 3 s remain to undo it.",
" Mayday stays reserved for the operator."),
+21 -1
View File
@@ -2,7 +2,7 @@
const HOME_FETCH = 3000;
const HOME_MESSAGE = 30000;
const HOME_MARKS = [['section[aria-label="Recently sent"]', "radio-log"]];
const homeView = {dom: null, pins: [], tiles: new Map(), hosts: new Map(), messages: new Map(), drag: null, mark: () => null, touched: false, fetched: {}};
const homeView = {dom: null, pins: [], tiles: new Map(), hosts: new Map(), heads: new Map(), messages: new Map(), drag: null, mark: () => null, touched: false, fetched: {}};
const homeStore = Panels.store(typeof ViewStore === "object" && ViewStore ? ViewStore : Panels.memory(), HOME_PATH);
const homePins = () => homeView.pins;
const homeIndex = (key) => homePins().findIndex((pin) => Panels.keyOf(pin) === key);
@@ -515,6 +515,25 @@
}
}
/**
* @param {Element} tile the Home tile.
* @param {Element|null} slot the controls its panel hands the tile head (homeView.heads), shown between the title and
* the open link; null takes the previous ones out.
*/
function homeHeadSlot(tile, slot) {
const old = tile.querySelector(".home-head > .home-slot");
if (old === slot) {
return;
}
if (old) {
old.remove();
}
if (slot) {
slot.classList.add("home-slot");
tile.querySelector(".home-open").before(slot);
}
}
function homeContent(entry, pin) {
try {
return entry.render({w: pin.w, h: pin.h});
@@ -535,6 +554,7 @@
homeSpan(tile, pin);
tile.querySelector(".home-title").textContent = name;
homeOpenLink(tile.querySelector(".home-open"), content ? homeLink(pin) : null, name);
homeHeadSlot(tile, content ? homeView.heads.get(pin.id) : null);
const body = tile.querySelector(".home-body");
const shown = content || homeGone(pin, key);
if (body.childNodes.length !== 1 || body.firstChild !== shown) {
+1 -1
View File
@@ -185,7 +185,7 @@
const note = deny
? "Every entry and every full command that gets denied; each requester gets its denial and the reason by post. After the click the passkey signs the whole selection once; then 3 s remain to undo."
: "Every entry and every full command that gets granted. After the click the passkey signs the whole selection once; then 3 s remain to undo.";
openSheet(label, [h("p", {class: "muted"}, note), h("ul", {class: "mini"}, rows), ...(deny ? [h("label", {class: "deny-reason"}, "Reason (optional, every requester reads it)", reason)] : []),
openSheet(label, [h("p", {class: "muted"}, note), h("ul", {class: "mini"}, rows), ...(deny ? [reasonChips(reason), h("label", {class: "deny-reason"}, "Reason (optional, every requester reads it)", reason)] : []),
h("div", {class: "actions"}, h("span", {class: "spacer"}), btn("Cancel", "btn ghost", closeSheet), confirm)], false);
(reason || confirm).focus();
}
+87 -9
View File
@@ -9,6 +9,8 @@
const FEEDBACK_LIMIT = 2000;
const FLY_MS = 400;
const CONFETTI = 28;
const COMMENTS_KEPT = 5;
const PATTERNS = ["dots", "stripes", "waves", "grid", "rings"];
const matchView = {cards: null, order: [], marks: new Map(), opened: new Map(), decisions: new Map(), overview: false, front: null, drag: null, dom: null, sig: "", fetched: 0, loading: false, press: null, flying: false, openBefore: 0, epoch: 0};
/**
@@ -61,6 +63,20 @@
const cardKey = (card) => `${card.id}@${card.hash}`;
/**
* @returns {string[]} this browser's last COMMENTS_KEPT distinct saved line comments, newest first.
*/
function savedComments() {
const kept = stored(STORE.comments, []);
return Array.isArray(kept) ? kept.filter((text) => typeof text === "string" && text).slice(0, COMMENTS_KEPT) : [];
}
const peeksShown = () => stored(STORE.peeks, true) !== false;
function rememberComment(text) {
keep(STORE.comments, [text, ...savedComments().filter((old) => old !== text)].slice(0, COMMENTS_KEPT));
}
function marksOf(card) {
const key = cardKey(card);
if (!matchView.marks.has(key)) {
@@ -153,11 +169,13 @@
return;
}
marksOf(data).push({path: file.dataset.path, line: Number(row.dataset.line), comment: words.value.trim()});
rememberComment(words.value.trim());
drawMatch(true);
}}}, icon("bi-bookmark-fill"), "Save");
const cancel = h("button", {type: "button", class: "btn small ghost", ...named("Cancel"), on: {click: () => closeComment(article)}}, "Cancel");
const columns = row.children.length;
const field = h("tr", {class: "match-comment"}, h("td", {colspan: columns}, h("div", {class: "match-comment-box"}, h("code", {}, `${file.dataset.path}:${row.dataset.line}`), words, h("div", {class: "actions"}, cancel, save))));
const field = h("tr", {class: "match-comment"}, h("td", {colspan: columns}, h("div", {class: "match-comment-box"}, h("code", {}, `${file.dataset.path}:${row.dataset.line}`),
presetChips(words, savedComments(), "Recent comments"), words, h("div", {class: "actions"}, cancel, save))));
row.after(field);
words.focus();
}
@@ -201,6 +219,47 @@
article.addEventListener("pointercancel", drop);
}
/**
* @param {string} worktree the card's worktree path.
* @param {string} repo the card's repository path.
* @returns {string} the worktree below the repository relative to it, the repository itself as "checkout", any
* other path as its last three folders.
*/
function worktreeWords(worktree, repo) {
if (repo && worktree === repo) {
return "checkout";
}
if (repo && worktree.startsWith(`${repo}/`)) {
return worktree.slice(repo.length + 1);
}
const parts = worktree.split("/").filter(Boolean);
return parts.length > 3 ? `…/${parts.slice(-3).join("/")}` : worktree;
}
function placeChip(place, iconName, label, value, words) {
const full = revealed(value);
const chip = h("button", {type: "button", class: "match-where", "data-place": place, title: `${label}: ${full} (click copies)`, "aria-label": `${label}: ${full}, click copies`},
icon(iconName), h("span", {}, revealed(words)));
chip.addEventListener("click", async () => {
try {
await navigator.clipboard.writeText(value);
toast(`Copied ${label.toLowerCase()}`, [full], true);
} catch {
toast("Not copied", ["The browser refused the clipboard."], false);
}
});
return chip;
}
function placeRow(card) {
const chips = [
card.branch ? placeChip("branch", "bi-git", "Branch", card.branch, card.branch) : null,
card.repo ? placeChip("repo", "bi-folder2", "Repository", card.repo, card.repo.split("/").filter(Boolean).pop() || card.repo) : null,
card.worktree ? placeChip("worktree", "bi-diagram-2", "Worktree", card.worktree, worktreeWords(card.worktree, card.repo)) : null,
].filter(Boolean);
return chips.length ? h("div", {class: "match-place", "aria-label": "Place"}, chips) : null;
}
function matchHead(card) {
const [kindName, kindTone, kindIcon] = MATCH_KINDS[card.kind] || [card.kind, "neutral", "bi-collection"];
const metrics = card.metrics || [];
@@ -210,7 +269,7 @@
h("span", {"aria-hidden": "true"}, metric.emoji), h("span", {class: "match-metric-label"}, metric.label), h("strong", {}, revealed(metric.value))))) : null,
h("div", {class: "states"}, h("span", {class: "pill", "data-tone": kindTone}, icon(kindIcon), kindName), card.gate ? pill(`gate ${card.gate}`, card.gate === "pass" ? "ok" : "bad") : null,
card.score && !metrics.length ? h("span", {class: "pill", "data-tone": "neutral"}, revealed(card.score)) : null, card.stale ? h("span", {class: "pill match-stale-pill", "data-tone": "bad"}, icon("bi-hourglass-split"), "stale") : null),
h("dl", {class: "meta match-place"}, [["Repository", card.repo], ["Branch", card.branch], ["Worktree", card.worktree]].map(([label, value]) => h("div", {}, h("dt", {}, label), h("dd", {}, h("code", {title: value ? revealed(value) : null}, revealed(dash(value))))))),
placeRow(card),
h("h2", {class: "match-title"}, revealed(card.title)),
card.stale ? h("p", {class: "match-stale"}, icon("bi-exclamation-triangle"), revealed(card.stale_reason)) : null);
}
@@ -247,6 +306,18 @@
card.reason && card.reason !== "-" ? h("p", {class: "match-reason"}, revealed(card.reason)) : null, preview);
}
/**
* @param {HTMLElement} article the card.
* @param {string} id the card id; the same id always gets the same two hues and pattern, so a redraw never flickers.
*/
function paint(article, id) {
const seed = Faces.hash(id);
const hue = seed % 360;
article.style.setProperty("--card-hue", String(hue));
article.style.setProperty("--card-hue-2", String((hue + 40 + ((seed >>> 9) % 100)) % 360));
article.dataset.pattern = PATTERNS[(seed >>> 17) % PATTERNS.length];
}
function matchCard(card) {
const files = card.files || [];
const none = card.kind === "commit" ? "No diff shipped with this stage." : card.kind === "ask" ? "Its tool call changes no file." : card.merge ? (card.merge.error ? "No diff to show." : "The merge brings no change.") : "Its command names no file.";
@@ -256,6 +327,7 @@
const article = h("article", {class: "card match-card front", "data-card": card.id, "data-kind": card.kind, "data-stale": String(Boolean(card.stale)), "aria-label": `${card.kind} card of ${card.agent || "an agent"}`},
matchHead(card), body);
article.style.setProperty("--agent-hue", String(Faces.hash(card.agent) % 360));
paint(article, card.id);
markable(article, card);
window.setTimeout(() => openOnScroll(body, ".match-file"), 0);
return article;
@@ -365,7 +437,7 @@
decide(card, "reject", words.value.trim(), "");
});
const note = `${card.agent || "The agent"} gets this text by radio call at the release; nothing is sent before.`;
openSheet(`Reject: ${card.title}`, [h("p", {class: "muted"}, note), words, h("div", {class: "actions"}, h("span", {class: "spacer"}), btn("Cancel", "btn ghost", closeSheet), confirm)], false);
openSheet(`Reject: ${card.title}`, [h("p", {class: "muted"}, note), reasonChips(words), words, h("div", {class: "actions"}, h("span", {class: "spacer"}), btn("Cancel", "btn ghost", closeSheet), confirm)], false);
words.focus();
}
@@ -531,12 +603,16 @@
matchView.overview = true;
drawMatch(true);
}}}, icon("bi-card-checklist"), tally);
matchView.dom = {stack, count, decisions, tally};
const peeks = h("button", {type: "button", class: "btn small soft match-peeks-toggle", "aria-pressed": String(peeksShown()), ...named("Next cards", "Next cards: show or hide the row of waiting cards below the buttons"), on: {click: () => {
keep(STORE.peeks, !peeksShown());
drawMatch(true);
}}}, icon("bi-collection"));
matchView.dom = {stack, count, decisions, tally, peeks};
matchView.sig = "";
if (matchView.drag) {
matchView.drag.end();
}
const bar = h("div", {class: "card controls task-toolbar", role: "toolbar", "aria-label": "Match"}, h("strong", {}, icon("bi-stack"), "Match"), count, h("span", {class: "spacer"}), decisions,
const bar = h("div", {class: "card controls task-toolbar", role: "toolbar", "aria-label": "Match"}, h("strong", {}, icon("bi-stack"), "Match"), count, h("span", {class: "spacer"}), decisions, peeks,
iconBtn("bi-list-check", "Tasks", "btn small soft", () => go("tasks", null), "Tasks: back to the task list"), h("span", {"data-star-slot": ""}));
fetchMatch();
return h("div", {class: "graph tasks match", "data-panel": "tasks/match"}, bar, stack);
@@ -544,7 +620,7 @@
/**
* @returns {Element} the Match stack for a Home tile, kept while it still holds the live stack, without the
* data-panel and star slot of the screen.
* data-panel and toolbar of the screen: its card count and decisions button go to the tile head.
*/
function homeMatch() {
const kept = homeView.hosts.get("tasks/match");
@@ -553,7 +629,8 @@
}
const host = h("div", {class: "match-home"}, matchScreen());
host.querySelectorAll("[data-panel]").forEach((node) => node.removeAttribute("data-panel"));
host.querySelectorAll("[data-star-slot]").forEach((node) => node.removeAttribute("data-star-slot"));
host.querySelector(".task-toolbar").remove();
homeView.heads.set("tasks/match", h("div", {role: "toolbar", "aria-label": "Match"}, matchView.dom.count, matchView.dom.decisions, matchView.dom.peeks));
homeView.hosts.set("tasks/match", host);
window.setTimeout(() => drawMatch(true), 0);
return host;
@@ -590,6 +667,7 @@
matchView.openBefore = open.length;
dom.count.textContent = open.length === 1 ? "1 card waits" : `${open.length} cards wait`;
dom.tally.textContent = String(matchView.decisions.size);
dom.peeks.setAttribute("aria-pressed", String(peeksShown()));
dom.decisions.hidden = !matchView.decisions.size || shownOverview;
if (!cards.length) {
matchView.front = null;
@@ -613,7 +691,7 @@
const accept = act("match-accept", "bi-check-lg", "Accept", revealed(hint), Boolean(front.stale) || (front.kind === "decision" && !front.recommended), () => acceptCard(front));
const reject = act("match-reject", "bi-x-lg", "Reject", pickOnly(front) ? "Reject: a choice is answered with one of its options" : "Reject with feedback (left arrow, swipe left)", pickOnly(front), () => rejectCard(front));
const later = act("match-later", "bi-arrow-up", "Later", "Later: to the back of the stack (up arrow, swipe up)", !rest.length, () => laterCard(front));
const peeks = rest.length ? h("div", {class: "match-peeks", role: "group", "aria-label": `${rest.length} more cards`}, rest.map(peekTab)) : null;
const peeks = rest.length && peeksShown() ? h("div", {class: "match-peeks", role: "group", "aria-label": `${rest.length} more cards`}, rest.map(peekTab)) : null;
const behind = rest.slice(0, MATCH_PEEKS).map((card, index) => {
const sheet = h("div", {class: "match-behind", "aria-hidden": "true"});
sheet.style.setProperty("--depth", String(index + 1));
@@ -624,6 +702,6 @@
const shown = matchCard(front);
shown.dataset.fresh = String(!before || before.dataset.card !== front.id);
draggable(shown, front);
dom.stack.replaceChildren(peeks || h("div", {class: "match-peeks"}), h("div", {class: "match-deck"}, behind, shown), h("div", {class: "match-actions"}, reject, later, accept));
dom.stack.replaceChildren(h("div", {class: "match-deck"}, behind, shown), h("div", {class: "match-actions"}, reject, later, accept), peeks);
shown.querySelector(".match-body").scrollTop = scrolled;
}
+2
View File
@@ -15,6 +15,8 @@
.home-body .stage, .home-body .graph3d { height: 100%; min-height: 0; }
.home-grip { cursor: grab; touch-action: none; }
.home-open[hidden] { display: none; }
.home-slot { display: flex; flex: none; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-sm); }
.home-slot > .muted { white-space: nowrap; }
.home-tile[data-w="1"] .home-head { gap: 2px; padding-inline: 2px; }
.home-tile[data-w="1"] .home-head .icon-only { min-width: 24px; padding-inline: 4px; }
.home-resize { position: absolute; right: 2px; bottom: 2px; z-index: 3; cursor: nwse-resize; touch-action: none; }
+16 -4
View File
@@ -2,6 +2,7 @@
.match-home { display: grid; height: 100%; min-height: 0; }
.match-home > .graph.match { min-height: 0; }
.match-stack { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--sp-2); min-height: 0; width: min(100%, 960px); margin: 0 auto; }
.match-stack:has(> .match-deck) { grid-template-rows: minmax(0, 1fr) auto auto; }
.match-peeks { display: flex; flex-wrap: wrap; gap: var(--sp-1); min-width: 0; }
.match-peek { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: inherit; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.match-peek[data-stale="true"] { border-color: var(--bad); }
@@ -9,7 +10,7 @@
.match-deck { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; padding-top: 14px; overflow-x: clip; }
.match-behind { position: absolute; inset: calc(14px - var(--depth) * 7px) calc(var(--depth) * 12px) auto; height: 40px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); opacity: calc(1 - var(--depth) * 0.3); transform: rotate(calc((var(--depth) * 2 - 3) * 1deg)); }
.match-card.front { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; padding: 0; overflow: hidden; border-radius: 22px; box-shadow: 0 14px 34px -16px rgb(0 0 0 / 0.45); }
.match-card.front::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 6px; background: linear-gradient(90deg, hsl(var(--agent-hue, 210) 75% 58%), hsl(calc(var(--agent-hue, 210) + 70) 75% 58%)); }
.match-card.front::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 6px; background: linear-gradient(90deg, hsl(var(--card-hue, 210) 75% 58%), hsl(var(--card-hue-2, 280) 75% 58%)); }
.match-card[data-stale="true"]::before { background: var(--bad); }
.match-card.front[data-fresh="true"] { animation: match-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
.match-card.front[data-fresh="true"] .match-who .avatar { animation: match-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@@ -25,7 +26,15 @@
@keyframes match-fly-right { to { transform: translate(120%, -4%) rotate(18deg); opacity: 0; } }
@keyframes match-fly-left { to { transform: translate(-120%, -4%) rotate(-18deg); opacity: 0; } }
@keyframes match-fly-up { to { transform: translateY(-110%) scale(0.9); opacity: 0; } }
.match-head { display: grid; justify-items: center; gap: 6px; padding: var(--sp-3); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, hsl(var(--agent-hue, 210) 80% 60% / 0.16), transparent 75%); text-align: center; }
.match-head { position: relative; isolation: isolate; display: grid; justify-items: center; gap: 6px; padding: var(--sp-3); border-bottom: 1px solid var(--line); text-align: center;
--ink: hsl(var(--card-hue, 210) 55% 48% / 0.16);
background: radial-gradient(120% 90% at 0% 0%, hsl(var(--card-hue, 210) 85% 62% / 0.3), transparent 60%), radial-gradient(110% 90% at 100% 10%, hsl(var(--card-hue-2, 280) 85% 62% / 0.26), transparent 62%), linear-gradient(180deg, hsl(var(--card-hue, 210) 80% 60% / 0.1), transparent 85%); }
.match-head::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; mask-image: linear-gradient(180deg, #000 15%, transparent 95%); }
.match-card[data-pattern="dots"] .match-head::before { background: radial-gradient(var(--ink) 1.2px, transparent 1.7px) 0 0 / 14px 14px; }
.match-card[data-pattern="stripes"] .match-head::before { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 12px); }
.match-card[data-pattern="waves"] .match-head::before { background: radial-gradient(circle at 50% 100%, transparent 7px, var(--ink) 7.5px 9px, transparent 9.5px) 0 0 / 24px 12px; }
.match-card[data-pattern="grid"] .match-head::before { background: linear-gradient(var(--ink) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, var(--ink) 1px, transparent 1px) 0 0 / 18px 18px; }
.match-card[data-pattern="rings"] .match-head::before { background: repeating-radial-gradient(circle at 100% 0%, var(--ink) 0 1.5px, transparent 1.5px 14px); }
.match-who { display: grid; justify-items: center; gap: 2px; }
.match-who .avatar.big { width: 72px; height: 72px; }
.match-name { font-size: var(--fs-lg); }
@@ -33,8 +42,11 @@
.match-metrics { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.match-metric { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--sunken); font-size: var(--fs-sm); white-space: nowrap; }
.match-metric-label { color: var(--muted); }
.match-place { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); width: 100%; margin: 0; text-align: left; }
.match-place code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-place { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
.match-where { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: copy; }
.match-where span { overflow: hidden; font-family: var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.match-where:hover { border-color: var(--line-strong); color: var(--text); }
.match-where[data-place="branch"] { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.match-title { margin: 0; font-size: var(--fs-md); overflow-wrap: anywhere; }
.match-stale { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--bad); font-size: var(--fs-sm); }
.match-body { min-height: 0; overflow: auto; padding: var(--sp-2) var(--sp-3) var(--sp-3); overscroll-behavior: contain; }