feat(task-board): refine running state indicator

This commit is contained in:
shiyue
2026-08-13 16:16:19 +08:00
parent 214ff4ec88
commit 93641df1ad
10 changed files with 580 additions and 0 deletions

View File

@@ -771,6 +771,26 @@ function assertTaskBoardIntegrationContract() {
saveSessionSource.includes('preserveNewerTaskTrackingForSessionSave(session, targetPath)'),
'Ordinary session persistence must preserve a newer task tracking version written by the classifier'
);
assert(
taskBoardFrontendSource.includes("card.dataset.runtimeState = task.isRunning ? 'running' : 'idle'")
&& taskBoardFrontendSource.includes('isRunning: input.isRunning === true'),
'Task cards should expose the server runtime boolean without matching localized status text'
);
assert(
taskBoardStyleSource.includes("html[data-theme='wasteland'] .ccweb-task-board__card[data-runtime-state='running']::before")
&& taskBoardStyleSource.includes("html[data-theme='wasteland'] .ccweb-task-board__card[data-runtime-state='running']::after")
&& taskBoardStyleSource.includes('@keyframes ccweb-task-board-wasteland-runtime-tracer'),
'Wasteland should keep only an isolated left-edge runtime indicator and tracer'
);
assert(
!/html\[data-theme='wasteland'\] \.ccweb-task-board__card\[data-runtime-state='running'\]\s*\{/.test(taskBoardStyleSource)
&& !taskBoardStyleSource.includes('@keyframes ccweb-task-board-wasteland-runtime-card'),
'Wasteland should not animate or glow the entire running card'
);
assert(
/@media \(prefers-reduced-motion: reduce\)[\s\S]*?\.ccweb-task-board__card\[data-runtime-state='running'\]::after\s*\{[^}]*animation:\s*none;/.test(taskBoardStyleSource),
'Wasteland edge tracer should retain a static reduced-motion treatment'
);
}
function assertFrontendGenerationControlsContract() {