web: catch-up's wake-race network failure logs as the transient it is (#983)
Safari fires the refocus catch-up before the network is back ('Load
failed'); resyncActive re-runs on the next reconnect, so the failure
is expected and self-healing — console.warn, not console.error. Real
failures (bad JSON, logic errors) stay loud.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+7
−2
web/static/shell.js+7 −2
diff --git a/web/static/shell.js b/web/static/shell.js| index 2b9f377..29c87a6 100644 |
| --- a/web/static/shell.js |
| +++ b/web/static/shell.js |
| @@ -6191,7 +6191,11 @@ async function catchUpActiveMessages() { |
| renderActiveSurfaces(); |
| refreshGroupAppsUI(id); // an app add/remove may have landed while offline |
| } catch (e) { |
| - console.error("catch up (lab)", e); |
| + // A fetch-level TypeError is the tab waking before the network does |
| + // (Safari's "Load failed") — expected, and resyncActive re-runs on the |
| + // next reconnect/refocus. Anything else is a real bug: stay loud. |
| + if (e instanceof TypeError) console.warn("catch up (lab): network not ready — retries on reconnect", e); |
| + else console.error("catch up (lab)", e); |
| } |
| return; |
| } |
| @@ -6215,7 +6219,8 @@ async function resyncActive() { |
| // — advance the synced watermark (only now that last_at is current). |
| if (document.hasFocus()) onSawActiveThread(); |
| } catch (e) { |
| - console.error("resync", e); |
| + if (e instanceof TypeError) console.warn("resync: network not ready — retries on reconnect", e); |
| + else console.error("resync", e); |
| } finally { |
| resyncing = false; |
| } |