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

+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."),