From 80661f03cec3de386dbd5e834702821859841e6a Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Sun, 28 Jun 2026 22:38:22 +0000 Subject: [PATCH] docs(changelog): defer non-critical session-switch refreshes (#5117) + scope-undef gate: allowlist requestIdleCallback/cancelIdleCallback --- CHANGELOG.md | 1 + scripts/scope_undef_gate.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff467b8f..60442497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ ### Fixed +- **Switching sessions feels snappier — non-critical refreshes now happen after the first paint.** The session-switch path deferred three non-essential operations (the workspace-tree/git-badge refresh, the model-dropdown option-list refresh, and a redundant empty-composer-draft save) until after the new session renders, instead of blocking the switch on them. Each deferred op re-checks the active session id at fire time, so a refresh scheduled for a session you've already switched away from is dropped rather than applied to the wrong session; non-empty composer drafts are never skipped. (Internal: added `requestIdleCallback`/`cancelIdleCallback` to the static-JS scope-undef gate's browser-globals allowlist.) Thanks @santastabber. (#5117) - **Stale approval cards now clear on stream teardown in legacy gateway mode.** When the WebUI ran against a legacy gateway backend, an approval card could linger after the underlying approval was already resolved/gone, until the next fallback poll reconciled it. Stream teardown now reconciles the gateway approval mirrors against the live queue (under the approval lock), so a stale card clears as soon as teardown proves the approval is gone — still-pending gateway and local approvals are preserved. Thanks @rodboev. (#5147, fixes #5135) - **A pinned reader no longer gets bounced off the live tail when a streaming turn rebuilds its rows.** While a response streams, live activity/worklog DOM updates rebuild rows; for a reader pinned to the live tail, restoring the first-visible viewport anchor could remount an older row and jump them away from the bottom. Pinned/following readers now keep a tail-relative scroll position across the rebuild (restored before the semantic anchor pass), while explicitly-unpinned/manual reader positions still use the semantic viewport-anchor restore. Thanks @santastabber. (#5118) - **Scheduled jobs created under a selected profile no longer trip the provider/model drift guard.** The cron profile selector lets you choose which profile a job runs under, but `_handle_cron_create()` snapshotted unpinned provider/model state *before* that selected runtime profile was applied — so the agent later compared runtime resolution against a stale create-time snapshot and could refuse to run a job whose intended runtime profile never changed. Snapshot recompute now runs inside the selected profile's context (validated at parity with cron update; only provider/model name strings are stored, no cross-profile state), while the default unpinned-create path is unchanged. Thanks @rodboev. (#5131, fixes #5130) diff --git a/scripts/scope_undef_gate.py b/scripts/scope_undef_gate.py index 2f12f4b9..4e2580dc 100644 --- a/scripts/scope_undef_gate.py +++ b/scripts/scope_undef_gate.py @@ -70,7 +70,7 @@ from shutil import which BROWSER_GLOBALS = [ "window", "document", "console", "localStorage", "sessionStorage", "setTimeout", "clearTimeout", "setInterval", "clearInterval", "requestAnimationFrame", - "cancelAnimationFrame", "queueMicrotask", "reportError", "fetch", "URL", + "cancelAnimationFrame", "requestIdleCallback", "cancelIdleCallback", "queueMicrotask", "reportError", "fetch", "URL", "URLSearchParams", "Blob", "File", "FileList", "FileReader", "FormData", "navigator", "location", "history", "alert", "prompt", "confirm", "EventSource", "WebSocket", "BroadcastChannel", "Image", "Audio", "MediaRecorder", "speechSynthesis",