@prmichaelsen/acp-visualizer 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prmichaelsen/acp-visualizer",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "description": "Browser-based dashboard for visualizing ACP progress.yaml data",
6
6
  "bin": {
@@ -135,7 +135,11 @@ function normalizeMilestone(raw: unknown, index: number): Milestone {
135
135
  id: safeString(known.id, `milestone_${index + 1}`),
136
136
  name: safeString(known.name, `Milestone ${index + 1}`),
137
137
  status: normalizeStatus(known.status),
138
- progress: safeNumber(known.progress),
138
+ progress: known.progress != null
139
+ ? safeNumber(known.progress)
140
+ : safeNumber(known.tasks_total) > 0
141
+ ? Math.round((safeNumber(known.tasks_completed) / safeNumber(known.tasks_total)) * 100)
142
+ : normalizeStatus(known.status) === 'completed' ? 100 : 0,
139
143
  started: known.started ? safeString(known.started) : null,
140
144
  completed: known.completed ? safeString(known.completed) : null,
141
145
  estimated_weeks: safeString(known.estimated_weeks, '0'),