v2.26.0: fix SSE fanout crash and branded logo FOUC

- Fix SSE fanout thread AttributeError when source queue is None during
  interpreter shutdown by snapshotting to local variable with null guard
- Fix branded "i" logo rendering oversized on first page load (FOUC) by
  adding inline width/height to SVG elements across 10 templates
- Bump version to 2.26.0 in config.py, pyproject.toml, and CHANGELOG.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-03-13 11:51:27 +00:00
parent 00362bcd57
commit e00fbfddc1
183 changed files with 2006 additions and 4243 deletions
+8 -15
View File
@@ -6,6 +6,7 @@ import socket
import subprocess
import threading
import time
from flask import Flask
# Try to import flask-sock
@@ -16,6 +17,8 @@ except ImportError:
WEBSOCKET_AVAILABLE = False
Sock = None
import contextlib
from utils.logging import get_logger
logger = get_logger('intercept.audio_ws')
@@ -56,10 +59,8 @@ def kill_audio_processes():
audio_process.terminate()
audio_process.wait(timeout=0.5)
except:
try:
with contextlib.suppress(BaseException):
audio_process.kill()
except:
pass
audio_process = None
if rtl_process:
@@ -67,10 +68,8 @@ def kill_audio_processes():
rtl_process.terminate()
rtl_process.wait(timeout=0.5)
except:
try:
with contextlib.suppress(BaseException):
rtl_process.kill()
except:
pass
rtl_process = None
time.sleep(0.3)
@@ -261,16 +260,10 @@ def init_audio_websocket(app: Flask):
# Complete WebSocket close handshake, then shut down the
# raw socket so Werkzeug cannot write its HTTP 200 response
# on top of the WebSocket stream.
try:
with contextlib.suppress(Exception):
ws.close()
except Exception:
pass
try:
with contextlib.suppress(Exception):
ws.sock.shutdown(socket.SHUT_RDWR)
except Exception:
pass
try:
with contextlib.suppress(Exception):
ws.sock.close()
except Exception:
pass
logger.info("WebSocket audio client disconnected")