Skip to content

Commit edef937

Browse files
catlog22claude
andcommitted
feat(v6.1.4): dashboard lite-fix enhancements and workflow docs update
- fix(dashboard): enhance lite-fix session parsing and plan rendering - docs(workflow): add task status update command example for ccw dashboard 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent faa86ed commit edef937

File tree

4 files changed

+685
-6
lines changed

4 files changed

+685
-6
lines changed

.claude/commands/workflow/execute.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ Phase 4: Execution Strategy & Task Execution
6767
├─ Get next in_progress task from TodoWrite
6868
├─ Lazy load task JSON
6969
├─ Launch agent with task context
70-
├─ Mark task completed
70+
├─ Mark task completed (update IMPL-*.json status)
71+
│ # Quick fix: Update task status for ccw dashboard
72+
│ # TS=$(date -Iseconds) && jq --arg ts "$TS" '.status="completed" | .status_history=(.status_history // [])+[{"from":"in_progress","to":"completed","changed_at":$ts}]' IMPL-X.json > tmp.json && mv tmp.json IMPL-X.json
7173
└─ Advance to next task
7274
7375
Phase 5: Completion

ccw/src/core/lite-scanner.js

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ function scanLiteDir(dir, type) {
3939
tasks: loadTaskJsons(sessionPath)
4040
};
4141

42+
// For lite-fix sessions, also load diagnoses separately
43+
if (type === 'lite-fix') {
44+
session.diagnoses = loadDiagnoses(sessionPath);
45+
}
46+
4247
// Calculate progress
4348
session.progress = calculateProgress(session.tasks);
4449

@@ -268,7 +273,7 @@ export function getLiteTaskDetail(workflowDir, type, sessionId) {
268273

269274
if (!existsSync(dir)) return null;
270275

271-
return {
276+
const detail = {
272277
id: sessionId,
273278
type,
274279
path: dir,
@@ -277,6 +282,13 @@ export function getLiteTaskDetail(workflowDir, type, sessionId) {
277282
explorations: loadExplorations(dir),
278283
clarifications: loadClarifications(dir)
279284
};
285+
286+
// For lite-fix sessions, also load diagnoses
287+
if (type === 'lite-fix') {
288+
detail.diagnoses = loadDiagnoses(dir);
289+
}
290+
291+
return detail;
280292
}
281293

282294
/**
@@ -312,3 +324,50 @@ function loadClarifications(sessionPath) {
312324
return null;
313325
}
314326
}
327+
328+
/**
329+
* Load diagnosis files for lite-fix sessions
330+
* Loads diagnosis-*.json files from session root directory
331+
* @param {string} sessionPath - Session directory path
332+
* @returns {Object} - Diagnoses data with manifest and items
333+
*/
334+
function loadDiagnoses(sessionPath) {
335+
const result = {
336+
manifest: null,
337+
items: []
338+
};
339+
340+
// Try to load diagnoses-manifest.json first
341+
const manifestPath = join(sessionPath, 'diagnoses-manifest.json');
342+
if (existsSync(manifestPath)) {
343+
try {
344+
result.manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
345+
} catch {
346+
// Continue without manifest
347+
}
348+
}
349+
350+
// Load all diagnosis-*.json files from session root
351+
try {
352+
const diagnosisFiles = readdirSync(sessionPath)
353+
.filter(f => f.startsWith('diagnosis-') && f.endsWith('.json'));
354+
355+
for (const file of diagnosisFiles) {
356+
const filePath = join(sessionPath, file);
357+
try {
358+
const content = JSON.parse(readFileSync(filePath, 'utf8'));
359+
result.items.push({
360+
id: file.replace('diagnosis-', '').replace('.json', ''),
361+
filename: file,
362+
...content
363+
});
364+
} catch {
365+
// Skip invalid files
366+
}
367+
}
368+
} catch {
369+
// Return empty items if directory read fails
370+
}
371+
372+
return result;
373+
}

0 commit comments

Comments
 (0)