[PR #4968] [GUI] Monitor: name the model, add lifetime averages, and the speed min and max #5270

Open
opened 2026-11-07 16:33:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4968
Author: @noahark
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: monitor-model-card


📝 Commits (1)

  • d2da860 [GUI] Monitor: name the model, add lifetime averages, and the speed min and max

📊 Changes

11 files changed (+182 additions, -9 deletions)

View changed files

📝 serve/web/app.css (+16 -0)
📝 serve/web/app.js (+85 -9)
📝 serve/web/locales/de.json (+9 -0)
📝 serve/web/locales/en.json (+9 -0)
📝 serve/web/locales/es.json (+9 -0)
📝 serve/web/locales/fr.json (+9 -0)
📝 serve/web/locales/ja.json (+9 -0)
📝 serve/web/locales/ko.json (+9 -0)
📝 serve/web/locales/pt.json (+9 -0)
📝 serve/web/locales/ru.json (+9 -0)
📝 serve/web/locales/zh.json (+9 -0)

📄 Description

The problem. The Monitor tab shows everything the model is doing - speed, VRAM, temperature, requests - but never says which model it is. The name only appears on the About tab, a click away. And every number on the eight cards is instantaneous: the average decode and prefill speed since the server started, which is the number people quote when they report a speed, is nowhere to be read (it is only spelled out at the foot of the request list, in one sentence).

What this does. A "Model" card, first in the grid (what the model is reads before what it is doing):

  • the model name (full string on hover), with the context window and engine version under it;
  • the averages since the server started, from data the server already reports: decode t/s, prefill t/s (uncached prompt tokens), tokens in and out per request, the share of prompt tokens reused from cache, and the window they cover (since - N requests);
  • under the Speed card's two numbers, the slowest and the fastest request of the ones the server keeps (min ... - max ... t/s each) - an average hides the spread a sparkline cannot: one long prefill and one streamed answer sit in the same number today;
  • a tooltip on the card label and on every fact name, saying what the number counts and what it leaves out - a small box in the cards' own style (same border, radius, shadow), the card surface at 70% over a blur, drawn by the page because a native title box cannot be styled;
  • before the first request the card names the model and says averages start with the first request.

Display only: no server, API or engine change - every field already arrives in GET /metrics (engine.model, engine.max_context, engine.version, totals.*, and per request id, decode_tok_s, prompt_ms, prompt_tokens, reused). The min and max are computed in the page: it keeps the requests it has seen, keyed by the request id the server already sends, and pulls the whole kept list once per page view with the existing metrics?requests=all - a poll alone carries only the last 12, and the tooltip says how many requests the numbers cover.

Every new string goes through tr() and was added to all nine catalogs, so python tools/web_i18n.py is clean. (The eight translations beyond English and Chinese are drafted here, not by native speakers - a proofread pass is welcome.)

Approach. Three kinds of files: serve/web/app.js (a small [data-tip] tooltip box shared by the page, a METRICS entry placed first, a template branch - the card carries facts and tooltips instead of a sparkline - a fill in renderMonitor(), and for the min and max a request window keyed by the server's own request id: seeded with one metrics?requests=all, added to from every poll, rebuilt when the server's totals window moves, i.e. a restart), serve/web/app.css (the box styled from the card tokens, plus the card's own rules, all on tokens the styles already use), and serve/web/locales/*.json (nine new keys each: eight monitor.model.* and monitor.speed.range for the min-max tooltip).

Validation.

  • Passed, measured: on our rig (three V100-class cards, Windows, source v0.2.9, engine 0.1.55) the card reads qwen3.8-flash-next-ud-iq4-xs-triple - 256K context - engine v0.1.55; after 52 requests: decode avg 108.0 t/s, prefill avg 1,601 t/s, 44,275 tokens in per request, 91.4% of prompt tokens reused - recomputed by hand from the same /metrics payload, in agreement. The min and max lines, over the 137 requests the server then kept: decode min 79.8 - max 171.9, prefill min 62 - max 3,474 - recomputed from GET /metrics?requests=all with the same formulas, in agreement. Both themes and the 2-column and 1-column media queries render correctly.
  • Passed, static: node --check serve/web/app.js; python tools/web_i18n.py exits 0 (all nine catalogs carry exactly the new keys and their placeholders).
  • Passed, logic: the tooltip box's handlers (show/hide/center/flip-at-the-top-edge/empty-tip/scroll-and-blur) and the min-max fill (per-request formulas incl. cached-only and cancelled requests skipped, sample counts in the tooltip, empty window) driven through a stubbed DOM in node - 15 checks OK.
  • Passed, tests: python -m unittest serve.test_web_i18n - 6 tests OK.
  • Not run: tests/terminal and the apps/host UI tests (nothing they cover is touched - no server or host code changed).

Limits. The card label and the fact names stay English, as the other eight cards' labels already do - translating the whole Monitor view is #4417's scope; what this change adds is already tr()-ed and catalogued, and will follow the language when that lands. The name is the served alias, not a file path. The averages cover the whole run and do not reset on a model unload/load. The min and max cover the requests the server keeps (the last 500 at most, not the whole run), say so in their tooltip with the count, and a page opened fresh learns the list with one extra request. backdrop-filter is the first use of it in these files: without it (or with it off) the box stays readable, the blur is decoration on top of the 70% surface.

Screenshots: I will add them in a follow-up comment (light and dark, and one tooltip open) if this is picked up.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4968 **Author:** [@noahark](https://github.com/noahark) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `monitor-model-card` --- ### 📝 Commits (1) - [`d2da860`](https://github.com/Niko1221/Strata/commit/d2da860bbdfe9ba135248080a5d556fdca721e35) [GUI] Monitor: name the model, add lifetime averages, and the speed min and max ### 📊 Changes **11 files changed** (+182 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `serve/web/app.css` (+16 -0) 📝 `serve/web/app.js` (+85 -9) 📝 `serve/web/locales/de.json` (+9 -0) 📝 `serve/web/locales/en.json` (+9 -0) 📝 `serve/web/locales/es.json` (+9 -0) 📝 `serve/web/locales/fr.json` (+9 -0) 📝 `serve/web/locales/ja.json` (+9 -0) 📝 `serve/web/locales/ko.json` (+9 -0) 📝 `serve/web/locales/pt.json` (+9 -0) 📝 `serve/web/locales/ru.json` (+9 -0) 📝 `serve/web/locales/zh.json` (+9 -0) </details> ### 📄 Description **The problem.** The Monitor tab shows everything the model is *doing* - speed, VRAM, temperature, requests - but never says *which* model it is. The name only appears on the About tab, a click away. And every number on the eight cards is instantaneous: the average decode and prefill speed since the server started, which is the number people quote when they report a speed, is nowhere to be read (it is only spelled out at the foot of the request list, in one sentence). **What this does.** A "Model" card, first in the grid (what the model *is* reads before what it is *doing*): - the model name (full string on hover), with the context window and engine version under it; - the averages since the server started, from data the server already reports: decode t/s, prefill t/s (uncached prompt tokens), tokens in and out per request, the share of prompt tokens reused from cache, and the window they cover (`since - N requests`); - under the Speed card's two numbers, the slowest and the fastest request of the ones the server keeps (`min ... - max ... t/s` each) - an average hides the spread a sparkline cannot: one long prefill and one streamed answer sit in the same number today; - a tooltip on the card label and on every fact name, saying what the number counts and what it leaves out - a small box in the cards' own style (same border, radius, shadow), the card surface at 70% over a blur, drawn by the page because a native `title` box cannot be styled; - before the first request the card names the model and says averages start with the first request. Display only: no server, API or engine change - every field already arrives in `GET /metrics` (`engine.model`, `engine.max_context`, `engine.version`, `totals.*`, and per request `id`, `decode_tok_s`, `prompt_ms`, `prompt_tokens`, `reused`). The min and max are computed in the page: it keeps the requests it has seen, keyed by the request id the server already sends, and pulls the whole kept list once per page view with the existing `metrics?requests=all` - a poll alone carries only the last 12, and the tooltip says how many requests the numbers cover. Every new string goes through `tr()` and was added to all nine catalogs, so `python tools/web_i18n.py` is clean. (The eight translations beyond English and Chinese are drafted here, not by native speakers - a proofread pass is welcome.) **Approach.** Three kinds of files: `serve/web/app.js` (a small `[data-tip]` tooltip box shared by the page, a `METRICS` entry placed first, a template branch - the card carries facts and tooltips instead of a sparkline - a fill in `renderMonitor()`, and for the min and max a request window keyed by the server's own request id: seeded with one `metrics?requests=all`, added to from every poll, rebuilt when the server's totals window moves, i.e. a restart), `serve/web/app.css` (the box styled from the card tokens, plus the card's own rules, all on tokens the styles already use), and `serve/web/locales/*.json` (nine new keys each: eight `monitor.model.*` and `monitor.speed.range` for the min-max tooltip). **Validation.** - Passed, measured: on our rig (three V100-class cards, Windows, source v0.2.9, engine 0.1.55) the card reads `qwen3.8-flash-next-ud-iq4-xs-triple - 256K context - engine v0.1.55`; after 52 requests: decode avg 108.0 t/s, prefill avg 1,601 t/s, 44,275 tokens in per request, 91.4% of prompt tokens reused - recomputed by hand from the same `/metrics` payload, in agreement. The min and max lines, over the 137 requests the server then kept: decode `min 79.8 - max 171.9`, prefill `min 62 - max 3,474` - recomputed from `GET /metrics?requests=all` with the same formulas, in agreement. Both themes and the 2-column and 1-column media queries render correctly. - Passed, static: `node --check serve/web/app.js`; `python tools/web_i18n.py` exits 0 (all nine catalogs carry exactly the new keys and their placeholders). - Passed, logic: the tooltip box's handlers (show/hide/center/flip-at-the-top-edge/empty-tip/scroll-and-blur) and the min-max fill (per-request formulas incl. cached-only and cancelled requests skipped, sample counts in the tooltip, empty window) driven through a stubbed DOM in node - 15 checks OK. - Passed, tests: `python -m unittest serve.test_web_i18n` - 6 tests OK. - Not run: `tests/terminal` and the `apps/host` UI tests (nothing they cover is touched - no server or host code changed). **Limits.** The card label and the fact names stay English, as the other eight cards' labels already do - translating the whole Monitor view is #4417's scope; what this change adds is already `tr()`-ed and catalogued, and will follow the language when that lands. The name is the served alias, not a file path. The averages cover the whole run and do not reset on a model unload/load. The min and max cover the requests the server keeps (the last 500 at most, not the whole run), say so in their tooltip with the count, and a page opened fresh learns the list with one extra request. `backdrop-filter` is the first use of it in these files: without it (or with it off) the box stays readable, the blur is decoration on top of the 70% surface. Screenshots: I will add them in a follow-up comment (light and dark, and one tooltip open) if this is picked up. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5270
No description provided.