@yemi33/minions 0.1.704 → 0.1.705
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 +46 -28
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -453,35 +453,53 @@ function _renderPlanModal(normalizedFile, raw, lastMod) {
|
|
|
453
453
|
const canExecute = isMdPlan && !hasActiveWork && !prdCompleted;
|
|
454
454
|
const modalExecuteBtn = canExecute && !hasPrd ? '<button class="pr-pager-btn" style="font-size:10px;padding:2px 10px;color:var(--green);font-weight:600" ' +
|
|
455
455
|
'onclick="planExecute(\'' + escHtml(normalizedFile) + '\',\'\',this)">Execute</button>' : '';
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
const
|
|
461
|
-
const
|
|
462
|
-
const
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
const
|
|
466
|
-
|
|
467
|
-
const
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
'onclick="
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
456
|
+
// Modal buttons mirror card logic — derive effectiveStatus the same way
|
|
457
|
+
const allPlans = window._lastStatus?.plans || [];
|
|
458
|
+
const cardPlan = allPlans.find(p => p.file === normalizedFile || p.sourcePlan === normalizedFile || (p.file?.endsWith('.json') && p.file === normalizedFile));
|
|
459
|
+
// Also check for linked PRD by searching all plans for a PRD whose source_plan matches this file
|
|
460
|
+
const linkedPrd = allPlans.find(p => p.sourcePlan === normalizedFile && p.format === 'prd');
|
|
461
|
+
const effectiveStatus = cardPlan ? derivePlanStatus(cardPlan) : (linkedPrd ? derivePlanStatus(linkedPrd) : (planStatus || 'active'));
|
|
462
|
+
const prdFile = cardPlan?.file?.endsWith('.json') ? cardPlan.file : (linkedPrd?.file || '');
|
|
463
|
+
const isArchived = !!(cardPlan?.archived || linkedPrd?.archived);
|
|
464
|
+
const isDraft = isMdPlan && !prdFile;
|
|
465
|
+
const isNeedsAction = (effectiveStatus === 'awaiting-approval' || effectiveStatus === 'paused') && !isArchived;
|
|
466
|
+
|
|
467
|
+
const bs = 'font-size:10px;padding:2px 10px'; // button style
|
|
468
|
+
let modalActions = '';
|
|
469
|
+
|
|
470
|
+
// Approve/Reject for awaiting-approval or paused
|
|
471
|
+
if (isNeedsAction) {
|
|
472
|
+
const target = prdFile || normalizedFile;
|
|
473
|
+
const label = effectiveStatus === 'paused' ? 'Resume' : 'Approve';
|
|
474
|
+
modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--green)" onclick="planApprove(\'' + escHtml(target) + '\',this)">' + label + '</button> ';
|
|
475
|
+
// Re-execute: re-generate PRD from updated plan (only for .md drafts with existing PRD)
|
|
476
|
+
if (effectiveStatus === 'awaiting-approval' && isMdPlan && prdFile && canExecute) {
|
|
477
|
+
modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--green);opacity:0.7" onclick="planExecute(\'' + escHtml(normalizedFile) + '\',\'\',this)">Re-execute</button> ';
|
|
478
|
+
}
|
|
479
|
+
modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--red)" onclick="planReject(\'' + escHtml(target) + '\')">Reject</button> ';
|
|
480
|
+
}
|
|
481
|
+
// Execute (draft .md without PRD)
|
|
482
|
+
if (isDraft && (effectiveStatus === 'active' || effectiveStatus === 'draft') && !isArchived) {
|
|
483
|
+
modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--green);font-weight:600" onclick="planExecute(\'' + escHtml(normalizedFile) + '\',\'\',this)">Execute</button> ';
|
|
484
|
+
}
|
|
485
|
+
// Pause (active PRD, not completed)
|
|
486
|
+
if (effectiveStatus === 'dispatched' && prdFile && !isArchived) {
|
|
487
|
+
modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--yellow)" onclick="planPause(\'' + escHtml(prdFile) + '\',this)">Pause</button> ';
|
|
488
|
+
}
|
|
489
|
+
// Verify / Verified badge
|
|
490
|
+
const modalVerifyWi = (window._lastWorkItems || []).find(w => w.itemType === 'verify' && w.sourcePlan === (prdFile || normalizedFile));
|
|
491
|
+
if (effectiveStatus === 'completed' && prdFile && !isArchived && !modalVerifyWi) {
|
|
492
|
+
modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--green)" onclick="triggerVerify(\'' + escHtml(prdFile) + '\',this)">Verify</button> ';
|
|
493
|
+
}
|
|
494
|
+
if (modalVerifyWi) modalActions += _renderVerifyBadge(modalVerifyWi);
|
|
495
|
+
// Archive + Delete (always, unless archived)
|
|
496
|
+
if (!isArchived) {
|
|
497
|
+
modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--muted)" onclick="planArchive(\'' + escHtml(prdFile || normalizedFile) + '\')">Archive</button> ';
|
|
498
|
+
modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--red)" onclick="planDelete(\'' + escHtml(normalizedFile) + '\')">Delete</button>';
|
|
499
|
+
}
|
|
500
|
+
|
|
478
501
|
const lastModLabel = lastMod ? '<div style="font-size:10px;color:var(--muted);font-weight:400;margin-top:2px">Last updated: ' + new Date(lastMod).toLocaleString() + '</div>' : '';
|
|
479
|
-
const actionBtns = '<div style="display:flex;gap:4px;flex-wrap:wrap;margin-top:4px">' +
|
|
480
|
-
(modalCompletedLabel || '') + (modalAwaitingLabel || '') + (modalInProgressLabel || '') + (modalApproveBtn || '') + (modalReExecuteBtn || '') + (modalExecuteBtn || '') + (modalPauseBtn || '') + (modalRejectBtn || '') + (modalVerifyBtn || '') + (modalVerifyInfo || '') +
|
|
481
|
-
' ' + modalArchiveBtn +
|
|
482
|
-
' <button class="pr-pager-btn" style="font-size:10px;padding:2px 10px;color:var(--red)" ' +
|
|
483
|
-
'onclick="planDelete(\'' + escHtml(normalizedFile) + '\')">Delete</button>' +
|
|
484
|
-
'</div>';
|
|
502
|
+
const actionBtns = '<div style="display:flex;gap:4px;flex-wrap:wrap;margin-top:4px">' + modalActions + '</div>';
|
|
485
503
|
|
|
486
504
|
document.getElementById('modal-title').innerHTML = escHtml(title) + (versionLabel ? ' <span style="font-size:11px;font-weight:700;padding:1px 6px;border-radius:3px;background:rgba(56,139,253,0.15);color:var(--blue)">' + escHtml(versionLabel) + '</span>' : '') + lastModLabel + actionBtns;
|
|
487
505
|
const modalBody = document.getElementById('modal-body');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.705",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|