@yemi33/minions 0.1.190 → 0.1.192
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 +9 -1
- package/dashboard/js/render-plans.js +3 -1
- package/dashboard/js/render-prd.js +27 -8
- package/dashboard.js +1 -0
- package/engine/queries.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -297,7 +297,9 @@ function renderPlans(plans) {
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
function openArchivedPlansModal() {
|
|
300
|
-
const plans = window._archivedPlans || []
|
|
300
|
+
const plans = (window._archivedPlans || []).slice().sort((a, b) =>
|
|
301
|
+
(b.completedAt || b.updatedAt || '').localeCompare(a.completedAt || a.updatedAt || '')
|
|
302
|
+
);
|
|
301
303
|
const render = window._archivedPlanRenderer;
|
|
302
304
|
if (!plans.length || !render) return;
|
|
303
305
|
|
|
@@ -132,7 +132,7 @@ function renderPrdProgress(prog) {
|
|
|
132
132
|
const grouped = {};
|
|
133
133
|
for (const i of (prog.items || [])) {
|
|
134
134
|
const key = i.source || '_ungrouped';
|
|
135
|
-
if (!grouped[key]) grouped[key] = { summary: i.planSummary || i.source || 'Items', project: i.planProject || '', file: i.source || '', items: [], archived: !!i._archived, planStatus: i.planStatus || 'active', sourcePlan: i.sourcePlan || '', planStale: i.planStale || false, lastSyncedFromPlan: i.lastSyncedFromPlan || null, prdUpdatedAt: i.prdUpdatedAt || null };
|
|
135
|
+
if (!grouped[key]) grouped[key] = { summary: i.planSummary || i.source || 'Items', project: i.planProject || '', file: i.source || '', items: [], archived: !!i._archived, planStatus: i.planStatus || 'active', sourcePlan: i.sourcePlan || '', planStale: i.planStale || false, lastSyncedFromPlan: i.lastSyncedFromPlan || null, prdUpdatedAt: i.prdUpdatedAt || null, completedAt: i.prdCompletedAt || '' };
|
|
136
136
|
grouped[key].items.push(i);
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -444,6 +444,11 @@ function renderPrdProgress(prog) {
|
|
|
444
444
|
// Store archived data for the modal
|
|
445
445
|
window._archivedPrdGroups = archivedKeys.map(k => grouped[k]);
|
|
446
446
|
window._archivedPrdRenderGroup = renderGroup;
|
|
447
|
+
window._archivedPrdRenderItem = renderItem;
|
|
448
|
+
window._archivedPrdRenderGraph = renderGraph;
|
|
449
|
+
window._archivedPrdRenderGroupHeader = renderGroupHeader;
|
|
450
|
+
window._archivedPrdRenderGroupStats = renderGroupStats;
|
|
451
|
+
window._archivedPrdRenderE2eSection = renderE2eSection;
|
|
447
452
|
html += '<div style="margin-top:8px;text-align:right;position:relative" data-file="prd-archives">' +
|
|
448
453
|
'<button class="pr-pager-btn" style="font-size:10px;padding:3px 10px;color:var(--muted)" onclick="openArchivedPrdModal()">' +
|
|
449
454
|
'View Archives (' + archivedKeys.length + ')' +
|
|
@@ -459,7 +464,10 @@ let _prdItems = []; // cache for edit lookups
|
|
|
459
464
|
function _cachePrdItems(prog) { _prdItems = prog?.items || []; }
|
|
460
465
|
|
|
461
466
|
function openArchivedPrdModal() {
|
|
462
|
-
const groups = window._archivedPrdGroups || []
|
|
467
|
+
const groups = (window._archivedPrdGroups || []).slice().sort((a, b) =>
|
|
468
|
+
(b.completedAt || b.prdUpdatedAt || '').localeCompare(a.completedAt || a.prdUpdatedAt || '')
|
|
469
|
+
);
|
|
470
|
+
window._archivedPrdGroups = groups;
|
|
463
471
|
const renderGroup = window._archivedPrdRenderGroup;
|
|
464
472
|
if (!groups.length || !renderGroup) return;
|
|
465
473
|
|
|
@@ -475,6 +483,7 @@ function openArchivedPrdModal() {
|
|
|
475
483
|
html += groups.map((g, i) => {
|
|
476
484
|
const done = g.items.filter(it => it.status === 'done').length;
|
|
477
485
|
const failed = g.items.filter(it => it.status === 'failed').length;
|
|
486
|
+
const completed = g.completedAt ? new Date(g.completedAt).toLocaleDateString() : '';
|
|
478
487
|
return '<div class="plan-card" style="cursor:pointer;margin-bottom:8px" onclick="showArchivedPrdDetail(' + i + ')">' +
|
|
479
488
|
'<div class="plan-card-title" style="font-size:13px">' + escHtml(g.summary || g.file) + '</div>' +
|
|
480
489
|
'<div class="plan-card-meta">' +
|
|
@@ -482,6 +491,7 @@ function openArchivedPrdModal() {
|
|
|
482
491
|
'<span>' + g.items.length + ' items</span>' +
|
|
483
492
|
'<span style="color:var(--green)">' + done + ' done</span>' +
|
|
484
493
|
(failed ? '<span style="color:var(--red)">' + failed + ' failed</span>' : '') +
|
|
494
|
+
(completed ? '<span>Completed ' + completed + '</span>' : '') +
|
|
485
495
|
'</div>' +
|
|
486
496
|
'</div>';
|
|
487
497
|
}).join('');
|
|
@@ -509,12 +519,21 @@ function showArchivedPrdDetail(idx) {
|
|
|
509
519
|
'<button class="pr-pager-btn" style="font-size:9px;padding:2px 8px" onclick="openArchivedPrdModal()">Back</button>' +
|
|
510
520
|
'</div>';
|
|
511
521
|
|
|
512
|
-
//
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
const
|
|
516
|
-
const
|
|
517
|
-
|
|
522
|
+
// Render directly from the archived group data (not from stale renderGroup closure)
|
|
523
|
+
const renderItem = window._archivedPrdRenderItem;
|
|
524
|
+
const renderGraph = window._archivedPrdRenderGraph;
|
|
525
|
+
const renderGroupHeader = window._archivedPrdRenderGroupHeader;
|
|
526
|
+
const renderGroupStats = window._archivedPrdRenderGroupStats;
|
|
527
|
+
const renderE2eSection = window._archivedPrdRenderE2eSection;
|
|
528
|
+
const viewContent = (renderItem && renderGraph)
|
|
529
|
+
? (isGraph ? renderGraph(g.items) : '<div class="prd-items-list">' + g.items.map(renderItem).join('') + '</div>')
|
|
530
|
+
: '<p>Error rendering</p>';
|
|
531
|
+
const content = '<div style="margin-bottom:16px">' +
|
|
532
|
+
(renderGroupHeader ? renderGroupHeader(g) : '') +
|
|
533
|
+
(renderE2eSection ? renderE2eSection(g.file) : '') +
|
|
534
|
+
(renderGroupStats ? renderGroupStats(g.items) : '') +
|
|
535
|
+
viewContent +
|
|
536
|
+
'</div>';
|
|
518
537
|
|
|
519
538
|
document.getElementById('modal-title').textContent = g.summary || g.file;
|
|
520
539
|
document.getElementById('modal-body').innerHTML = toggleHtml + content;
|
package/dashboard.js
CHANGED
|
@@ -1665,6 +1665,7 @@ If nothing to do: { "duplicates": [], "reclassify": [], "remove": [] }`;
|
|
|
1665
1665
|
itemCount: (content.match(/^\d+\.\s+\*\*/gm) || []).length,
|
|
1666
1666
|
generatedBy: authorMatch ? authorMatch[1].trim() : '',
|
|
1667
1667
|
generatedAt: dateMatch ? dateMatch[1].trim() : '',
|
|
1668
|
+
completedAt: archived ? updatedAt : '',
|
|
1668
1669
|
updatedAt,
|
|
1669
1670
|
requiresApproval: false,
|
|
1670
1671
|
revisionFeedback: null,
|
package/engine/queries.js
CHANGED
|
@@ -555,6 +555,7 @@ function getPrdInfo(config) {
|
|
|
555
555
|
_archived: archived, _sourcePlan: plan.source_plan || '',
|
|
556
556
|
_planStale: planStale || plan.planStale || false, _lastSyncedFromPlan: plan.lastSyncedFromPlan || null,
|
|
557
557
|
_prdUpdatedAt: new Date(stat.mtimeMs).toISOString(),
|
|
558
|
+
_prdCompletedAt: plan.completedAt || '',
|
|
558
559
|
});
|
|
559
560
|
}
|
|
560
561
|
} catch { /* optional */ }
|
|
@@ -647,7 +648,7 @@ function getPrdInfo(config) {
|
|
|
647
648
|
description: (i.description || '').slice(0, 200), projects: i.projects || [],
|
|
648
649
|
prs: prdToPr[i.id] || [], depends_on: i.depends_on || [],
|
|
649
650
|
project: i.project || '', source: i._source || '', planSummary: i._planSummary || '', planProject: i._planProject || '', planStatus: i._planStatus || 'active', _archived: i._archived || false, sourcePlan: i._sourcePlan || '',
|
|
650
|
-
planStale: i._planStale || false, lastSyncedFromPlan: i._lastSyncedFromPlan || null, prdUpdatedAt: i._prdUpdatedAt || null,
|
|
651
|
+
planStale: i._planStale || false, lastSyncedFromPlan: i._lastSyncedFromPlan || null, prdUpdatedAt: i._prdUpdatedAt || null, prdCompletedAt: i._prdCompletedAt || '',
|
|
651
652
|
})),
|
|
652
653
|
};
|
|
653
654
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.192",
|
|
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"
|