[fix](trx-frontend-http): compress images and fix SSE heartbeat timing

Resize favicon from 1024x1024 to 64x64 and logo from 1024x1024 to
256x256, reducing total image size from ~3 MB to ~70 KB.

Fix SSE heartbeat race condition where the 10s ping interval competed
with the 8s stale threshold, causing spurious reconnects. Now pings
every 5s server-side, with a 15s stale threshold and 5s check interval
client-side.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-02-07 14:50:25 +01:00
parent 2bda78d724
commit 20fbd3c2cd
4 changed files with 3 additions and 3 deletions
@@ -289,11 +289,11 @@ es.onmessage = (evt) => {
esHeartbeat = setInterval(() => {
const now = Date.now();
if (now - lastEventAt > 8000) {
if (now - lastEventAt > 15000) {
es.close();
connect();
}
}, 4000);
}, 5000);
}
async function postPath(path) {