@yemi33/minions 0.1.77 → 0.1.79
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 +10 -0
- package/dashboard/js/render-prd.js +10 -9
- package/engine.js +16 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -31,13 +31,14 @@ function renderPrd(prd, prog) {
|
|
|
31
31
|
let actions = '';
|
|
32
32
|
if (prdFile) {
|
|
33
33
|
if (effectiveStatus === 'awaiting-approval') {
|
|
34
|
-
actions = ' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--green);border-color:var(--green);margin-left:4px" onclick="planApprove(\'' + escHtml(prdFile) + '\')">Approve</button>';
|
|
34
|
+
actions = ' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--green);border-color:var(--green);margin-left:4px" onclick="planApprove(\'' + escHtml(prdFile) + '\',this)">Approve</button>';
|
|
35
35
|
} else if (effectiveStatus === 'completed') {
|
|
36
|
-
actions = ' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--green);border-color:var(--green);margin-left:4px" onclick="triggerVerify(\'' + escHtml(prdFile) + '\')">Verify</button>'
|
|
36
|
+
actions = ' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--green);border-color:var(--green);margin-left:4px" onclick="triggerVerify(\'' + escHtml(prdFile) + '\',this)">Verify</button>' +
|
|
37
|
+
' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--muted);border-color:var(--border);margin-left:4px" onclick="planDelete(\'' + escHtml(prdFile) + '\')">Archive</button>';
|
|
37
38
|
} else if (effectiveStatus === 'in-progress') {
|
|
38
|
-
actions = ' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--yellow);border-color:var(--yellow);margin-left:4px" onclick="planPause(\'' + escHtml(prdFile) + '\')">Pause</button>';
|
|
39
|
+
actions = ' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--yellow);border-color:var(--yellow);margin-left:4px" onclick="planPause(\'' + escHtml(prdFile) + '\',this)">Pause</button>';
|
|
39
40
|
} else if (effectiveStatus === 'paused') {
|
|
40
|
-
actions = ' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--green);border-color:var(--green);margin-left:4px" onclick="planApprove(\'' + escHtml(prdFile) + '\')">Resume</button>';
|
|
41
|
+
actions = ' <button class="pr-pager-btn" style="font-size:9px;padding:1px 6px;color:var(--green);border-color:var(--green);margin-left:4px" onclick="planApprove(\'' + escHtml(prdFile) + '\',this)">Resume</button>';
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -211,14 +212,14 @@ function renderPrdProgress(prog) {
|
|
|
211
212
|
'<span onclick="event.stopPropagation();planView(\'' + escHtml(g.sourcePlan || g.file) + '\')" style="color:var(--blue);cursor:pointer;font-size:10px;padding:2px 8px;background:rgba(56,139,253,0.1);border:1px solid rgba(56,139,253,0.3);border-radius:4px" title="Review latest plan changes">Review plan</span>' +
|
|
212
213
|
'</div>'
|
|
213
214
|
: '';
|
|
214
|
-
const isCompleted = t && t.allDone;
|
|
215
|
+
const isCompleted = (t && t.allDone) || (done > 0 && done === g.items.length);
|
|
215
216
|
const pauseResumeBtn = isAwaitingApproval
|
|
216
|
-
? '<span onclick="event.stopPropagation();planApprove(\'' + escHtml(g.file) + '\')" style="color:var(--green);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(63,185,80,0.1);border:1px solid rgba(63,185,80,0.3);border-radius:3px">Approve</span>'
|
|
217
|
+
? '<span onclick="event.stopPropagation();planApprove(\'' + escHtml(g.file) + '\',this)" style="color:var(--green);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(63,185,80,0.1);border:1px solid rgba(63,185,80,0.3);border-radius:3px">Approve</span>'
|
|
217
218
|
: isPaused
|
|
218
|
-
? '<span onclick="event.stopPropagation();planApprove(\'' + escHtml(g.file) + '\')" style="color:var(--green);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(63,185,80,0.1);border:1px solid rgba(63,185,80,0.3);border-radius:3px">Resume</span>'
|
|
219
|
+
? '<span onclick="event.stopPropagation();planApprove(\'' + escHtml(g.file) + '\',this)" style="color:var(--green);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(63,185,80,0.1);border:1px solid rgba(63,185,80,0.3);border-radius:3px">Resume</span>'
|
|
219
220
|
: isCompleted
|
|
220
|
-
? '<span onclick="event.stopPropagation();triggerVerify(\'' + escHtml(g.file) + '\')" style="color:var(--green);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(63,185,80,0.1);border:1px solid rgba(63,185,80,0.3);border-radius:3px">Verify</span>'
|
|
221
|
-
: '<span onclick="event.stopPropagation();planPause(\'' + escHtml(g.file) + '\')" style="color:var(--yellow);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(210,153,34,0.1);border:1px solid rgba(210,153,34,0.3);border-radius:3px">Pause</span>';
|
|
221
|
+
? '<span onclick="event.stopPropagation();triggerVerify(\'' + escHtml(g.file) + '\',this)" style="color:var(--green);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(63,185,80,0.1);border:1px solid rgba(63,185,80,0.3);border-radius:3px">Verify</span>'
|
|
222
|
+
: '<span onclick="event.stopPropagation();planPause(\'' + escHtml(g.file) + '\',this)" style="color:var(--yellow);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(210,153,34,0.1);border:1px solid rgba(210,153,34,0.3);border-radius:3px">Pause</span>';
|
|
222
223
|
const deleteBtn = '<span onclick="event.stopPropagation();planDelete(\'' + escHtml(g.file) + '\')" style="color:var(--red);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(248,81,73,0.1);border:1px solid rgba(248,81,73,0.3);border-radius:3px">Delete</span>';
|
|
223
224
|
const sourcePlanLink = g.sourcePlan
|
|
224
225
|
? '<span onclick="event.stopPropagation();planView(\'' + escHtml(g.sourcePlan) + '\')" style="color:var(--blue);cursor:pointer;font-size:9px;padding:1px 6px;background:rgba(56,139,253,0.1);border:1px solid rgba(56,139,253,0.3);border-radius:3px" title="View source plan">📄 Plan</span>'
|
package/engine.js
CHANGED
|
@@ -1967,6 +1967,22 @@ function discoverWork(config) {
|
|
|
1967
1967
|
allWorkItems.push(...meetingWork);
|
|
1968
1968
|
} catch (e) { log('warn', 'discover meeting work: ' + e.message); }
|
|
1969
1969
|
|
|
1970
|
+
// Periodic plan completion sweep — catch PRDs that completed while engine was down
|
|
1971
|
+
// or where checkPlanCompletion missed the completion event
|
|
1972
|
+
try {
|
|
1973
|
+
const lifecycle = require('./engine/lifecycle');
|
|
1974
|
+
const prdDir = path.join(MINIONS_DIR, 'prd');
|
|
1975
|
+
if (fs.existsSync(prdDir)) {
|
|
1976
|
+
for (const f of fs.readdirSync(prdDir).filter(f => f.endsWith('.json'))) {
|
|
1977
|
+
const plan = safeJson(path.join(prdDir, f));
|
|
1978
|
+
if (!plan?.missing_features || plan.status === 'completed') continue;
|
|
1979
|
+
if (plan.status !== 'approved' && plan.status !== 'active') continue;
|
|
1980
|
+
// Simulate the meta object checkPlanCompletion expects
|
|
1981
|
+
lifecycle.checkPlanCompletion({ item: { sourcePlan: f } }, config);
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
} catch (e) { log('warn', 'plan completion sweep: ' + e.message); }
|
|
1985
|
+
|
|
1970
1986
|
// Gate reviews and fixes: do not dispatch until all implement items are complete
|
|
1971
1987
|
const hasIncompleteImplements = projects.some(project => {
|
|
1972
1988
|
const items = safeJson(projectWorkItemsPath(project)) || [];
|
package/package.json
CHANGED