@yemi33/minions 0.1.710 → 0.1.712

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.712 (2026-04-09)
4
+
5
+ ### Fixes
6
+ - move re-execute action card out of doc-chat thread
7
+ - modal derivePlanStatus was called with wrong args, plans not cached
8
+
3
9
  ## 0.1.710 (2026-04-09)
4
10
 
5
11
  ### Fixes
@@ -99,11 +99,17 @@ function _initQaSession() {
99
99
  }
100
100
  if (prior.filePath) _modalFilePath = prior.filePath;
101
101
  _showThreadWrap();
102
+ requestAnimationFrame(function() {
103
+ var thread = document.getElementById('modal-qa-thread');
104
+ if (thread) thread.scrollTop = thread.scrollHeight;
105
+ });
102
106
  } else {
103
107
  _qaHistory = [];
104
108
  document.getElementById('modal-qa-thread').innerHTML = '';
105
109
  _hideThreadWrap();
106
110
  }
111
+ var actionSlot = document.getElementById('qa-action-slot');
112
+ if (actionSlot) actionSlot.innerHTML = '';
107
113
  }
108
114
 
109
115
  function clearQaConversation() {
@@ -112,6 +118,8 @@ function clearQaConversation() {
112
118
  _qaProcessing = false;
113
119
  document.getElementById('modal-qa-thread').innerHTML = '';
114
120
  _hideThreadWrap();
121
+ var actionSlot = document.getElementById('qa-action-slot');
122
+ if (actionSlot) actionSlot.innerHTML = '';
115
123
  if (_qaSessionKey) _qaSessions.delete(_qaSessionKey);
116
124
  }
117
125
 
@@ -266,7 +274,8 @@ async function _processQaMessage(message, selection) {
266
274
  '<button onclick="planExecute(\'' + esc + '\', \'\', null)" style="background:var(--green);color:#fff;border:none;border-radius:4px;padding:4px 12px;font-size:11px;font-weight:600;cursor:pointer">Re-execute plan</button>' +
267
275
  '<button onclick="this.closest(\'div\').innerHTML=\'<span style=color:var(--muted);font-size:11px>Paused. No work dispatched.</span>\'" style="background:var(--surface2);color:var(--text);border:1px solid var(--border);border-radius:4px;padding:4px 12px;font-size:11px;cursor:pointer">Keep paused</button>' +
268
276
  '<span style="color:var(--muted);font-size:10px;width:100%">Re-execute creates a new PRD from the updated plan.</span>';
269
- thread.appendChild(actionDiv);
277
+ var slot = document.getElementById('qa-action-slot');
278
+ if (slot) { slot.innerHTML = ''; slot.appendChild(actionDiv); }
270
279
  }
271
280
  } else {
272
281
  const qaElapsedErr = Math.round((Date.now() - qaStartTime) / 1000);
@@ -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;
@@ -119,6 +119,7 @@
119
119
  <div id="qa-expand-bar" style="display:none;margin-bottom:4px">
120
120
  <button style="background:none;border:none;color:var(--muted);font-size:10px;cursor:pointer;padding:2px 6px" onclick="toggleDocChat()">&#x25B2; Show thread</button>
121
121
  </div>
122
+ <div id="qa-action-slot"></div>
122
123
  <div class="modal-qa-selection-pill" id="modal-qa-pill" style="display:none">
123
124
  <span class="pill-label">Selection:</span>
124
125
  <span class="pill-text" id="modal-qa-pill-text"></span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.710",
3
+ "version": "0.1.712",
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"