fix(hub): E2E repairs of 066 to 084 and unclipped stream code boxes
Real bugs: the 084 limit bar wrapped at 390 px and dropped the hardware chart; the 066 footer rule shrank the mic below 44 px; the board's Running and Prune labels pushed the Tasks head onto two rows; a closed code box cut long commands off instead of scrolling. Resources reads disk use as df does (total = used + available) and gives every hardware kind its own tone. Stale specs follow 067, 070, 072 and 078 decisions. 🎯 Fix: 80 % 💥 Break: 8 % 💸 Tokens: - ⏱️ Velocity: - 🛡️ Security: 100 % 🏆 Score: 74 🚦 Gate: ⛔ fix 80 % < 90, break 8 % > 5 (E2E rerun after 085 to 094, operator word 2026-11-27) Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b0ee62dd0b
commit
ca97776b4d
18 files changed
+67
-29
No files matched your search
@@ -190,18 +190,21 @@ def parse_df(text: str) -> list[dict]:
|
||||
"""Returns:
|
||||
One {mount, used, total} in bytes per block device in the output of
|
||||
df -P -k, at the first mount df lists for it; loop devices and
|
||||
filesystems without a device are left out.
|
||||
filesystems without a device are left out. total is used plus
|
||||
available, the size normal writes can fill, so used / total is df's
|
||||
Capacity; the 1K-blocks column also counts the blocks reserved for
|
||||
root and would understate the fill level.
|
||||
"""
|
||||
found, seen = [], set()
|
||||
for line in text.splitlines()[1:]:
|
||||
parts = line.split(None, 5)
|
||||
if len(parts) < 6 or not parts[0].startswith("/dev/") or parts[0].startswith("/dev/loop") or parts[0] in seen:
|
||||
continue
|
||||
total, used = number(parts[1]), number(parts[2])
|
||||
if total is None or used is None:
|
||||
used, available = number(parts[2]), number(parts[3])
|
||||
if used is None or available is None:
|
||||
continue
|
||||
seen.add(parts[0])
|
||||
found.append({"mount": parts[5], "used": int(used) * KIB, "total": int(total) * KIB})
|
||||
found.append({"mount": parts[5], "used": int(used) * KIB, "total": int(used + available) * KIB})
|
||||
return found
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
*/
|
||||
function pruneControls(stale) {
|
||||
const pending = Prune.pending(state.jobs || [], pruneNow());
|
||||
const open = h("button", {type: "button", class: "btn small", id: "kanban-prune-open", disabled: !stale && !pending, ...named("Prune", "Prune stale tasks: one passkey signs the list and a deadline; the agents can keep a task until then")}, icon("bi-scissors"), "Prune");
|
||||
const open = h("button", {type: "button", class: "btn small icon-only", id: "kanban-prune-open", disabled: !stale && !pending, ...named("Prune", "Prune stale tasks: one passkey signs the list and a deadline; the agents can keep a task until then")}, icon("bi-scissors"));
|
||||
open.addEventListener("click", openPrune);
|
||||
if (!pending) {
|
||||
return [open];
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const RESOURCE = {left: 46, right: 10, wide: 50, top: 6, bottom: 6, axis: 18, poll: 5000, stale: 60, tones: 6, glyph: 6.5, shown: 100, lane: 13};
|
||||
const RESOURCE_PANELS = [["hardware", "bi-cpu", "Hardware: disks, CPU, RAM, swap, GPU and VRAM"], ["tokens", "bi-coin", "Tokens per agent"], ["combined", "bi-layers", "Hardware, tokens and burnup"]];
|
||||
const HARDWARE_TONES = {shades: 3, host: {CPU: "res-cpu", RAM: "res-ram", Swap: "res-swap"}};
|
||||
const RESOURCE_ZONES = {idle: "Idle: below 30 %", saturated: "Saturated: above 90 %"};
|
||||
const RESOURCE_MARKS = {
|
||||
wait: ["#bi-hourglass-split", (mark) => `Idle waiting: ${mark.peak} jobs waited while CPU and RAM stayed under 50 %`, 0],
|
||||
@@ -229,14 +230,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param samples - sampler rows.
|
||||
* @returns the hardware lines, each with its tone: the disks in shades of one hue, CPU, RAM and swap each in its own
|
||||
* hue, every GPU in shades of a further hue and its VRAM in yet another, so that no two kinds share a colour.
|
||||
*/
|
||||
function hardwareSeries(samples) {
|
||||
const tones = new Map();
|
||||
const shades = {disk: new Map(), util: new Map(), vram: new Map()};
|
||||
return Resources.hardware(samples).map((line) => {
|
||||
if (!tones.has(line.name)) {
|
||||
tones.set(line.name, tones.size % RESOURCE.tones);
|
||||
const shade = shades[line.kind];
|
||||
if (shade && !shade.has(line.name)) {
|
||||
shade.set(line.name, shade.size % HARDWARE_TONES.shades);
|
||||
}
|
||||
const tone = shade ? `res-${line.kind}${shade.get(line.name)}` : HARDWARE_TONES.host[line.name];
|
||||
const last = [...line.points].reverse().find(([, value]) => value !== null);
|
||||
return {...line, id: ViewStore.id(line.kind, line.name), label: `${resourceLabel(line)} ${dash(last === undefined ? null : last[1])} %`, tone: `res-c${tones.get(line.name)} k-${line.kind}`};
|
||||
return {...line, id: ViewStore.id(line.kind, line.name), label: `${resourceLabel(line)} ${dash(last === undefined ? null : last[1])} %`, tone: `${tone} k-${line.kind}`};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -26,5 +26,5 @@
|
||||
kanban.running = !kanban.running;
|
||||
taskView.sig = "";
|
||||
drawTasks();
|
||||
}}}, icon("bi-activity"), "Running", counter(count));
|
||||
}}}, icon("bi-activity"), counter(count));
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
.feedback-float { position: fixed; z-index: 40; padding: 2px; border-radius: 10px; background: var(--glass-card); box-shadow: var(--shadow); }
|
||||
.code-box { display: flex; flex-direction: column; min-width: 0; margin-top: 4px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
|
||||
.code-body { display: grid; gap: var(--sp-1); min-width: 0; padding: 7px 10px; }
|
||||
.code-box[data-open="false"] > .code-body { max-height: 12lh; overflow: hidden; }
|
||||
.code-box[data-open="false"] > .code-body { max-height: 12lh; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
|
||||
.code-box[data-place="closed"] > .code-body { max-height: calc(1lh + 14px); }
|
||||
.code-box[data-place="closed"] .command > .linkish { min-width: 0; max-width: 100%; overflow: hidden; }
|
||||
.code-box[data-place="closed"] .command code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
@@ -69,9 +69,12 @@ svg .res-icon.hung { fill: var(--violet); pointer-events: none; }
|
||||
svg .res-icon.asleep, svg .res-icon.unknown { fill: var(--muted); }
|
||||
svg .res-bar { fill: var(--c); }
|
||||
svg .res-bar.faint { opacity: 0.35; }
|
||||
.res-limits { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; font-size: var(--fs-xs); }
|
||||
.res-panel.res-hardware { min-height: min-content; }
|
||||
.res-panel.res-hardware > .res-plot { min-height: 48px; }
|
||||
.res-limits { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; font-size: var(--fs-xs); }
|
||||
.res-limits > * { flex: none; }
|
||||
.res-limits .segmented button { padding: 2px 8px; font-size: var(--fs-xs); }
|
||||
.limit-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.res-limits > .limit-note { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.limit-error { margin: 0; color: var(--bad); }
|
||||
.limits-table { border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
|
||||
.limits-table th, .limits-table td { padding: 3px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
|
||||
@@ -92,5 +95,17 @@ svg .res-target text { fill: var(--muted); font-size: var(--fs-2xs); }
|
||||
.res-c3 { --c: var(--warn); }
|
||||
.res-c4 { --c: var(--violet); }
|
||||
.res-c5 { --c: var(--bad); }
|
||||
.res-disk0 { --c: var(--ok); }
|
||||
.res-disk1 { --c: color-mix(in srgb, var(--ok) 55%, var(--text)); }
|
||||
.res-disk2 { --c: color-mix(in srgb, var(--ok) 55%, var(--panel)); }
|
||||
.res-cpu { --c: var(--info); }
|
||||
.res-ram { --c: var(--violet); }
|
||||
.res-swap { --c: var(--warn); }
|
||||
.res-util0 { --c: color-mix(in srgb, var(--bad) 50%, var(--violet)); }
|
||||
.res-util1 { --c: color-mix(in srgb, color-mix(in srgb, var(--bad) 50%, var(--violet)) 55%, var(--text)); }
|
||||
.res-util2 { --c: color-mix(in srgb, color-mix(in srgb, var(--bad) 50%, var(--violet)) 55%, var(--panel)); }
|
||||
.res-vram0 { --c: var(--bad); }
|
||||
.res-vram1 { --c: color-mix(in srgb, var(--bad) 55%, var(--text)); }
|
||||
.res-vram2 { --c: color-mix(in srgb, var(--bad) 55%, var(--panel)); }
|
||||
.res-burn.k-done { --c: var(--ok); }
|
||||
.res-burn.k-scope { --c: var(--text); }
|
||||
@@ -112,6 +112,7 @@ body.fit .spot-host { flex: none; }
|
||||
@container composer-foot (max-width: 480px) {
|
||||
.composer .cell-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
||||
}
|
||||
@media (max-width: 640px) { .composer .composer-foot :is(button, summary) { min-width: 44px; min-height: 44px; } }
|
||||
@media (prefers-reduced-motion: reduce) { .composer .composer-foot .bi { animation: none; } }
|
||||
[data-rec="busy"] > .bi { animation: presence-spin 1.2s linear infinite; }
|
||||
@media (prefers-reduced-motion: reduce) { [data-rec="busy"] > .bi { animation: none; } }
|
||||
|
||||
Reference in new issue
Block a user