@yemi33/minions 0.1.2231 → 0.1.2232
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.
|
@@ -38,6 +38,14 @@ function _renderProjectBranch(p) {
|
|
|
38
38
|
if (p.gitState === 'missing') return '<span class="project-warn" title="Project localPath does not exist on disk">(path not found)</span>';
|
|
39
39
|
if (p.gitState === 'non-git') return '<span class="project-muted" title="Project path exists but is not a git repository">(not a git repo)</span>';
|
|
40
40
|
if (p.gitState !== 'ok' || !p.gitBranch) return '';
|
|
41
|
+
// opg-microsoft/minions#295: the engine flags `gitStale: true` when tracked
|
|
42
|
+
// git refs have advanced past the cached snapshot (e.g. the operator ran
|
|
43
|
+
// `git switch` / `git pull` directly in a live checkout outside the
|
|
44
|
+
// dashboard). The cached gitBranch/gitDirty are then known-stale — rendering
|
|
45
|
+
// them would briefly show the OLD branch name as if current. Fall back to a
|
|
46
|
+
// neutral "refreshing" chip until the async cache refresh lands on the next
|
|
47
|
+
// poll, rather than presenting a known-stale branch/dirty indicator.
|
|
48
|
+
if (p.gitStale) return '<span class="project-muted" title="Branch changed outside the dashboard — refreshing…">(refreshing…)</span>';
|
|
41
49
|
const branch = escHtml(p.gitBranch);
|
|
42
50
|
const mainBranch = p.mainBranch ? escHtml(p.mainBranch) : '';
|
|
43
51
|
const remoteDefault = p.remoteDefaultBranch ? escHtml(p.remoteDefaultBranch) : '';
|
package/dashboard/js/settings.js
CHANGED
|
@@ -244,7 +244,10 @@ async function openSettings() {
|
|
|
244
244
|
} catch (e) { liveProj = null; }
|
|
245
245
|
var remoteDefault = (liveProj && liveProj.remoteDefaultBranch) || '';
|
|
246
246
|
var mismatch = !!(liveProj && liveProj.branchMismatch);
|
|
247
|
-
|
|
247
|
+
// Suppress the "Local HEAD" hint when the engine flags this status stale
|
|
248
|
+
// (opg-microsoft/minions#295) — the cached gitBranch is known-stale after
|
|
249
|
+
// an external checkout change and would show the OLD branch as current.
|
|
250
|
+
var localBranch = (liveProj && !liveProj.gitStale && liveProj.gitBranch) || '';
|
|
248
251
|
var driftNote = mismatch
|
|
249
252
|
? '<div style="font-size:var(--text-sm);color:var(--yellow);margin-top:4px">⚠ Configured main (<code>' + escHtml(p.mainBranch || '') + '</code>) differs from origin/HEAD (<code>' + escHtml(remoteDefault) + '</code>) — config is likely stale.</div>'
|
|
250
253
|
: '';
|
package/engine/queries.js
CHANGED
|
@@ -2698,12 +2698,23 @@ function getProjectGitStatus(localPath, configuredMainBranch = null) {
|
|
|
2698
2698
|
// "behind: 8" after the user has already pulled to current — see
|
|
2699
2699
|
// yemi33/minions#2848. Null those specific counters so the dashboard
|
|
2700
2700
|
// shows a pending state for ahead/behind until the background probe
|
|
2701
|
-
// settles
|
|
2702
|
-
//
|
|
2703
|
-
//
|
|
2704
|
-
//
|
|
2701
|
+
// settles. TTL-expiry fall-throughs (refsAdvanced=false) still return the
|
|
2702
|
+
// prior counters because nothing local has actually changed there.
|
|
2703
|
+
//
|
|
2704
|
+
// opg-microsoft/minions#295: gitBranch/gitDirty on the cached value are
|
|
2705
|
+
// ALSO known-stale once refs have advanced (e.g. the operator ran
|
|
2706
|
+
// `git switch` / `git pull` directly in a live checkout outside the
|
|
2707
|
+
// dashboard). The cached value still carries the OLD branch name, so a
|
|
2708
|
+
// consumer rendering `gitBranch` as authoritative briefly shows the
|
|
2709
|
+
// pre-switch branch as if current. We keep the cached gitBranch/gitDirty
|
|
2710
|
+
// on the object (so the next poll can self-correct without a flash of
|
|
2711
|
+
// "missing"), but add a `gitStale: true` marker so render paths can avoid
|
|
2712
|
+
// presenting the known-stale branch/dirty as current and fall back to a
|
|
2713
|
+
// neutral "refreshing" presentation. The async refresh scheduled above
|
|
2714
|
+
// self-corrects on the next poll. We do NOT add a synchronous git probe
|
|
2715
|
+
// here — status rebuild must never block the event loop.
|
|
2705
2716
|
if (refsAdvanced) {
|
|
2706
|
-
return { ...cached.value, ahead: null, behind: null };
|
|
2717
|
+
return { ...cached.value, ahead: null, behind: null, gitStale: true };
|
|
2707
2718
|
}
|
|
2708
2719
|
return cached.value;
|
|
2709
2720
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2232",
|
|
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"
|