fix(hub): resize the 3D canvas with its box and repair five stale e2e

The 3D graph took its size once from the box, so a later scrollbar cut
it at 390; a ResizeObserver now follows the box and is disconnected on
dispose. The e2e follow 78d4e4a (match swipe's ids method shadowed the
case's request counter, now card_ids), af3555e (three reveal buttons),
94bf0b4 (legend toggle in the Home tile head), a4f7017 (the runner
needs SHELL for its login shell) and 50363b1 (rules live in their own
Controls tab).

🎯 Fix: 85 %
💥 Break: 4 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 82
🚦 Gate: ⛔ fix 85 % < 90

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-23 11:19:23 +00:00
1 parent d6e8b4a923
commit ccc80f17c1
6 files changed
+23 -15

No files matched your search

+1
View File
@@ -209,6 +209,7 @@ RULES_OVERLAP = """(async () => {@HELPERS@@CLASHES@
if (open) {
open.click();
}
(await until(() => document.getElementById("controls-tab-rules"), 8000)).click();
const rules = await until(() => document.querySelector("#main .rule-form"), 8000);
const kind = rules.querySelector("select");
const found = {};
+3 -2
View File
@@ -123,7 +123,8 @@ HEADERS = """(async () => {@HELPERS@@HOME@@KIT@
return {
key: node.dataset.pin, w: Number(node.dataset.w), gone: node.classList.contains("gone"), overflow: head.scrollWidth > head.clientWidth + 1,
outside: shown.filter((child) => child.getBoundingClientRect().left < box.left - 0.5 || child.getBoundingClientRect().right > box.right + 0.5).map((child) => child.className),
order: shown.map((child) => [...child.classList].find((name) => name.startsWith("home-"))),
order: shown.map((child) => [...child.classList].find((name) => name.startsWith("home-") || name === "legend-toggle")),
legend: Boolean(head.querySelector(".legend-toggle")),
ellipsis: [getComputedStyle(title).textOverflow, getComputedStyle(title).whiteSpace, title.scrollWidth > title.clientWidth],
open: open.hidden ? null : {href: open.getAttribute("href"), title: open.getAttribute("title"), label: open.getAttribute("aria-label"), tag: open.tagName, focused, tabIndex: open.tabIndex, size: rect(open), unpin: rect(head.querySelector(".home-unpin")), glyph: open.querySelector("use").getAttribute("href")},
};
@@ -233,7 +234,7 @@ class TestHomeTileOpen(HubCase):
self.assertEqual(head["order"], ["home-grip", "home-title", "home-unpin"], head)
continue
self.assertFalse(head["gone"], head)
self.assertEqual(head["order"], ["home-grip", "home-title", "home-open", "home-unpin"], head)
self.assertEqual(head["order"], ["home-grip", "home-title", *(["legend-toggle"] if head["legend"] else []), "home-open", "home-unpin"], head)
found = head["open"]
self.assertEqual((found["tag"], found["label"], found["focused"], found["tabIndex"], found["glyph"]), ("A", "Open", True, 0, "#bi-arrows-angle-expand"), found)
self.assertTrue(found["title"].startswith("Open: show ") and found["title"].endswith(" in full view"), found)
+1 -1
View File
@@ -64,7 +64,7 @@ class TestHubInbox(base.OrchestratorE2ECase):
def run_jobs() -> None:
if any(job["status"] == "queued" for job in self.httpd.hub.jobs.listed()):
subprocess.run([sys.executable, str(RUNNER), "--port", str(self.port), "--interval", "0.1", *trust, "--once"], capture_output=True, timeout=120, check=False)
subprocess.run([sys.executable, str(RUNNER), "--port", str(self.port), "--interval", "0.1", *trust, "--once"], capture_output=True, timeout=120, check=False, env={**os.environ, "SHELL": str(self.shell)})
self.beside(run_jobs)
private = "".join(line for line in signer.pem.read_text(encoding="utf-8").splitlines() if not line.startswith("-----"))
+8 -8
View File
@@ -132,16 +132,16 @@ class TestMatchSwipe(HubCase):
super().setUp()
self.cards()
def ids(self) -> dict[str, str]:
def card_ids(self) -> dict[str, str]:
return {"COMMIT": f"review:{self.commit}", "COMMAND": "operator:operator/issue", "STALE": f"review:{self.stale}"}
def measured(self, driver: str, binary: str) -> dict[int, list[dict]]:
steps = [{"width": width, "height": height, "url": f"{self.base}?{width}-measure#tasks/match", "wait": 1500, "probe": probe(MEASURE, **self.ids()), "shot": None} for width, height in base.WIDTHS]
steps = [{"width": width, "height": height, "url": f"{self.base}?{width}-measure#tasks/match", "wait": 1500, "probe": probe(MEASURE, **self.card_ids()), "shot": None} for width, height in base.WIDTHS]
data = self.drive(steps, None, driver, binary)
found = {}
for result, (width, _) in zip(data["results"], base.WIDTHS, strict=True):
self.assertNotIn("error", result, result)
self.assertEqual([point["front"] for point in result["points"]], [self.ids()[name] for name in ("COMMIT", "COMMAND", "STALE", "COMMIT")], result)
self.assertEqual([point["front"] for point in result["points"]], [self.card_ids()[name] for name in ("COMMIT", "COMMAND", "STALE", "COMMIT")], result)
self.assertEqual(result["tally"], "1", result)
found[width] = result["points"]
return found
@@ -155,17 +155,17 @@ class TestMatchSwipe(HubCase):
shot = str(OUT / f"{browser}-{width}")
at = {"width": width, "height": height}
steps += [
{**at, "url": f"{self.base}?{width}-swipe#tasks/match", "wait": 1500, "probe": probe(START, X=commit["x"], Y=commit["y"], **self.ids()), "shot": None},
{**at, "url": None, "wait": 0, "drag": [[commit["x"], commit["y"]], [commit["x"], max(commit["y"] - LIFT, 2)]], "probe": probe(LATER, X=command["x"], Y=command["y"], **self.ids()), "shot": None},
{**at, "url": None, "wait": 0, "drag": sideways(command, width, -1), "probe": probe(REJECT, X=stale["x"], Y=stale["y"], **self.ids()), "shot": None},
{**at, "url": None, "wait": 0, "drag": sideways(stale, width, 1), "probe": probe(REFUSED, X=again["x"], Y=again["y"], **self.ids()), "shot": None},
{**at, "url": f"{self.base}?{width}-swipe#tasks/match", "wait": 1500, "probe": probe(START, X=commit["x"], Y=commit["y"], **self.card_ids()), "shot": None},
{**at, "url": None, "wait": 0, "drag": [[commit["x"], commit["y"]], [commit["x"], max(commit["y"] - LIFT, 2)]], "probe": probe(LATER, X=command["x"], Y=command["y"], **self.card_ids()), "shot": None},
{**at, "url": None, "wait": 0, "drag": sideways(command, width, -1), "probe": probe(REJECT, X=stale["x"], Y=stale["y"], **self.card_ids()), "shot": None},
{**at, "url": None, "wait": 0, "drag": sideways(stale, width, 1), "probe": probe(REFUSED, X=again["x"], Y=again["y"], **self.card_ids()), "shot": None},
{**at, "url": None, "wait": 0, "drag": sideways(again, width, 1), "probe": probe(ACCEPT), "shot": f"{shot}-swiped-decisions.png"},
]
return steps
def check(self, data: dict) -> None:
self.assertEqual([error for error in data["errors"] if "/favicon.ico" not in error], [])
ids = self.ids()
ids = self.card_ids()
results = iter(data["results"])
for width, _ in base.WIDTHS:
start, later, reject, refused, accept = (next(results) for _ in range(5))
+3 -3
View File
@@ -110,7 +110,7 @@ class TestRevealWithheld(base.OrchestratorE2ECase):
def check(self, data: dict, browser: str, signs: bool) -> None:
self.assertEqual([error for error in data["errors"] if "(style-src-elem)" not in error and "/favicon.ico" not in error], [])
hidden = {"hidden": ["masked", "content withheld", None], "buttons": ["Reveal", "Reveal"], "masked": True, "clear": []}
hidden = {"hidden": ["masked", "content withheld", None], "buttons": ["Reveal all 2", "Reveal", "Reveal"], "masked": True, "clear": []}
results = iter(data["results"])
for width, _ in WIDTHS:
ids = self.sets[width]
@@ -118,7 +118,7 @@ class TestRevealWithheld(base.OrchestratorE2ECase):
with self.subTest(browser=browser, width=width):
self.assertNotIn("error", show, show)
self.assertEqual(show["one"], hidden, show)
self.assertEqual(show["all"], {**hidden, "buttons": ["Reveal all 2", "Reveal", "Reveal"]}, show)
self.assertEqual(show["all"], hidden, show)
self.assertEqual(show["leaked"], [], show)
one_id, all_id = (ids[name].split(":", 1)[1] for name in ("ONE", "ALL"))
self.assertEqual(one["posted"], [[f"review/{one_id}/reveal/sign", ["app.py"]], *([[f"review/{one_id}/reveal", ["app.py"]]] if signs else [])], one)
@@ -127,7 +127,7 @@ class TestRevealWithheld(base.OrchestratorE2ECase):
self.assertEqual(one["after"], {"hidden": ["revealed", "content withheld", None], "buttons": ["Reveal"], "masked": False, "clear": ["plain-example"]}, one)
self.assertEqual(every["after"], {"hidden": ["revealed", "revealed", None], "buttons": [], "masked": False, "clear": list(WORDS)}, every)
else:
self.assertEqual((one["after"], every["after"]), (hidden, {**hidden, "buttons": ["Reveal all 2", "Reveal", "Reveal"]}))
self.assertEqual((one["after"], every["after"]), (hidden, hidden))
self.assertEqual((one["kept"], every["kept"]), ([], []))
self.assertFalse(any(found["wide"] for found in (show, one, every)), width)