feat(orchestrator): hub page for requirements 085 to 099

085 calm Match deck: no header hourglass, centred bare empty state, the
release card as a deck card (Cancel, Skip, Release), fixed card height.
086 motion: vanish() fade everywhere with a lint test, view transitions,
a lub-dub heartbeat for working objects, confetti that lands and fades.
087 time readout under the pivot of every analog clock.
088 prune dialog grouped by prefix with tri-state boxes, search, stepper
and sticky footer.
089 one-row task toolbar with Filter and Actions menus and a filter chip.
090 card border by state colour with a soft glow and owner avatars.
091 draggable limit lines with staged changes and one Save, a Limits menu
with the matrix, View toggles, the GPU cause in its tooltip.
093 request chips Open, Expired, Stale, Failed, All and a signed Delete.
094 closed cards leave the deck within 5 s; open in Claude stamps.
095 compact agent message box with Post/Call, attach, mic and Send in
the field.
096 Reject on an expired card drops it silently as Drop (expired).
097 Show filter in Match's right-click menu.
098 docked speech bubbles carry the speaker's avatar and a skip button.
099 Match card headlines cut to 120 characters with the full title in
the tooltip; the code box keeps the whole command.
tests/test_hub_path_links.py: a unicode fixture without German.

Full make test green through the queue (2605 tests, ruff, shellcheck,
markdownlint). Gate missed on the operator's word: break 7 %, the E2E
specs (13 new, 15 updated) run next.

🎯 Fix: 92 %
💥 Break: 7 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 86
🚦 Gate: ⛔ break 7 % > 5

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-28 01:47:41 +00:00
1 parent 8ee52644c8
commit 6323f087bc
95 files changed
+5807 -704

No files matched your search

