mirror of
https://github.com/smittix/intercept.git
synced 2026-07-16 05:18:10 -07:00
fix: resolve two-window hang and sweep UI/theming updates
Fix app becoming unresponsive when two browser windows are open: the root cause was HTTP/1.1 connection pool exhaustion (6-connection limit per origin). VoiceAlerts was opening 3 SSE streams per window by default, so two windows produced 8 connections and permanently starved all regular HTTP requests. - voice-alerts.js: default all streams to false (opt-in) to stay within the browser connection limit; existing user preferences in localStorage are preserved - routes/alerts.py: replace direct AlertManager.stream_events() with sse_stream_fanout so both windows receive every alert instead of competing for the same queue - routes/bluetooth_v2.py: same fanout fix via subscribe_fanout_queue, preserving named SSE events (device_update, scan_started, etc.) Also includes accumulated UI/theming changes: accent-cyan CSS variable sweep across mode CSS/JS files, standalone dashboard pages, template updates, satellite TLE data refresh, and tile provider default rename. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3014,10 +3014,14 @@ const Waterfall = (function () {
|
||||
}
|
||||
|
||||
// Backend stop is fire-and-forget; UI is already updated above.
|
||||
const _audioStopCtrl = new AbortController();
|
||||
const _audioStopTid = setTimeout(() => _audioStopCtrl.abort(), 3000);
|
||||
try {
|
||||
await fetch('/receiver/audio/stop', { method: 'POST' });
|
||||
await fetch('/receiver/audio/stop', { method: 'POST', signal: _audioStopCtrl.signal });
|
||||
} catch (_) {
|
||||
// Ignore backend stop errors
|
||||
} finally {
|
||||
clearTimeout(_audioStopTid);
|
||||
}
|
||||
|
||||
if (resumeWaterfall && _active) {
|
||||
@@ -3222,10 +3226,14 @@ const Waterfall = (function () {
|
||||
|
||||
if (_es) {
|
||||
_closeSseStream();
|
||||
const _wfStopCtrl = new AbortController();
|
||||
const _wfStopTid = setTimeout(() => _wfStopCtrl.abort(), 3000);
|
||||
try {
|
||||
await fetch('/receiver/waterfall/stop', { method: 'POST' });
|
||||
await fetch('/receiver/waterfall/stop', { method: 'POST', signal: _wfStopCtrl.signal });
|
||||
} catch (_) {
|
||||
// Ignore fallback stop errors.
|
||||
} finally {
|
||||
clearTimeout(_wfStopTid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user