@yemi33/minions 0.1.2014 → 0.1.2015
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/dashboard/js/refresh.js +13 -4
- package/package.json +1 -1
package/dashboard/js/refresh.js
CHANGED
|
@@ -74,6 +74,17 @@ function _processStatusUpdate(data) {
|
|
|
74
74
|
const threshEl = document.getElementById('inbox-threshold');
|
|
75
75
|
if (threshEl && data.autoMode?.inboxThreshold) threshEl.textContent = data.autoMode.inboxThreshold;
|
|
76
76
|
|
|
77
|
+
// Publish window._last* snapshots BEFORE any renderer runs. Several renderers
|
|
78
|
+
// (renderProjects, renderPrd, renderPrs, refreshPlans, and others) read
|
|
79
|
+
// window._lastStatus / window._lastWorkItems / window._lastDispatch during
|
|
80
|
+
// their render path. If we assign these after the renderer calls, every tick
|
|
81
|
+
// consumes the PREVIOUS tick's globals — a one-tick (~4 s) staleness lag
|
|
82
|
+
// baked into the polling loop (W-mpgb0x81000cf8df, audit F4). No renderer in
|
|
83
|
+
// this function mutates `data`, so hoisting is safe.
|
|
84
|
+
window._lastDispatch = data.dispatch;
|
|
85
|
+
window._lastWorkItems = data.workItems || [];
|
|
86
|
+
window._lastStatus = data;
|
|
87
|
+
|
|
77
88
|
// Render only changed sections
|
|
78
89
|
if (_changed('agents', data.agents)) { renderAgents(data.agents); cmdUpdateAgentList(data.agents); }
|
|
79
90
|
if (_changed('prdProgress', data.prdProgress) || _changed('prdPrs', data.pullRequests?.length)) { renderPrdProgress(data.prdProgress); _cachePrdItems(data.prdProgress); }
|
|
@@ -81,7 +92,8 @@ function _processStatusUpdate(data) {
|
|
|
81
92
|
if (_changed('projects', data.projects)) { cmdUpdateProjectList(data.projects || []); renderProjects(data.projects || []); }
|
|
82
93
|
// FRE banner — safe to call every tick (idempotent + cheap). Pass the full
|
|
83
94
|
// status payload so the runtime-CLI explainer reads autoMode.defaultCli from
|
|
84
|
-
// THIS tick
|
|
95
|
+
// THIS tick (window._lastStatus is hoisted above, but renderFre takes the
|
|
96
|
+
// payload directly to avoid the window-global indirection).
|
|
85
97
|
if (typeof renderFre === 'function') {
|
|
86
98
|
try { renderFre(data); } catch { /* expected on first load */ }
|
|
87
99
|
}
|
|
@@ -103,9 +115,6 @@ function _processStatusUpdate(data) {
|
|
|
103
115
|
if (_changed('adoThrottle', data.adoThrottle)) renderAdoThrottleAlert(data.adoThrottle);
|
|
104
116
|
if (_changed('ghThrottle', data.ghThrottle)) renderGhThrottleAlert(data.ghThrottle);
|
|
105
117
|
if (_changed('dispatch', data.dispatch)) renderDispatch(data.dispatch);
|
|
106
|
-
window._lastDispatch = data.dispatch;
|
|
107
|
-
window._lastWorkItems = data.workItems || [];
|
|
108
|
-
window._lastStatus = data;
|
|
109
118
|
prunePrdRequeueState(window._lastWorkItems);
|
|
110
119
|
if (_changed('engineLog', data.engineLog)) renderEngineLog(data.engineLog || []);
|
|
111
120
|
if (_changed('metrics', data.metrics)) renderMetrics(data.metrics || {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2015",
|
|
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"
|