+129 -14
View File
@@ -12,6 +12,7 @@ HERE = Path(__file__).resolve().parent
sys.path[:0] = [str(HERE.parent), str(HERE)]
import hub_e2e_kit as base
import test_home_dashboard_e2e as dash
import test_match_review_e2e as matched
from hub_case import HubCase
from kvb_orchestrator import batches
@@ -48,11 +49,11 @@ STEPS = """
}
return releasing();
};
const swipeRight = async () => {
const swipe = async (sign) => {
const head = card().querySelector(".match-head");
const box = head.getBoundingClientRect();
const [x, y] = [box.left + box.width / 2, box.top + 20];
const dx = card().getBoundingClientRect().width * 0.4;
const dx = sign * card().getBoundingClientRect().width * 0.4;
const at = (cx) => ({bubbles: true, cancelable: true, pointerId: 12, pointerType: "touch", isPrimary: true, button: 0, clientX: cx, clientY: y});
head.dispatchEvent(new PointerEvent("pointerdown", at(x)));
window.dispatchEvent(new PointerEvent("pointermove", at(x + dx / 2)));
@@ -60,6 +61,8 @@ STEPS = """
window.dispatchEvent(new PointerEvent("pointerup", at(x + dx)));
return leaning;
};
const swipeRight = () => swipe(1);
const unreleased = () => !releasing() && card() && card().dataset.card;
"""
CARD040 = """(async () => {@HELPERS@@CARD@@STEPS@
await screenShown(8000);
@@ -70,14 +73,25 @@ CARD040 = """(async () => {@HELPERS@@CARD@@STEPS@
const found = {ready: await decideAll()};
const front = card();
found.release = Boolean(front && front.closest(".match-deck") && front.querySelector(".match-release"));
found.held = text(document.querySelector("#main .match-release-held"));
found.labelled = all("button", front).map(name).filter((words) => /^Release \\d+ decisions?$/.test(words || ""));
const acts = all("#main .match-stack > .match-actions .match-act");
found.row = acts.map((node) => [node.classList[1], text(node.querySelector(".match-act-label")), node.disabled]);
found.sides = acts.map((node) => Math.round(node.getBoundingClientRect().left));
found.held = document.querySelector("#main .match-release") ? document.querySelector("#main .match-release").title : null;
found.verdicts = all("#main .match-decision").filter((node) => node.querySelector(".match-verdict")).map((node) => node.dataset.card);
found.layers = all("#main .match-layer").map((node) => node.dataset.card);
found.block = Boolean(document.querySelector("#main .match-release-block"));
found.risk = all("#main .match-accept-risk").map((node) => [node.closest(".match-decision").dataset.card, node.getAttribute("aria-pressed")]);
found.label = text(document.querySelector("#main .match-release"));
key("ArrowLeft");
found.back = await until(() => !releasing() && card() && card().dataset.card, 4000);
found.back = await until(unreleased, 4000);
key("s");
found.undone = Boolean(await until(releasing, 4000));
key("a");
found.skipped = await until(unreleased, 4000);
key("s");
await until(releasing, 4000);
found.swiped = [await swipe(-1), await until(unreleased, 4000)];
document.querySelector("#main .match-open-overview").click();
found.again = Boolean(await until(releasing, 4000));
const cards = await served();
@@ -105,14 +119,73 @@ RELEASE = """(async () => {@HELPERS@@CARD@@STEPS@
pressed.push(risk().getAttribute("aria-pressed"));
}
const label = text(document.querySelector("#main .match-release"));
const disabled = document.querySelector("#main .match-release").disabled;
window.e2eSubmits.length = 0;
const leaning = @SWIPE@ ? await swipeRight() : (key("ArrowRight"), "");
const corner = [];
const watch = new MutationObserver(() => {
const box = document.querySelector("#toasts .toast.wait");
if (!box || corner.length) {
return;
}
const mark = box.querySelector(".undo-row > .undo-glass:last-child");
const undo = box.querySelector(".undo-row > .btn");
if (!mark || !mark.querySelector(".match-glass-face") || !undo) {
corner.push({glass: false});
return;
}
const [outer, glass, button] = [box, mark, undo].map((node) => node.getBoundingClientRect());
corner.push({glass: true, right: Math.round(outer.right - glass.right), bottom: Math.round(outer.bottom - glass.bottom), after: glass.left >= button.right});
});
watch.observe(document.getElementById("toasts"), {childList: true});
const leaning = @SWIPE@ ? await swipeRight() : (key("@KEY@"), "");
await until(() => window.e2eSubmits.length >= @SUBMITS@, 20000);
await sleep(1500);
watch.disconnect();
if (@SUBMITS@) {
await until(() => card() && !releasing(), 8000);
}
return {pressed, label, leaning, submits: window.e2eSubmits, front: card() ? card().dataset.card : null, peeks: all("#main .match-peek").map((node) => node.dataset.card)};
return {pressed, label, disabled, leaning, corner, submits: window.e2eSubmits, front: card() ? card().dataset.card : null, peeks: all("#main .match-peek").map((node) => node.dataset.card)};
})()"""
HEIGHTS = """(async () => {@HELPERS@@HOME_KIT@@CARD@@STEPS@
if (@WIDGET@) {
await ViewStore.update("home.pins", () => [{kind: "panel", id: "tasks/match", w: 12, h: 8}]);
await go("#home");
} else {
await screenShown(8000);
}
if (!(await until(card, 8000))) {
return {error: text(document.getElementById("main")).slice(0, 300)};
}
await sleep(700);
const box = (node) => {
const rect = node.getBoundingClientRect();
return [rect.left, rect.top, rect.width, rect.height];
};
const row = (selector) => all(`:scope > .match-actions ${selector}`, card().closest(".match-stack"));
const measure = () => {
const front = card();
const inner = front.querySelector(".match-body");
return {id: front.dataset.card, card: box(front), deck: box(front.closest(".match-deck")), scrolls: inner.scrollHeight > inner.clientHeight + 1,
acts: row(".match-act").map((node) => [node.classList[1], ...box(node)])};
};
const seen = [];
for (const id of @IDS@) {
if (card().dataset.card !== id) {
await pick(id);
await sleep(700);
}
seen.push(measure());
}
for (let tries = 0; tries < 10 && card() && !releasing(); tries += 1) {
const id = card().dataset.card;
const greyed = card().dataset.stale === "true" || card().hasAttribute("data-blocked");
row(greyed ? ".match-later" : ".match-accept")[0].click();
await until(() => !card() || card().dataset.card !== id, 4000);
await sleep(200);
}
await sleep(700);
seen.push(releasing() ? measure() : {id: null});
return {seen, wide: document.documentElement.scrollWidth > innerWidth + 1};
})()"""
@@ -144,9 +217,9 @@ class ReleaseDeck(HubCase):
@unittest.skipUnless(shutil.which(os.environ.get("CHROMIUM", "chromium")), "no Chromium")
class TestMatchReleaseCard(ReleaseDeck):
def release(self, name: str, clicks: int, swipe: bool, submits: int) -> dict:
def release(self, name: str, clicks: int, swipe: bool, submits: int, key: str = "ArrowRight") -> dict:
step = {"width": 1920, "height": 1080, "url": f"{self.base}?{name}#tasks/match", "wait": 1500, "shot": str(OUT / f"chromium-{name}.png"),
"probe": probe(RELEASE, red=f"review:{self.red}", clicks=str(clicks), swipe="true" if swipe else "false", submits=str(submits))}
"probe": probe(RELEASE, red=f"review:{self.red}", clicks=str(clicks), swipe="true" if swipe else "false", submits=str(submits), key=key)}
with mock.patch.object(batches, "UNDO", 0.3):
data = self.drive([step], self.authenticator(), init=INIT)
(OUT / f"chromium-{name}.json").write_text(json.dumps(data, indent=1), encoding="utf-8")
@@ -171,23 +244,65 @@ class TestMatchReleaseCard(ReleaseDeck):
self.assertIn(f"review:{self.stale}", found["layers"], found)
self.assertEqual(found["risk"], [[f"review:{self.red}", "false"]], found)
self.assertNotIn(f"review:{self.red}", found["verdicts"], found)
self.assertEqual((found["label"], found["held"]), (None, "One red-gate commit waits for your risk accept or its way back to the stack."), found)
self.assertEqual(found["labelled"], [], found)
self.assertEqual(found["row"], [["match-drop", "Cancel", True], ["match-skip", "Skip", False], ["match-release", "Release", True]], found)
self.assertEqual(found["sides"], sorted(found["sides"]), found)
self.assertEqual(found["label"], "Release", found)
self.assertIn("one red-gate commit waits for your risk accept or its way back to the stack.", found["held"], found)
self.assertIn("feat: red gate", found["held"], found)
self.assertEqual(found["back"], f"review:{self.stale}", found)
self.assertEqual((found["undone"], found["skipped"], found["swiped"]), (True, f"review:{self.stale}", ["reject", f"review:{self.stale}"]), found)
self.assertEqual((found["again"], found["arrived"], found["stays"]), (True, True, True), found)
def test_chromium_an_open_risk_hides_the_release_and_the_arrow_releases_nothing(self):
def test_chromium_every_card_keeps_the_deck_height_and_its_three_buttons_in_place(self):
ids = [f"review:{self.commit}", "operator:operator/issue", f"review:{self.stale}", f"review:{self.red}"]
sizes = (("page", 1366, 768, "tasks/match"), ("widget", 390, 900, "stream"))
steps = [{"width": width, "height": height, "url": f"{self.base}?{view}-{width}-heights#{route}", "wait": 1500, "shot": str(OUT / f"chromium-{view}-{width}-heights.png"),
"probe": probe(HEIGHTS, ids=json.dumps(ids), widget="true" if view == "widget" else "false", home_kit=dash.HOME)} for view, width, height, route in sizes]
data = self.drive(steps, None, init=INIT)
(OUT / "chromium-heights.json").write_text(json.dumps(data, indent=1), encoding="utf-8")
self.assertEqual([error for error in data["errors"] if "/favicon.ico" not in error], [])
for (view, width, _, _), found in zip(sizes, data["results"], strict=True):
with self.subTest(view=view, width=width):
self.assertNotIn("error", found, found)
seen = found["seen"]
self.assertEqual([one["id"] for one in seen], [*ids, "release"], found)
first = seen[0]
self.assertTrue(first["scrolls"], first)
self.assertEqual([act[0] for act in first["acts"]], ["match-reject", "match-later", "match-accept"], first)
for one in seen[1:]:
self.assertAlmostEqual(one["card"][3], first["card"][3], delta=1, msg=one)
self.assertAlmostEqual(one["card"][3], one["deck"][3] - (one["card"][1] - one["deck"][1]), delta=1, msg=one)
self.assertEqual(len(one["acts"]), 3, one)
for act, kept in zip(one["acts"], first["acts"], strict=True):
for at, was in zip(act[1:], kept[1:], strict=True):
self.assertAlmostEqual(at, was, delta=1, msg=(one, first))
self.assertEqual([act[0] for act in seen[-1]["acts"]], ["match-drop", "match-skip", "match-release"], found)
self.assertFalse(found["wide"], found)
def test_chromium_an_open_risk_greys_the_release_and_the_arrow_releases_nothing(self):
found = self.release("no-risk", 0, False, 0)
self.assertEqual((found["submits"], found["label"], found["front"]), ([], None, "release"), found)
self.assertEqual((found["submits"], found["label"], found["disabled"], found["front"], found["corner"]), ([], "Release", True, "release", []), found)
def test_chromium_release_by_swipe_signs_a_risk_accepted_red_gate_commit_on_its_own_first(self):
found = self.release("risk", 1, True, 2)
self.assertEqual((found["pressed"], found["leaning"], found["label"]), (["true"], "accept", "Release 3 decisions"), found)
self.assertEqual((found["pressed"], found["leaning"], found["label"], found["disabled"]), (["true"], "accept", "Release", False), found)
self.assertEqual(self.sorted_submits(found), [[["review", self.red, "approve"]], sorted([["review", self.commit, "approve"], ["operator", "operator/issue", "approve"]])], found)
self.settle(lambda: self.status(self.red) == "approved" and self.status(self.commit) == "approved")
def test_chromium_a_withdrawn_risk_hides_the_release_again(self):
def test_chromium_d_releases_and_the_undo_countdown_shows_the_hourglass_bottom_right(self):
found = self.release("risk-d", 1, False, 2, "d")
self.assertEqual((found["pressed"], found["disabled"]), (["true"], False), found)
self.assertEqual(len(found["submits"]), 2, found)
self.assertEqual(len(found["corner"]), 1, found)
corner = found["corner"][0]
self.assertEqual((corner["glass"], corner["after"]), (True, True), found)
self.assertTrue(0 <= corner["right"] <= 40 and 0 <= corner["bottom"] <= 40, found)
self.settle(lambda: self.status(self.red) == "approved" and self.status(self.commit) == "approved")
def test_chromium_a_withdrawn_risk_greys_the_release_again(self):
found = self.release("withdrawn", 2, False, 0)
self.assertEqual((found["pressed"], found["label"], found["submits"], found["front"]), (["true", "false"], None, [], "release"), found)
self.assertEqual((found["pressed"], found["label"], found["disabled"], found["submits"], found["front"]), (["true", "false"], "Release", True, [], "release"), found)
if __name__ == "__main__":