From b9de0d70039b6859e800fe6f0366ef0d2dd2fa84 Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Mon, 13 Apr 2026 08:30:22 +0000 Subject: [PATCH] fix: [RESPONSIVE] Tighten layout for laptop and smaller-screen viewing (#1359) Co-authored-by: Alexander Whitestone Co-committed-by: Alexander Whitestone --- app.js | 2 +- server.py | 10 ++++++---- style.css | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 745884f5..493eac69 100644 --- a/app.js +++ b/app.js @@ -57,7 +57,7 @@ let performanceTier = 'high'; /** Escape HTML entities for safe innerHTML insertion. */ function escHtml(s) { - return String(s).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"'); + return String(s).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,'''); } // ═══ HERMES WS STATE ═══ diff --git a/server.py b/server.py index db1de2ba..02350978 100644 --- a/server.py +++ b/server.py @@ -103,11 +103,13 @@ async def main(): await stop logger.info("Shutting down Nexus WS gateway...") - # Close all client connections - if clients: - logger.info(f"Closing {len(clients)} active connections...") - close_tasks = [client.close() for client in clients] + # Close any remaining client connections (handlers may have already cleaned up) + remaining = {c for c in clients if c.open} + if remaining: + logger.info(f"Closing {len(remaining)} active connections...") + close_tasks = [client.close() for client in remaining] await asyncio.gather(*close_tasks, return_exceptions=True) + clients.clear() logger.info("Shutdown complete.") diff --git a/style.css b/style.css index f97cf12d..ff8f34fb 100644 --- a/style.css +++ b/style.css @@ -1346,6 +1346,22 @@ canvas#nexus-canvas { width: 240px; bottom: 180px; } + .gofai-hud { + left: 8px; + gap: 6px; + } + .hud-panel { + width: 220px; + padding: 6px; + } + .panel-content { + max-height: 80px; + } + .memory-feed { + width: 260px; + left: 8px; + bottom: 10px; + } } @media (max-width: 768px) { @@ -1357,6 +1373,12 @@ canvas#nexus-canvas { .hud-agent-log { display: none; } + .gofai-hud { + display: none; + } + .memory-feed { + display: none; + } .hud-location { font-size: var(--text-xs); }