@yemi33/minions 0.1.710 → 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,10 @@
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
+
3
8
  ## 0.1.710 (2026-04-09)
4
9
 
5
10
  ### 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,13 +435,15 @@ 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
448
  const isCompleted = effectiveStatus === 'completed';
446
449
  const isDraft = isMdPlan && !prdFile && !isCompleted;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.710",
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"