feat(hub): requirements 023 to 031 and line comments on grant-time code

023 box heads: one head band per box under its top border; in widget mode
its controls join the widget title band.
024 Match card content: merge cards show their diff (the runner previews a
review's tree against its worktree HEAD), every card carries legal and
architecture scores, the null under command cards is gone.
025 Radio speak card: no hint text, a rounder flowing card, a MAYDAY toggle
beside push to talk.
026 widget zoom: zoom a widget's content by keyboard and the context menu.
027 slash skill suggestions: every field that messages agents suggests
skills after a slash, from a skills index the tree timer writes.
028 Resources accounts: an Accounts panel (provider, renewal, resets, usage
and remaining, host-local, emails never in git) and panel checkboxes.
029 Controls layout: Rules and Groups pages laid out.
030 Yes/No answers as buttons, and nothing hides: rows the runner cannot
run stay greyed with the reason.
031 mic in fields.
Line comments (operator 2026-11-24): wherever code waits for a grant
(Waits on Operator, the stream, the review overlay) selected lines or a
right-clicked row take a comment that marks its lines and collects on the
card; Deny opens with them as the reason and Call preselected, Grant sends
them after the signed grant as one post. Requirement 003 decision 4 and
its contract follow.

Tests are written for every requirement and run once on this head.

🎯 Fix: 80 %
💥 Break: 20 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: ~95 %
🏆 Score: 61
🚦 Gate: ⛔ fix 80 % < 90, break 20 % > 5; security ~95 % < 100: ask the operator before the commit

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-25 01:22:03 +00:00
1 parent 7d1926e3de
commit 2722cda1b5
120 files changed
+5372 -486

No files matched your search

+14 -14
View File
@@ -46,6 +46,8 @@ from hub_e2e_radio import (
from hub_support import HOST_STATE
from kvb_orchestrator import skill_scripts
SPEAK_CHANNELS = [channel for channel in CHOICE_CHANNELS if channel != "mayday"]
PRESSED = ["Cancel mayday", "true", True]
SEND_GROUP = [["PTT", "PTT: push to transmit the message; your passkey signs it"], ["More send options", "More: send a test message only you hear"]]
@@ -231,7 +233,7 @@ class TestHubRadio(base.OrchestratorE2ECase):
self.assertEqual(data["errors"], [])
composed, plain, again, sent = data["results"]
self.assertNotIn("error", composed)
self.assertEqual(composed["channels"], ["post", "call", "newsletter", "broadcast", "pan-pan", "security", "mayday"])
self.assertEqual(composed["channels"], SPEAK_CHANNELS)
self.assertIn("Stage", composed["recipients"])
self.assertEqual(composed["recording"], "true")
self.assertEqual(composed["text"], "hello from the mic second line", composed)
@@ -262,7 +264,7 @@ class TestHubRadio(base.OrchestratorE2ECase):
with self.subTest(width=width):
self.assertNotIn("error", result)
self.assertEqual(result["toolbar"], ["Priority", "Day/Night", "Drain", "Suspend", "Resume", "Status"])
self.assertEqual((result["title"], result["shown"]), ("Cancel mayday: lift the radio silence so the agents write again; your passkey signs it", "Cancel mayday"))
self.assertEqual((result["title"], result["shown"], result["next"]), ("Cancel mayday: lift the radio silence so the agents write again; your passkey signs it", "Cancel mayday", True))
self.assertEqual(result["declined"], {"question": [question], "posted": [], "toasts": []})
self.assertEqual(result["accepted"], {"question": [question], "posted": ["/api/board/sign", "/api/board/clear-mayday"]})
self.assertTrue((result["done"] or "").startswith("Cancel mayday: done"), result)
@@ -284,7 +286,6 @@ class TestHubRadio(base.OrchestratorE2ECase):
(OUT / "chromium-radio-spot.json").write_text(json.dumps(data, indent=1), encoding="utf-8")
self.assertEqual(data["errors"], [])
labels = dict(zip(CHOICE_CHANNELS, ["Post", "Call", "Newsletter", "Broadcast", "Pan-Pan", "Sécurité", "Mayday"], strict=True))
mayday = "Send a mayday to all? All agents pause writing steps until you cancel it."
jumps, walked = data["results"][: len(WIDTHS)], data["results"][len(WIDTHS) :]
for jump, (width, _) in zip(jumps, WIDTHS, strict=True):
with self.subTest(width=width, part="radio spot on every tab"):
@@ -297,13 +298,13 @@ class TestHubRadio(base.OrchestratorE2ECase):
self.assertNotIn("error", probe)
self.assertEqual((sent["closed"], sent["open"]), ([True, "false"], [False, "true", True]))
self.assertEqual(sent["inline"], ["static", True, True])
self.assertEqual((sent["toolbar"], sent["channels"], sent["record"]), (["Priority", "Day/Night", "Status"], CHOICE_CHANNELS, ["Record"]))
self.assertEqual((sent["heads"], sent["send"], sent["cancel"]), (0, SEND_GROUP, False))
self.assertEqual((sent["toolbar"], sent["channels"], sent["record"]), (["Priority", "Day/Night", "Status"], SPEAK_CHANNELS, ["Record"]))
self.assertEqual((sent["heads"], sent["send"], sent["mayday"]), (0, SEND_GROUP, PRESSED))
self.assertEqual((sent["tall"], sent["wide"]), (width == 390, False))
self.assertEqual([run["cls"] for run in sent["runs"]], CHOICE_CHANNELS)
self.assertEqual([run["cls"] for run in sent["runs"]], SPEAK_CHANNELS)
for run in sent["runs"]:
direct = run["cls"] in ("post", "call")
self.assertEqual((run["direct"], run["question"], run["left"]), (direct, [mayday] if run["cls"] == "mayday" else [], ""), run)
self.assertEqual((run["direct"], run["question"], run["left"]), (direct, [], ""), run)
self.assertTrue((run["toast"] or "").startswith(f"{labels[run['cls']]} to {'Stage' if direct else 'all'}: sent"), run)
self.assertEqual(saved["clashes"], [{"found": [], "outside": []}])
self.assertEqual(saved["tones"], ["MAYDAY / PAN-PAN", "Reviews, asks, decisions", "Post and calls to you", "All radio", "Squelch", "speak while CPU < 50 %"])
@@ -314,7 +315,7 @@ class TestHubRadio(base.OrchestratorE2ECase):
self.assertEqual(read, {"squelch": float(squelch), "radio": radio_bell, "post": post, "tall": width == 390, "wide": False})
heads = {"post": ["post", "--to", "Stage"], "call": ["send", "call", "--to", "Stage"], "newsletter": ["post"]}
radio = [args for script, args in self.scripts.calls if script == skill_scripts.RADIO]
sends = [(width, cls) for width, _ in WIDTHS for cls in CHOICE_CHANNELS]
sends = [(width, cls) for width, _ in WIDTHS for cls in SPEAK_CHANNELS]
self.assertEqual([args[:-1] for args in radio], [[*heads.get(cls, ["send", cls]), "--session", "Operator"] for _, cls in sends])
for args, (width, cls) in zip(radio, sends, strict=True):
with self.subTest(width=width, cls=cls):
@@ -337,7 +338,6 @@ class TestHubRadio(base.OrchestratorE2ECase):
(OUT / "firefox-radio-spot.json").write_text(json.dumps(data, indent=1), encoding="utf-8")
self.assertEqual([error for error in data["errors"] if "(style-src-elem)" not in error and "/favicon.ico" not in error], [])
labels = dict(zip(CHOICE_CHANNELS, ["Post", "Call", "Newsletter", "Broadcast", "Pan-Pan", "Sécurité", "Mayday"], strict=True))
mayday = "Send a mayday to all? All agents pause writing steps until you cancel it."
question = "Lift the radio silence of the active mayday?"
hint = "Cancel mayday: lift the radio silence so the agents write again; your passkey signs it"
results = iter(data["results"])
@@ -348,19 +348,19 @@ class TestHubRadio(base.OrchestratorE2ECase):
with self.subTest(browser="firefox", width=width, part="every class unsigned"):
self.assertNotIn("error", sent, sent)
self.assertEqual((sent["closed"], sent["open"], sent["inline"]), ([True, "false"], [False, "true", True], ["static", True, True]))
self.assertEqual((sent["toolbar"], sent["channels"], sent["record"]), (["Priority", "Day/Night", "Status"], CHOICE_CHANNELS, ["Record"]))
self.assertEqual((sent["heads"], sent["send"], sent["cancel"]), (0, SEND_GROUP, False))
self.assertEqual((sent["toolbar"], sent["channels"], sent["record"]), (["Priority", "Day/Night", "Status"], SPEAK_CHANNELS, ["Record"]))
self.assertEqual((sent["heads"], sent["send"], sent["mayday"]), (0, SEND_GROUP, PRESSED))
self.assertEqual((sent["tall"], sent["wide"]), (width == 390, False))
self.assertEqual([run["cls"] for run in sent["runs"]], CHOICE_CHANNELS)
self.assertEqual([run["cls"] for run in sent["runs"]], SPEAK_CHANNELS)
for run in sent["runs"]:
direct = run["cls"] in ("post", "call")
self.assertEqual((run["direct"], run["question"], run["left"]), (direct, [mayday] if run["cls"] == "mayday" else [], f"spot {width} {run['cls']}"), run)
self.assertEqual((run["direct"], run["question"], run["left"]), (direct, [], f"spot {width} {run['cls']}"), run)
self.assertTrue((run["toast"] or "").startswith(f"{labels[run['cls']]} to {'Stage' if direct else 'all'}: not signed"), run)
self.assertIn("NotAllowedError", run["toast"], run)
with self.subTest(browser="firefox", width=width, part="cancel mayday next to PTT unsigned"):
self.assertNotIn("error", cleared, cleared)
self.assertEqual(cleared["toolbar"], ["Priority", "Day/Night", "Drain", "Suspend", "Resume", "Status"])
self.assertEqual((cleared["title"], cleared["shown"]), (hint, "Cancel mayday"))
self.assertEqual((cleared["title"], cleared["shown"], cleared["next"], cleared["after"]), (hint, "Cancel mayday", True, ["Cancel mayday", "true"]))
self.assertEqual(cleared["declined"], {"question": [question], "posted": [], "toasts": []})
self.assertEqual(cleared["accepted"], {"question": [question], "posted": ["/api/board/sign"]})
self.assertTrue((cleared["done"] or "").startswith("Cancel mayday: not signed"), cleared)