feat: project SubWorker activity in sidebar
This commit is contained in:
@@ -28,6 +28,62 @@ Deno.test("Console spinner wraps a reusable timed sequence loop", async () => {
|
||||
assert(spinner.includes("SequenceLoop"), "Spinner should wrap SequenceLoop");
|
||||
});
|
||||
|
||||
Deno.test("sidebar running status reuses the green symbol spinner", async () => {
|
||||
const sidebar = await Deno.readTextFile(
|
||||
new URL(
|
||||
"../src/lib/workspace/sidebar/WorkersNavSection.svelte",
|
||||
import.meta.url,
|
||||
),
|
||||
);
|
||||
const sidebarCss = await Deno.readTextFile(
|
||||
new URL(
|
||||
"../src/lib/workspace/sidebar/sidebar.css",
|
||||
import.meta.url,
|
||||
),
|
||||
);
|
||||
|
||||
assert(
|
||||
sidebar.includes(
|
||||
"import Spinner from '$lib/workspace/console/Spinner.svelte'",
|
||||
),
|
||||
"Workers sidebar should import the reusable symbol Spinner",
|
||||
);
|
||||
assert(
|
||||
sidebar.includes('<Spinner label="Running" />'),
|
||||
"running Workers should render the reusable symbol Spinner",
|
||||
);
|
||||
assert(
|
||||
sidebarCss.includes("--spinner-color: var(--success)"),
|
||||
"sidebar spinner should use the green success token",
|
||||
);
|
||||
assert(
|
||||
sidebar.indexOf("worker.state === 'running'") <
|
||||
sidebar.indexOf("worker.has_running_internal_workers"),
|
||||
"parent running state should keep the green Spinner priority",
|
||||
);
|
||||
assert(
|
||||
sidebar.indexOf("worker.has_running_internal_workers") <
|
||||
sidebar.indexOf("worker.state === 'idle'"),
|
||||
"SubWorker activity should replace the idle dot with the purple Spinner",
|
||||
);
|
||||
assert(
|
||||
sidebar.includes("worker.has_running_internal_workers"),
|
||||
"idle parents should render SubWorker activity from the Workspace projection",
|
||||
);
|
||||
assert(
|
||||
sidebar.includes('<Spinner label="SubWorker running" />'),
|
||||
"running SubWorkers should use the reusable symbol Spinner",
|
||||
);
|
||||
assert(
|
||||
sidebarCss.includes("--spinner-color: var(--tui-magenta)"),
|
||||
"SubWorker spinner should use the purple TUI token",
|
||||
);
|
||||
assert(
|
||||
!sidebarCss.includes("@keyframes worker-status-spin"),
|
||||
"legacy rotating ring spinner should be removed",
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("running status is Composer-side above mini Tasks", async () => {
|
||||
const page = await Deno.readTextFile(
|
||||
new URL(
|
||||
|
||||
Reference in New Issue
Block a user