feat(stats): add v1 immersion stats dashboard (#19)

This commit is contained in:
2026-03-20 02:43:28 -07:00
committed by GitHub
parent 42abdd1268
commit 6749ff843c
555 changed files with 46356 additions and 2553 deletions

View File

@@ -5,6 +5,7 @@ import {
requestSingleInstanceLockEarly,
resetEarlySingleInstanceStateForTests,
} from './early-single-instance';
import * as earlySingleInstance from './early-single-instance';
function createFakeApp(lockValue = true) {
let requestCalls = 0;
@@ -54,3 +55,16 @@ test('registerSecondInstanceHandlerEarly replays queued argv and forwards new ev
['SubMiner.exe', '--start', '--show-visible-overlay'],
]);
});
test('stats daemon args bypass the normal single-instance lock path', () => {
const shouldBypass = (
earlySingleInstance as typeof earlySingleInstance & {
shouldBypassSingleInstanceLockForArgv?: (argv: string[]) => boolean;
}
).shouldBypassSingleInstanceLockForArgv;
assert.equal(typeof shouldBypass, 'function');
assert.equal(shouldBypass?.(['SubMiner', '--stats', '--stats-background']), true);
assert.equal(shouldBypass?.(['SubMiner', '--stats', '--stats-stop']), true);
assert.equal(shouldBypass?.(['SubMiner', '--stats']), false);
});