@yemi33/minions 0.1.45 → 0.1.46
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/CHANGELOG.md +5 -0
- package/dashboard/js/render-plans.js +10 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -138,18 +138,24 @@ function renderPlans(plans) {
|
|
|
138
138
|
const isPrdAwaitingApproval = awaitingApprovalPlanFiles.has(p.file);
|
|
139
139
|
const isPrdBlocked = isPrdPaused || isPrdAwaitingApproval;
|
|
140
140
|
const isArchived = p.archived;
|
|
141
|
-
|
|
141
|
+
// Check work item completion — if all items for this plan are done, it's completed
|
|
142
|
+
// (matches the modal's logic, which also checks work items)
|
|
143
|
+
const prdFileForCompletion = planToPrdFile[p.file] || (p.file.endsWith('.json') ? p.file : '');
|
|
144
|
+
const planWi = allWi.filter(w => w.sourcePlan === prdFileForCompletion || w.sourcePlan === p.file);
|
|
145
|
+
const allItemsDone = planWi.length > 0 && planWi.every(w => w.status === 'done' || w.status === 'in-pr' || w.status === 'implemented' || w.status === 'complete');
|
|
146
|
+
const hasActiveWork = planWi.some(w => w.status === 'pending' || w.status === 'dispatched');
|
|
147
|
+
const label = isArchived || (allItemsDone && !hasActiveWork)
|
|
142
148
|
? 'Completed'
|
|
143
|
-
: isPrdAwaitingApproval
|
|
149
|
+
: isPrdAwaitingApproval && !allItemsDone
|
|
144
150
|
? 'Awaiting Approval'
|
|
145
151
|
: isPrdPaused
|
|
146
152
|
? 'Paused'
|
|
147
153
|
: isWorking
|
|
148
154
|
? 'In Progress'
|
|
149
155
|
: (statusLabels[status] || status);
|
|
150
|
-
const needsAction = (status === 'awaiting-approval' || status === 'paused' || isPrdAwaitingApproval || isPrdPaused) && !isArchived;
|
|
156
|
+
const needsAction = (status === 'awaiting-approval' || status === 'paused' || isPrdAwaitingApproval || isPrdPaused) && !isArchived && !allItemsDone;
|
|
151
157
|
const isRevision = status === 'revision-requested' && !isArchived;
|
|
152
|
-
const isCompleted = status === 'completed';
|
|
158
|
+
const isCompleted = status === 'completed' || (allItemsDone && !hasActiveWork);
|
|
153
159
|
const isDraft = (p.format === 'draft' || status === 'draft') && !isCompleted;
|
|
154
160
|
const isAwaitingApproval = status === 'awaiting-approval';
|
|
155
161
|
const isPaused = status === 'paused';
|
package/package.json
CHANGED