From b3348da493918d934b0a278b67a929531351f169 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sun, 18 Oct 2026 22:01:21 +0200 Subject: [PATCH] Monitor: the saved screenshot starts with the Strata logo alone, without the Monitor headline --- apps/host/src/screens/Monitor.tsx | 2 +- apps/host/tests/split-qa2b-export.test.mjs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 apps/host/tests/split-qa2b-export.test.mjs diff --git a/apps/host/src/screens/Monitor.tsx b/apps/host/src/screens/Monitor.tsx index 4444cb49..371c4dff 100644 --- a/apps/host/src/screens/Monitor.tsx +++ b/apps/host/src/screens/Monitor.tsx @@ -151,7 +151,7 @@ function LegacyMonitorScreen({ native }: { const multipleScope = selection === 'all' && (runtime?.instances.length ?? 0) > 1; const chooseInstance = (id: string) => { setInstanceSelection(id); setGpuSelection(id !== 'all' && (runtime?.instances.find(instance => instance.id === id)?.gpuIds.length ?? 0) > 0 ? 'assigned' : 'all'); }; const overview =
- {tr(frozen ?

{tr("Monitor")}

{tr(frozen.modelLabel)} · {tr(frozen.time)}

: null)} + {tr(frozen ?

{tr(frozen.modelLabel)} · {tr(frozen.time)}

: null)} {tr(multipleModels ?

{tr("Model performance")}

{tr(runtime?.instances.map(i => { const recent = (data.requests ?? []).find(r => r.instanceId === i.id); const writing = i.phase === 'generating' || i.phase === 'thinking', reading = i.phase === 'reading'; return ; }))}
{tr("Model / device")}{tr("Generating tok/s")}{tr("Reading tok/s")}{tr("State")}{tr("Active / queued")}
{tr(deviceLabel(i.gpuIds, inventory))}{tr(number(writing ? i.outputTps : recent?.tps, 1))}{tr(writing ? 'Now' : recent ? 'Last request' : 'No request yet')}{tr(number(reading ? i.promptTps : recent?.promptTps, 0))}{tr(reading ? 'Now' : recent ? 'Last request' : 'No request yet')}{tr(i.phase)}{tr(runtime.mode === 'simulated' ? {tr("Illustrative")} : null)}{tr(number(i.active))} / {tr(number(i.queued))}
: null)} {tr(multipleModels ?

{tr(selectedInstance ? selectedInstance.gpuIds.length ? 'Requests, context and speed are scoped to this model. GPU readings include all work on the selected devices.' : 'CPU-only model. Requests and context are scoped to this model; system metrics are shared host measurements.' : 'Select a model for its context and speed. GPU readings and system RAM are shared host measurements.')}

: null)}
diff --git a/apps/host/tests/split-qa2b-export.test.mjs b/apps/host/tests/split-qa2b-export.test.mjs new file mode 100644 index 00000000..4bd3ea27 --- /dev/null +++ b/apps/host/tests/split-qa2b-export.test.mjs @@ -0,0 +1,17 @@ +// The saved Monitor screenshot starts with the Strata logo alone (no "Monitor" headline); the live Monitor page keeps its title. +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; + +const read = path => readFile(new URL(path, import.meta.url), 'utf8').then(s => s.replace(/\r\n/g, '\n')); + +test('the exported Monitor picture has the logo and no "Monitor" headline; the page itself keeps its title', async () => { + const source = await read('../src/screens/Monitor.tsx'); + const header = /\{tr\(frozen \?
(.*?)<\/header> : null\)\}/s.exec(source)?.[1]; + assert.ok(header, 'the picture has its own header (it only exists while the picture is taken)'); + assert.match(header, /