From 98b2ae8103f3d9c16e23e50cc088a857caf6c825 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Wed, 27 May 2026 07:30:07 -0700 Subject: [PATCH] add sidebar footer RSS readout (polls /memory every 30s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Footer now shows " · " sourced from the /memory endpoint, polled every 30s. Color thresholds: orange warn at 2 GB Bun RSS or 50 tabs; red bad at 8 GB or 200 tabs (matches the tab-guardrail threshold landing in a later commit). The footer gives the user an early signal that the cliff is forming, instead of only learning when the OS OOM-kills the process. Backoff per Codex's flag: if a poll takes > 2s response time the sidebar drops to a 5-minute cadence until the next successful fast poll. The diagnostic shouldn't add load to a browser that's already unhealthy. Start/stop is wired to the existing setServerInfo() hook so the timer only runs while the sidebar is connected to a server. Co-Authored-By: Claude Opus 4.7 (1M context) --- extension/sidepanel.css | 15 ++++++ extension/sidepanel.html | 1 + extension/sidepanel.js | 98 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) diff --git a/extension/sidepanel.css b/extension/sidepanel.css index d83486e6c..12be632bf 100644 --- a/extension/sidepanel.css +++ b/extension/sidepanel.css @@ -1137,6 +1137,21 @@ footer { transition: color 150ms; } .footer-port:hover { color: var(--text-label); } +.footer-mem { + color: var(--text-meta); + font-family: var(--font-mono); + font-size: 11px; + margin-right: 6px; + padding: 1px 6px; + border-radius: var(--radius-sm); + transition: color 150ms; +} +.footer-mem.warn { + color: #f59e0b; +} +.footer-mem.bad { + color: #ef4444; +} .port-input { width: 56px; padding: 2px 6px; diff --git a/extension/sidepanel.html b/extension/sidepanel.html index cc456865f..b978f3343 100644 --- a/extension/sidepanel.html +++ b/extension/sidepanel.html @@ -166,6 +166,7 @@