mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2687] [Bug]: Chrome page translation jitters back to English - the web app rewrites the UI once a second by polling /metrics #1069
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1069
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MrKop-git on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2687
What happened
The Monitor tab (and the header pill) update by polling:
serve/web/app.jsrunsasync function poll()and re-arms itself withsetTimeout(poll, 1000)(line 158-176), i.e. oneGET /metricsper second;serve/web/monitor.jsdoes 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)
@MrKop-git commented on GitHub (Oct 15, 2026):
Correction to my own analysis in this issue (the fix is in PR #2692):
I wrote here that the cause was the per-second rewrite and that a push from the server "or updating only the parts
that changed" would remove it. The second half of that was wrong, and a fix built on it would not have worked:
GET /metrics/streamsend an event only when a fingerprint of the payload changed. But the payloadincludes
hardware, and the hardware sampler samples once a second - GPU load, temperature and VRAM change everytick. The fingerprint changed every second, so the throttle never engaged and the flicker stayed.
The rate was never the cause. Chrome translates a word by replacing it in the page; a script that writes the
English back a second later puts the original in its place, so the translation and the script fight over the same
node - one flip per second. Updating less often would only flip less often, not stop.
What the fix actually does:
(measured 6 events in 5 s) - the Monitor scrolls exactly as before.
every tick, because a number needs no translating; a word is written once and then left alone. Nothing competes
with the translation, so there is nothing to flicker.
translate="no", and the page now brings its own translation (#2686), so the browser stops offering totranslate it at all.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.