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,