Skip to content

Commit 82eaaef

Browse files
fatherlinuxclaude
andcommitted
fix: show version on machines even when mismatched
When version_sync fails, the version field contains a mismatch detail string (not a bare semver). Extract the first version number and show it with a ! suffix so the machine isn't blank. Tooltip no longer redundantly appends (MISMATCH) after the mismatch detail string. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3316156 commit 82eaaef

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

factory-dashboard.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ class FactoryScene extends Phaser.Scene {
186186
var lines = [
187187
repo.name, '---',
188188
'GHA: ' + (repo.gha === 1 ? 'PASS' : repo.gha === 0 ? 'FAIL' : 'n/a'),
189-
'Version: ' + (repo.version || 'n/a') +
190-
(repo.version_sync === 1 ? ' (synced)' : repo.version_sync === 0 ? ' (MISMATCH)' : ''),
189+
'Version: ' + (repo.version_sync === 1 ? (repo.version || 'n/a') + ' (synced)' :
190+
repo.version_sync === 0 ? (repo.version || 'MISMATCH') : 'n/a'),
191191
'Artifacts: ' + (repo.artifact_sync === 1 ? 'synced' : repo.artifact_sync === 0 ? 'MISMATCH' : 'n/a'),
192192
'Constitution: ' + (repo.constitution === 1 ? 'PASS' : repo.constitution === 0 ? 'FAIL' : 'n/a'),
193193
'Issues: ' + (repo.issues_open || 0) + ' PRs: ' + (repo.prs_open || 0)
@@ -544,11 +544,18 @@ class FactoryScene extends Phaser.Scene {
544544
fontFamily: '"Cascadia Code", monospace', fontSize: '10px', color: '#e0e0e0', fontStyle: 'bold'
545545
}).setOrigin(0.5, 0));
546546
547-
if (repo.version && /^\\d/.test(repo.version)) {
548-
this.factoryContainer.add(this.add.text(x + w / 2, y + 21, 'v' + repo.version, {
549-
fontFamily: 'monospace', fontSize: '8px',
550-
color: repo.version_sync === 1 ? '#00ff88' : '#ff6666'
551-
}).setOrigin(0.5, 0));
547+
if (repo.version) {
548+
var dispVer = repo.version;
549+
if (!/^\\d/.test(dispVer)) {
550+
var m = dispVer.match(/(\\d+\\.\\d+\\.\\d+)/);
551+
dispVer = m ? m[1] + '!' : null;
552+
}
553+
if (dispVer) {
554+
this.factoryContainer.add(this.add.text(x + w / 2, y + 21, 'v' + dispVer, {
555+
fontFamily: 'monospace', fontSize: '8px',
556+
color: repo.version_sync === 1 ? '#00ff88' : '#ff6666'
557+
}).setOrigin(0.5, 0));
558+
}
552559
}
553560
554561
var gates = [

0 commit comments

Comments
 (0)