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:
1 parent
7d1926e3de
commit
2722cda1b5
120 files changed
+5372
-486
No files matched your search
@@ -220,13 +220,49 @@ def preview(row: dict, rules: Path | None) -> dict | None:
|
||||
return {"task": row["task"], "command": row["command"], "head": head, **shown}
|
||||
|
||||
|
||||
def review_preview(row: dict, rules: Path | None) -> dict | None:
|
||||
"""Args:
|
||||
row: a pending review that shipped no diff, with id, worktree, tree
|
||||
and head, the HEAD the hub last saw, None for none.
|
||||
rules: the MEDUSA rules directory.
|
||||
|
||||
Returns:
|
||||
{id, head, diff}: the review's tree against its worktree's HEAD
|
||||
(staged_diff.tree_diff), or {id, head, error} when it cannot be
|
||||
built; None while HEAD is the one the hub saw.
|
||||
"""
|
||||
try:
|
||||
head = staged_diff.head_of(Path(row["worktree"]))
|
||||
except PREVIEW_FAILURES as error:
|
||||
head, shown = "", {"error": str(error)[:ERROR_LIMIT]}
|
||||
else:
|
||||
shown = None
|
||||
if head == row["head"]:
|
||||
return None
|
||||
if shown is None:
|
||||
try:
|
||||
shown = {"diff": staged_diff.tree_diff(Path(row["worktree"]), row["tree"], rules)[0]}
|
||||
except PREVIEW_FAILURES as error:
|
||||
shown = {"error": str(error)[:ERROR_LIMIT]}
|
||||
return {"id": row["id"], "head": head, **shown}
|
||||
|
||||
|
||||
def oversized(shown: dict, keys: tuple[str, ...]) -> dict:
|
||||
if len(json.dumps(shown).encode()) <= hub_limits.DIFF_BODY_LIMIT:
|
||||
return shown
|
||||
return {**{key: shown[key] for key in keys}, "error": f"the preview passes the hub's {hub_limits.DIFF_BODY_LIMIT} bytes"}
|
||||
|
||||
|
||||
def previews(base: str, rules: Path | None) -> None:
|
||||
for row in call(base, PREVIEWS, None)["rows"]:
|
||||
listed = call(base, PREVIEWS, None)
|
||||
for row in listed["rows"]:
|
||||
shown = preview(row, rules)
|
||||
if shown is not None and len(json.dumps(shown).encode()) > hub_limits.DIFF_BODY_LIMIT:
|
||||
shown = {"task": row["task"], "command": row["command"], "head": shown["head"], "error": f"the preview passes the hub's {hub_limits.DIFF_BODY_LIMIT} bytes"}
|
||||
if shown is not None:
|
||||
call(base, PREVIEWS, shown)
|
||||
call(base, PREVIEWS, oversized(shown, ("task", "command", "head")))
|
||||
for row in listed["reviews"]:
|
||||
shown = review_preview(row, rules)
|
||||
if shown is not None:
|
||||
call(base, PREVIEWS, oversized(shown, ("id", "head")))
|
||||
|
||||
|
||||
def council_refusal(council: Path) -> str | None:
|
||||
|
||||
Reference in new issue
Block a user