mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
Fix stats command flow and tracking metrics regressions
- Route default `subminer stats` through attached `--stats`; keep daemon path for `--background`/`--stop` - Update overview metrics: lookup rate uses lifetime Yomitan lookups per 100 tokens; new words dedupe by headword - Suppress repeated macOS `Overlay loading...` OSD during fullscreen tracker flaps and improve session-detail chart scaling - Add/adjust launcher, tracker query, stats server, IPC, overlay, and stats UI regression tests; add changelog fragments
This commit is contained in:
@@ -150,10 +150,9 @@ test('stats command launches attached app command with response path', async ()
|
||||
assert.equal(handled, true);
|
||||
assert.deepEqual(forwarded, [
|
||||
[
|
||||
'--stats-daemon-start',
|
||||
'--stats',
|
||||
'--stats-response-path',
|
||||
'/tmp/subminer-stats-test/response.json',
|
||||
'--stats-daemon-open-browser',
|
||||
'--log-level',
|
||||
'debug',
|
||||
],
|
||||
@@ -214,10 +213,9 @@ test('stats command returns after startup response even if app process stays run
|
||||
assert.equal(final, true);
|
||||
assert.deepEqual(forwarded, [
|
||||
[
|
||||
'--stats-daemon-start',
|
||||
'--stats',
|
||||
'--stats-response-path',
|
||||
'/tmp/subminer-stats-test/response.json',
|
||||
'--stats-daemon-open-browser',
|
||||
],
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -69,14 +69,11 @@ export async function runStatsCommand(
|
||||
try {
|
||||
const forwarded = args.statsCleanup
|
||||
? ['--stats', '--stats-response-path', responsePath]
|
||||
: [
|
||||
args.statsStop ? '--stats-daemon-stop' : '--stats-daemon-start',
|
||||
'--stats-response-path',
|
||||
responsePath,
|
||||
];
|
||||
if (!args.statsCleanup && !args.statsBackground && !args.statsStop) {
|
||||
forwarded.push('--stats-daemon-open-browser');
|
||||
}
|
||||
: args.statsStop
|
||||
? ['--stats-daemon-stop', '--stats-response-path', responsePath]
|
||||
: args.statsBackground
|
||||
? ['--stats-daemon-start', '--stats-response-path', responsePath]
|
||||
: ['--stats', '--stats-response-path', responsePath];
|
||||
if (args.statsCleanup) {
|
||||
forwarded.push('--stats-cleanup');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user