fix(orchestrator): E2E repairs of 085 to 099 and fades scoped to the swapped box
The first E2E run of 085 to 099 failed 69 tests and errored 2; every spec is green again when run alone, and a full rerun left only a Firefox swipe flake. That flake was a real defect: fadeSwap() ran a page-wide View Transition, and captured content takes no pointer hits, so a click or swipe during any list fade was lost. fadeTransition(run, box) now names only the swapped box (view-transition-name list-swap, the root none), so everything outside it stays hit-testable; screen changes stay page-wide. test_hub_motion_e2e proves a hit outside the box during a real fadeSwap; it fails with the scoping removed. The swipe spec passed 3 of 3 runs. Code: the Filter menu opens leftwards instead of past the viewport; kanban lines measure beating cards at rest; a 409 toast names the row's title; viewstore keeps the board legend; a closing context menu drops its focus; the first closed-cards poll only takes a baseline (081 cadence); the Match tile keeps the deck height; a swipe never starts a native link drag; the heartbeat glow survives reduced motion; the Resources toolbar fits 390 px; the Send button keeps 44 px. Specs: elements fading out (086) and the new Claude dialogs section (094) are expected; probes skip the docked bubble's own avatar (098); no assertion was loosened. MEDUSA: 5 false positives accepted on the operator's word (MM-SCAN-058 regex PLA in errors=replace, WM-SCAN-354 regex ELS in else ... code, EXA007 toolbar line moved). 🎯 Fix: 94 % 💥 Break: 4 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 90 🚦 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
38788b54a5
commit
0b4e3d3e6a
33 files changed
+124
-52
No files matched your search
@@ -25,7 +25,7 @@ VIEW = {
|
||||
APPROVAL_MODES = ("direct", "select")
|
||||
LEGEND_PANELS = (
|
||||
"agents/orbit", "agents/chord", "agents/swimlane", "artifacts/orbit", "artifacts/chord", "artifacts/swimlane",
|
||||
"tasks/rasci", "tasks/gantt", "tasks/burn", "resources-hardware", "resources-tokens", "resources-combined",
|
||||
"tasks/board", "tasks/rasci", "tasks/gantt", "tasks/burn", "resources-hardware", "resources-tokens", "resources-combined",
|
||||
)
|
||||
PIN_KEY = re.compile(r"[A-Za-z0-9:_./-]{1,32}:[A-Za-z0-9:_./-]{1,200}")
|
||||
VIEW_PATH = re.compile(r"[A-Za-z]{1,32}(?:\.[A-Za-z]{1,32})?")
|
||||
|
||||
@@ -29,7 +29,10 @@ button, input, select { font: inherit; color: inherit; }
|
||||
code, pre { font-family: var(--mono); font-size: var(--fs-sm); }
|
||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
|
||||
.top, .navbar, main, .popup-box, .sheet-box, .palette-box, .toast, .sky-panel, .menu-box { -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: background-color .8s var(--ease), border-color .8s var(--ease); }
|
||||
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: var(--ease); }
|
||||
::view-transition-old(root), ::view-transition-new(root), ::view-transition-group(list-swap), ::view-transition-old(list-swap), ::view-transition-new(list-swap) { animation-duration: .22s; animation-timing-function: var(--ease); }
|
||||
.swap-scope { view-transition-name: none; }
|
||||
.swap-box { view-transition-name: list-swap; }
|
||||
::view-transition { pointer-events: none; }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
|
||||
}
|
||||
|
||||
@@ -219,6 +219,9 @@
|
||||
if (restore && back && back.isConnected && typeof back.focus === "function") {
|
||||
back.focus({preventScroll: true});
|
||||
}
|
||||
if (node.contains(document.activeElement)) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
}
|
||||
|
||||
function ctxRun(item) {
|
||||
@@ -241,6 +244,9 @@
|
||||
}
|
||||
|
||||
function ctxKeys(event) {
|
||||
if (event.currentTarget !== ctxMenu.node) {
|
||||
return;
|
||||
}
|
||||
const items = [...ctxMenu.node.querySelectorAll(CTX_ITEMS)];
|
||||
const at = items.indexOf(document.activeElement);
|
||||
const moves = {ArrowDown: at + 1, ArrowUp: Math.max(at, 0) - 1, Home: 0, End: items.length - 1};
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
* @param {Function} [around] called as around(box, swap) in place of swap(), for a keeper such as keepTyping() or for
|
||||
* work that needs nodes in the page.
|
||||
* @returns {Promise} settles once box holds nodes. When a keyed child leaves, the swap runs inside fadeTransition()
|
||||
* so it fades out; else at once. Only the newest nodes given for box land, so a late transition never undoes a
|
||||
* scoped to box, so it fades out while the rest of the page keeps taking clicks; else at once. Only the newest nodes given for box land, so a late transition never undoes a
|
||||
* newer swap.
|
||||
*/
|
||||
function fadeSwap(box, nodes, around) {
|
||||
@@ -257,7 +257,7 @@
|
||||
run();
|
||||
return Promise.resolve();
|
||||
}
|
||||
return fadeTransition(run);
|
||||
return fadeTransition(run, box);
|
||||
}
|
||||
|
||||
function toast(title, lines, good) {
|
||||
|
||||
@@ -121,7 +121,8 @@
|
||||
/**
|
||||
* @param {object} result a hub answer; a 409 carries {id, status} of the item it refused.
|
||||
* @param {string} label the batch's label.
|
||||
* @param {Map<string, string>|undefined} names item id to the title the toast shows instead of the id.
|
||||
* @param {Map<string, string>|undefined} names item id to the title the toast shows instead of the id; without an
|
||||
* entry the title of the inbox row with that id shows, the id only when no row has it.
|
||||
* @returns {boolean} whether it was such a refusal: kept in refusedIds and toasted by title.
|
||||
*/
|
||||
function namedRefusal(result, label, names) {
|
||||
@@ -130,8 +131,9 @@
|
||||
return false;
|
||||
}
|
||||
const status = typeof result.data.status === "string" ? result.data.status : "refused";
|
||||
const row = state.inbox.find((item) => item.id === id);
|
||||
refusedIds.set(id, status);
|
||||
toast(`${label}: not possible`, [`${(names && names.get(id)) || id}: ${status}`], false);
|
||||
toast(`${label}: not possible`, [`${(names && names.get(id)) || (row ? short(row.title) : id)}: ${status}`], false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -335,8 +335,17 @@
|
||||
const svg = box.querySelector("svg.kanban-lines");
|
||||
const base = box.getBoundingClientRect();
|
||||
const rectIn = (node) => {
|
||||
const found = node && node.getClientRects().length ? node.getBoundingClientRect() : null;
|
||||
return found && {x: found.left - base.left, y: found.top - base.top, w: found.width, h: found.height};
|
||||
if (!node || !node.getClientRects().length) {
|
||||
return null;
|
||||
}
|
||||
const found = node.getBoundingClientRect();
|
||||
// The heartbeat scales a working card about its centre and fires no resize: lines take the resting geometry.
|
||||
const beat = node.closest(".is-working");
|
||||
const look = beat ? getComputedStyle(beat).transform : "none";
|
||||
const scale = look === "none" ? 1 : new DOMMatrixReadOnly(look).a;
|
||||
const outer = beat ? beat.getBoundingClientRect() : found;
|
||||
const [cx, cy] = [outer.left + outer.width / 2, outer.top + outer.height / 2];
|
||||
return {x: cx + (found.left - cx) / scale - base.left, y: cy + (found.top - cy) / scale - base.top, w: found.width / scale, h: found.height / scale};
|
||||
};
|
||||
const cardNode = (task) => [...box.querySelectorAll(".kanban-card")].find((card) => card.dataset.task === task) || null;
|
||||
const rectOf = (task) => rectIn(cardNode(task));
|
||||
|
||||
@@ -73,12 +73,13 @@
|
||||
}
|
||||
|
||||
const CLOSED_POLL = 2000;
|
||||
const closedWatch = {seen: null, busy: false};
|
||||
const closedWatch = {seen: null, busy: false, primed: false};
|
||||
|
||||
/**
|
||||
* @returns {Promise<void>} settled once the hub's count of closed cards (/api/match/closed) is read; when it moved
|
||||
* since the last read, the first read included, an open Match deck fetches its cards and the state reloads at once
|
||||
* instead of at their next interval, so a card answered in Claude or another browser leaves within one CLOSED_POLL.
|
||||
* @returns {Promise<void>} settled once the hub's count of closed cards (/api/match/closed) is read; the first read,
|
||||
* taken at start beside the page's own first loads, only sets the baseline; when the count moved since the last
|
||||
* read, an open Match deck fetches its cards and the state reloads at once instead of at their next interval, so a
|
||||
* card answered in Claude or another browser leaves within one CLOSED_POLL.
|
||||
*/
|
||||
async function watchClosed() {
|
||||
if (closedWatch.busy) {
|
||||
@@ -88,11 +89,14 @@
|
||||
try {
|
||||
const response = await fetch("/api/match/closed", {cache: "no-store"});
|
||||
const data = response.ok ? await response.json() : null;
|
||||
if (data && data.closed !== closedWatch.seen) {
|
||||
closedWatch.seen = data.closed;
|
||||
if (matchShown()) {
|
||||
fetchMatch();
|
||||
}
|
||||
const moved = Boolean(data) && data.closed !== closedWatch.seen && closedWatch.primed;
|
||||
if (data) {
|
||||
Object.assign(closedWatch, {seen: data.closed, primed: true});
|
||||
}
|
||||
if (moved && matchShown()) {
|
||||
fetchMatch();
|
||||
}
|
||||
if (moved) {
|
||||
refresh();
|
||||
}
|
||||
} catch {
|
||||
|
||||
@@ -841,6 +841,12 @@
|
||||
}
|
||||
acts[swiped]();
|
||||
};
|
||||
article.addEventListener("dragstart", (event) => {
|
||||
// The swipe moves the card under the pressed point, so the browser would drag the link that lands there.
|
||||
if (matchView.drag) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
head.addEventListener("pointerdown", (event) => {
|
||||
if (event.button !== 0 || matchView.drag || (event.target instanceof Element && event.target.closest("button, a, input, textarea, select"))) {
|
||||
return;
|
||||
|
||||
@@ -54,19 +54,30 @@
|
||||
|
||||
/**
|
||||
* @param {Function} run changes the DOM.
|
||||
* @param {Element} [box] the one container run changes. Only box is then captured, through the swap-box class, while
|
||||
* swap-scope takes the root out of the transition: a captured element takes no clicks until the transition ends,
|
||||
* so the rest of the page stays live. Without box the whole page is captured.
|
||||
* @returns {Promise} settles once run has changed the DOM. Inside a View Transition, so what leaves fades out; at once
|
||||
* without the API, under prefers-reduced-motion and while another transition runs, whose live new view then shows
|
||||
* the change.
|
||||
*/
|
||||
function fadeTransition(run) {
|
||||
function fadeTransition(run, box) {
|
||||
if (!document.startViewTransition || calm.matches || viewShift.running) {
|
||||
run();
|
||||
return Promise.resolve();
|
||||
}
|
||||
viewShift.running = true;
|
||||
if (box) {
|
||||
document.documentElement.classList.add("swap-scope");
|
||||
box.classList.add("swap-box");
|
||||
}
|
||||
const shift = document.startViewTransition(run);
|
||||
const done = () => {
|
||||
viewShift.running = false;
|
||||
if (box) {
|
||||
document.documentElement.classList.remove("swap-scope");
|
||||
box.classList.remove("swap-box");
|
||||
}
|
||||
};
|
||||
shift.finished.then(done, done);
|
||||
shift.ready.catch((error) => {
|
||||
|
||||
@@ -185,13 +185,13 @@
|
||||
* @param label - the summary's name.
|
||||
* @param hint - the summary's tooltip.
|
||||
* @param name - the summary's icon.
|
||||
* @param end - whether the box opens to the left, for a menu near the right edge.
|
||||
* @param parts - the box's sections.
|
||||
* @returns {HTMLElement} a details.menu of the Tasks toolbar.
|
||||
* @returns {HTMLElement} a details.menu of the Tasks toolbar; its box opens to the left, because the search field
|
||||
* pushes both menus to the right edge of the one-row toolbar.
|
||||
*/
|
||||
function taskMenu(id, label, hint, name, end, parts) {
|
||||
function taskMenu(id, label, hint, name, parts) {
|
||||
return h("details", {class: "menu task-menu", id}, h("summary", named(label, hint), icon(name), h("span", {class: "tool-word"}, label), caret()),
|
||||
h("div", {class: end ? "menu-box end" : "menu-box"}, parts));
|
||||
h("div", {class: "menu-box end"}, parts));
|
||||
}
|
||||
|
||||
const taskSection = (title, ...nodes) => h("section", {class: "task-menu-section"}, h("h3", {}, title), ...nodes);
|
||||
@@ -243,9 +243,9 @@
|
||||
taskView.plan = null;
|
||||
taskView.bulk = null;
|
||||
const plan = inbox ? null : planTools(view);
|
||||
const filter = taskMenu("task-filter", "Filter", "Filter: the status tabs with their counts, the board toggles and the options of this view", "bi-funnel", false, [
|
||||
const filter = taskMenu("task-filter", "Filter", "Filter: the status tabs with their counts, the board toggles and the options of this view", "bi-funnel", [
|
||||
taskSection("Status", chips), board ? taskSection("Board", boardFilters) : null, plan ? taskSection("View", h("div", {class: "task-menu-tools"}, plan.view)) : null]);
|
||||
const actions = taskMenu("task-actions", "Actions", "Actions: prune stale tasks, apply or discard staged moves, request estimates or choices, undo a signature", "bi-lightning", true, [
|
||||
const actions = taskMenu("task-actions", "Actions", "Actions: prune stale tasks, apply or discard staged moves, request estimates or choices, undo a signature", "bi-lightning", [
|
||||
board ? taskSection("Board", boardActions) : null, plan ? taskSection("Plan", h("div", {class: "task-menu-tools"}, plan.actions)) : null, taskSection("Undo", undo), choiceMenu()]);
|
||||
const bar = boxHead("Tasks", "task-toolbar task-bar", taskViewSwitch(inbox), search, filter, chip, status, actions, count);
|
||||
undoView.box = undo;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
document.addEventListener("visibilitychange", () => document.hidden || [moving, syncRadio].forEach((task) => task()));
|
||||
window.setInterval(poll, 10000);
|
||||
window.setInterval(follow, 3000);
|
||||
whileShown(watchClosed)();
|
||||
window.setInterval(whileShown(watchClosed), CLOSED_POLL);
|
||||
window.setInterval(whileShown(moving), RELAYOUT);
|
||||
window.setInterval(whileShown(liveSky), 30000);
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
.graph.tasks.match > .match-stack { flex: 1; }
|
||||
.match-home { display: grid; grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
|
||||
.match-home > .graph.match { grid-template-rows: minmax(0, 1fr); min-height: 0; }
|
||||
/* A tile's .home-chain turns the walked wrappers into flex columns; the stack and the deck keep their grid rows so every card keeps the deck's height. */
|
||||
.home-body .match-home :is(.match-stack, .match-deck) { display: grid; }
|
||||
.match-stack { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--sp-2); min-height: 0; width: min(100%, 960px); margin: 0 auto; }
|
||||
.match-stack[data-wide="true"] { width: 100%; }
|
||||
.match-widen { position: absolute; top: 12px; right: 12px; z-index: 1; }
|
||||
|
||||
@@ -75,7 +75,7 @@ svg .res-bar.faint { opacity: 0.35; }
|
||||
.res-view-menu, .res-limits-menu { position: relative; }
|
||||
.res-view-menu > summary, .res-limits-menu > summary { padding: 4px 10px; }
|
||||
.res-view-menu .menu-box, .res-limits-menu .menu-box { gap: 2px; min-width: 11rem; padding: 6px; }
|
||||
@media (max-width: 640px) { .res-view-menu > summary > span { display: none; } }
|
||||
@media (max-width: 640px) { :is(.res-view-menu, .res-panels-menu) > summary > span { display: none; } }
|
||||
.res-limits-menu .menu-box h3 { padding: 6px 6px 2px; }
|
||||
.res-limits-menu .limit-profiles { margin: 2px 6px 6px; }
|
||||
.res-limits-menu .limit-matrix { justify-self: start; margin: 2px 6px; }
|
||||
|
||||
@@ -135,7 +135,7 @@ body.fit .spot-host { flex: none; }
|
||||
.to-one > label:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
|
||||
.to-one > label > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
|
||||
.agent-foot > .agent-send { flex: none; }
|
||||
@media (max-width: 640px) { .to-one > label, .agent-foot > .agent-send { min-width: 44px; min-height: 44px; } }
|
||||
@media (max-width: 640px) { .to-one > label, .agent-foot > .btn.small.agent-send { min-width: 44px; min-height: 44px; } }
|
||||
.radio-home-radio-speak .composer { flex: 1 1 0; grid-template-rows: minmax(0, 1fr); min-height: 0; }
|
||||
.radio-home-radio-speak .mic-area { min-height: 0; }
|
||||
.radio-home-radio-speak .mic-area > textarea { flex: 1 1 0; min-height: 2rem; max-height: none; resize: none; }
|
||||
@@ -395,4 +395,5 @@ body.fit .spot-host { flex: none; }
|
||||
0%, 42%, 100% { box-shadow: 0 0 4px 0 var(--beat); }
|
||||
10%, 30% { box-shadow: 0 0 12px 3px var(--beat); }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) { .is-working { animation-name: lub-dub-glow; } }
|
||||
/* !important: the global reduced-motion rule in index.html.j2 sets every animation-duration to 0s !important. */
|
||||
@media (prefers-reduced-motion: reduce) { .is-working { animation-name: lub-dub-glow; animation-duration: 1.2s !important; } }
|
||||
Reference in new issue
Block a user