Issues / #2687
#2687 [Bug]: Chrome page translation jitters back to English - the web app rewrites the UI once a second by polling /metrics
open · @MrKop-git · 1 comentarios · En GitHub
Descripción
## What happened
The Monitor tab (and the header pill) update by **polling**: `serve/web/app.js` runs `async function poll()` and re-arms itself with `setTimeout(poll, 1000)` (line 158-176), i.e. one `GET /metrics` per second; `serve/web/monitor.js` does the same every 2 s. Every tick replaces text that Google Chrome's built-in page translation is also rewriting.
With Chrome's translate feature on ("translate this page"), the UI text flips back and forth between the translated language and English — it "jitters"/flickers into English on every poll, one shift per second on the Monitor tab. The numbers on the Monitor are unreadable while it happens.
Expected: the page should keep the translated text stable while it updates its own values.
**Steps:** open `http://127.0.0.1:<port>` in Chrome with a UI language other than English, let Chrome translate the page (or right-click > "Translate to ..."), open the Monitor tab, watch the header pill and the metric cards.
**Cause (as far as I can see in the source):** Chrome's translation is a DOM mutation pass. Rewriting the same text nodes from a timer once per second makes Chrome's translation state and our own updates fight over the same nodes, so the freshly written English string shows before the translation pass re-applies. A push from the server (a single long-lived response the server writes to, e.g. SSE / a streamed `/metrics`), or updating only the parts that changed, removes the per-second full rewrite.
## Strata version, GPU, OS
0.1.44.1 · GTX 1080 Ti 11GB (+ GT 710 for display) · CachyOS Linux 6.18.55 · Chromium 142 (Chrome's translate feature)
## Engine log
(not engine-related — the web app's own polling; no engine log lines)
En el sitio
Enlaces a install, modelos, releases.