Make WebUI pages live-update in Chrome on ChromeOS (Chromebook) #12
Reference in New Issue
Block a user
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?
The WebUI does not live-update its pages on a Chromebook (Chrome browser). On a CachyOS desktop the same pages update as expected. Other devices and browsers are not yet tested.
Reported symptom (not yet reproduced in-tree)
How auto-refresh is supposed to work (verified from source)
Live updates are driven by Server-Sent Events, not polling:
GET /eventsstreamstext/event-stream, one connection per tab, with a 15 s keep-alive comment —server/src/routes/events.rs:21-55.new EventSource('/events')and, on acaseevent, calllocation.reload()after a 300 ms debounce:server/templates/my_cases.html:247-249server/templates/case_page.html:806-808server/templates/case_recordings.html:419If the EventSource connection never opens, is buffered, or is dropped, the page never reloads — consistent with the symptom.
Hypotheses (all unverified)
app.doctate.determinates TLS at an OpenResty proxy in front of the server (app.doctate.de->minerva:3000). The/eventsresponse sets a 15 s keep-alive but noX-Accel-Buffering: noheader (server/src/routes/events.rs:50-54); nginx/OpenResty bufferstext/event-streamby default, which would delay or swallow events. This only explains the desktop/Chromebook difference if the desktop reaches the server by a different path (for exampleminerva.lan:3000directly, bypassing the proxy) — not confirmed.Cache-Controlis set on the HTML routes, so an intermediary or ChromeOS could serve cached HTML.What would disambiguate (to gather)
app.doctate.de(through the OpenResty proxy) versusminerva.lan:3000(direct). If only the proxied path fails, hypothesis 1 is most likely./eventsrequest: whether it opens and stays pending (streaming), errors, or closes immediately, and whethercaseevents arrive.Acceptance
X-Accel-Buffering: noheader on/eventswith a test asserting it).Diagnosis update follows below.
Differential confirmed by the reporter: the Chromebook is the only device reaching the WebUI through the public hostname
app.doctate.de; the working devices hitminerva.lan:3000directly. The failure tracks the proxied path exactly, placing the root cause in the reverse-proxy hop — not in the app's SSE logic and not in Chrome itself. Hypothesis 1 stands; 2 and 3 are demoted.Proxy identified: the TLS reverse proxy is Nginx Proxy Manager (plain nginx, admin UI at
192.168.178.102:81), not OpenResty as the issue body's hypothesis 1 assumed. nginx bufferstext/event-streamby default, which holds back the SSE frames the WebUI relies on forlocation.reload(). The buffering setting itself was not read out of the proxy config — flagged as inference from the proxied-versus-direct differential plus the documented nginx default.Two fix paths:
X-Accel-Buffering: no(plusCache-Control: no-cache) on the/eventsresponse inserver/src/routes/events.rs. nginx honors an upstreamX-Accel-Buffering: noresponse header to disable buffering for that single response, so it unblocks SSE without any proxy-side change, travels with the code, and is unit-testable.proxy_buffering off;to the doctate proxy host's Advanced config in Nginx Proxy Manager. Effective but lives in the proxy GUI, not version control.Regression guard for the in-repo path: an integration test asserting
GET /eventscarriesContent-Type: text/event-streamandX-Accel-Buffering: no.