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 base2754568onto96d332a: the scan copy's diff against2aea6d1would 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:
1 parent
96d332a7cd
commit
f95196ca82
15 files changed
+369
-24
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user