@yemi33/minions 0.1.439 → 0.1.441

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.441 (2026-04-06)
4
+
5
+ ### Fixes
6
+ - auto-reload page when dashboard restarts
7
+ - safeFetch compat — drop AbortSignal.any, avoid opts mutation
8
+
3
9
  ## 0.1.439 (2026-04-06)
4
10
 
5
11
  ### Features
@@ -93,9 +93,18 @@ function _processStatusUpdate(data) {
93
93
  } catch { /* expected on first load */ }
94
94
  }
95
95
 
96
+ let _knownDashboardStartId = null;
96
97
  async function refresh() {
97
98
  try {
98
99
  const data = await safeFetch('/api/status').then(r => r.json());
100
+ // Auto-reload when dashboard restarts (stale connections cause "Failed to fetch" on CC/doc-chat)
101
+ const dashId = (data.version && data.version.dashboardStartedAt) || null;
102
+ if (dashId && _knownDashboardStartId && dashId !== _knownDashboardStartId) {
103
+ console.log('Dashboard restarted — reloading page');
104
+ location.reload();
105
+ return;
106
+ }
107
+ if (dashId) _knownDashboardStartId = dashId;
99
108
  _processStatusUpdate(data);
100
109
  } catch(e) { console.error('refresh error', e); }
101
110
  }
@@ -96,14 +96,12 @@ function rerenderPrdFromCache() {
96
96
  // Global fetch wrapper with timeout — prevents connection exhaustion from hung requests.
97
97
  // Use for all short API calls. Long-lived streams (CC, doc-chat) manage their own AbortControllers.
98
98
  function safeFetch(url, opts) {
99
- const timeout = (opts && opts.timeout) || 15000;
100
- if (opts) delete opts.timeout;
101
- const controller = new AbortController();
102
- const timer = setTimeout(() => controller.abort(), timeout);
103
- const signal = (opts && opts.signal)
104
- ? AbortSignal.any([opts.signal, controller.signal])
105
- : controller.signal;
106
- return fetch(url, Object.assign({}, opts, { signal })).finally(() => clearTimeout(timer));
99
+ var timeout = (opts && opts.timeout) || 15000;
100
+ var controller = new AbortController();
101
+ var timer = setTimeout(function() { controller.abort(); }, timeout);
102
+ var fetchOpts = Object.assign({}, opts, { signal: controller.signal });
103
+ delete fetchOpts.timeout;
104
+ return fetch(url, fetchOpts).finally(function() { clearTimeout(timer); });
107
105
  }
108
106
 
109
107
  window.MinionsState = { getPageFromUrl, switchPage, getPrdRequeueState, setPrdRequeueState, clearPrdRequeueState, prunePrdRequeueState, rerenderPrdFromCache, safeFetch };
package/dashboard.js CHANGED
@@ -337,6 +337,7 @@ function getStatus() {
337
337
  runningCommit: engine.codeCommit || null,
338
338
  dashboardRunning: _dashboardVersion.codeVersion,
339
339
  dashboardRunningCommit: _dashboardVersion.codeCommit,
340
+ dashboardStartedAt: _dashboardVersion.startedAt,
340
341
  disk: diskVersion,
341
342
  diskCommit,
342
343
  engineStale,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.439",
3
+ "version": "0.1.441",
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"