@yemi33/minions 0.1.709 → 0.1.711

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.711 (2026-04-09)
4
+
5
+ ### Fixes
6
+ - modal derivePlanStatus was called with wrong args, plans not cached
7
+
8
+ ## 0.1.710 (2026-04-09)
9
+
10
+ ### Fixes
11
+ - modal shows Execute for completed plans, missing status labels
12
+
3
13
  ## 0.1.709 (2026-04-09)
4
14
 
5
15
  ### Fixes
@@ -56,6 +56,7 @@ async function _submitCreatePlan() {
56
56
  async function refreshPlans() {
57
57
  try {
58
58
  const plans = await fetch('/api/plans').then(r => r.json());
59
+ window._lastPlans = plans; // Store globally so plan modal can access
59
60
  renderPlans(plans);
60
61
  } catch (e) { console.error('plans refresh:', e.message); }
61
62
  }
@@ -434,15 +435,18 @@ function _renderPlanModal(normalizedFile, raw, lastMod) {
434
435
  const isMdPlan = normalizedFile.endsWith('.md');
435
436
  let planStatus = '';
436
437
  try { if (normalizedFile.endsWith('.json')) planStatus = JSON.parse(raw).status || ''; } catch {}
437
- // Modal buttons mirror card logic — derive effectiveStatus the same way
438
- const allPlans = window._lastStatus?.plans || [];
438
+ // Modal buttons mirror card logic — use cached plans data (from /api/plans, not /api/status)
439
+ const allPlans = window._lastPlans || [];
439
440
  const cardPlan = allPlans.find(p => p.file === normalizedFile || p.sourcePlan === normalizedFile || (p.file?.endsWith('.json') && p.file === normalizedFile));
440
441
  // Also check for linked PRD by searching all plans for a PRD whose source_plan matches this file
441
442
  const linkedPrd = allPlans.find(p => p.sourcePlan === normalizedFile && p.format === 'prd');
442
- const effectiveStatus = cardPlan ? derivePlanStatus(cardPlan) : (linkedPrd ? derivePlanStatus(linkedPrd) : (planStatus || 'active'));
443
443
  const prdFile = cardPlan?.file?.endsWith('.json') ? cardPlan.file : (linkedPrd?.file || '');
444
+ const prdJsonStatus = linkedPrd?.status || (cardPlan?.file?.endsWith('.json') ? cardPlan.status : '') || planStatus || '';
445
+ const allWi = window._lastWorkItems || [];
446
+ const effectiveStatus = (prdFile || normalizedFile) ? derivePlanStatus(prdFile, normalizedFile, prdJsonStatus, allWi) : (planStatus || 'active');
444
447
  const isArchived = !!(cardPlan?.archived || linkedPrd?.archived);
445
- const isDraft = isMdPlan && !prdFile;
448
+ const isCompleted = effectiveStatus === 'completed';
449
+ const isDraft = isMdPlan && !prdFile && !isCompleted;
446
450
  const isNeedsAction = (effectiveStatus === 'awaiting-approval' || effectiveStatus === 'paused') && !isArchived;
447
451
 
448
452
  const bs = 'font-size:10px;padding:2px 10px'; // button style
@@ -467,6 +471,14 @@ function _renderPlanModal(normalizedFile, raw, lastMod) {
467
471
  if (effectiveStatus === 'dispatched' && prdFile && !isArchived) {
468
472
  modalActions += '<button class="pr-pager-btn" style="' + bs + ';color:var(--yellow)" onclick="planPause(\'' + escHtml(prdFile) + '\',this)">Pause</button> ';
469
473
  }
474
+ // Completed label
475
+ if (isCompleted && !isArchived) {
476
+ modalActions += '<span style="' + bs + ';color:var(--green);font-weight:600">Completed</span> ';
477
+ }
478
+ // In progress label
479
+ if (effectiveStatus === 'dispatched') {
480
+ modalActions += '<span style="' + bs + ';color:var(--blue)">In Progress</span> ';
481
+ }
470
482
  // Verify / Verified badge
471
483
  const modalVerifyWi = (window._lastWorkItems || []).find(w => w.itemType === 'verify' && w.sourcePlan === (prdFile || normalizedFile));
472
484
  if (effectiveStatus === 'completed' && prdFile && !isArchived && !modalVerifyWi) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.709",
3
+ "version": "0.1.711",
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"