Repository navigation
fix(ui): keep canvas leases lifecycle-owned and timer-safe - #117173
Conversation
|
Merged via squash.
|
|
Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 10:41 PM ET / August 1, 2026, 02:41 UTC. ClawSweeper reviewWhat this changesThe branch makes Control UI canvas capability renewal reject retired lease generations before changing timer state and clamps renewal delays to the shared browser-safe timer limit. Merge readinessThis PR remains necessary: current Priority: P1 Review scores
Verification
How this fits togetherThe Control UI gateway store starts a per-tab canvas capability lease after a gateway hello and publishes refreshed canvas URLs to mounted widgets. The lease refreshes its server-issued capability before expiry, so its timer and generation state determine whether gateway refresh RPCs continue, stop, or reconnect safely. flowchart LR
A[Gateway hello canvas URL] --> B[Canvas lease]
B --> C[Refresh capability RPC]
C --> D[Publish refreshed canvas URL]
D --> E[Lifecycle change: stop or reconnect]
C --> F[Generation-owned renewal timer]
E --> F
F --> C
Decision needed
Why: The patch is source-supported and narrowly scoped, but the protected label requires explicit maintainer handling rather than automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceSource +9, Tests +90. Total +99 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused lease-owner repair once the exact candidate head is green and cleanly merged with current Do we have a high-confidence way to reproduce the issue? Yes, from source: invoke Is this the best way to solve the issue? Yes. The repair belongs in the single private lease scheduler, centralizes the existing generation invariant, and reuses the repository's shared browser-safe delay contract instead of introducing UI-specific timer behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 91aff8089c9e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* origin/main: fix(ui): keep canvas lease renewals lifecycle-owned and timer-safe (openclaw#117173) fix(teams): restore the official square product icon (openclaw#117170)
* commit '6938f7dddb63bad59862c014c427d63f0a41a6f4': (368 commits) fix: allow gateway service commands for named profiles (openclaw#116314) fix(plugins): invalidate bundled artifact locations after metadata refresh (openclaw#117041) fix(ollama): honor model requests and pull completion contracts (openclaw#117171) fix(agents): prevent fallback after stale lifecycle abort (openclaw#117168) fix(telegram): confirm polling before long poll (openclaw#116970) fix(tlon): wire autoDiscoverChannels through the settings-store round-trip (openclaw#114949) fix(gateway): yield before post-ready background work (openclaw#117083) fix(ui): keep canvas lease renewals lifecycle-owned and timer-safe (openclaw#117173) fix(teams): restore the official square product icon (openclaw#117170) refactor(ui): replace duplicated locale bundles with canonical translation memory (openclaw#117157) fix(ui): retire stale Gateway event-log observers (openclaw#117169) fix(agents): keep subagent status consistent after restart and large fan-outs (openclaw#117141) refactor(ui): unify filtered session list ownership (openclaw#117158) refactor(agents): consolidate context budgets and compaction recovery (openclaw#117149) fix(net-policy): redact sig and x-* auth params in URLs and bodies (openclaw#116957) refactor(agents): remove duplicate generated-media delivery fallbacks (openclaw#117150) refactor(reply): unify turn lifecycle state ownership (openclaw#117145) fix(ui): preserve emoji agent avatar initials (openclaw#104912) refactor(auto-reply): unify command and directive ownership (openclaw#117143) refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146) ...
…penclaw#117173) Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: fix(telegram): confirm polling before long poll (openclaw#116970) fix(tlon): wire autoDiscoverChannels through the settings-store round-trip (openclaw#114949) fix(gateway): yield before post-ready background work (openclaw#117083) fix(ui): keep canvas lease renewals lifecycle-owned and timer-safe (openclaw#117173)
* commit '55215cd9edd2b585cbaee5481d5352aabf7e4399': (368 commits) fix: allow gateway service commands for named profiles (openclaw#116314) fix(plugins): invalidate bundled artifact locations after metadata refresh (openclaw#117041) fix(ollama): honor model requests and pull completion contracts (openclaw#117171) fix(agents): prevent fallback after stale lifecycle abort (openclaw#117168) fix(telegram): confirm polling before long poll (openclaw#116970) fix(tlon): wire autoDiscoverChannels through the settings-store round-trip (openclaw#114949) fix(gateway): yield before post-ready background work (openclaw#117083) fix(ui): keep canvas lease renewals lifecycle-owned and timer-safe (openclaw#117173) fix(teams): restore the official square product icon (openclaw#117170) refactor(ui): replace duplicated locale bundles with canonical translation memory (openclaw#117157) fix(ui): retire stale Gateway event-log observers (openclaw#117169) fix(agents): keep subagent status consistent after restart and large fan-outs (openclaw#117141) refactor(ui): unify filtered session list ownership (openclaw#117158) refactor(agents): consolidate context budgets and compaction recovery (openclaw#117149) fix(net-policy): redact sig and x-* auth params in URLs and bodies (openclaw#116957) refactor(agents): remove duplicate generated-media delivery fallbacks (openclaw#117150) refactor(reply): unify turn lifecycle state ownership (openclaw#117145) fix(ui): preserve emoji agent avatar initials (openclaw#104912) refactor(auto-reply): unify command and directive ownership (openclaw#117143) refactor(plugins): consolidate descriptor and startup ownership (openclaw#117146) ...
* origin/main: fix(ui): keep canvas lease renewals lifecycle-owned and timer-safe (openclaw#117173) fix(teams): restore the official square product icon (openclaw#117170)
What Problem This Solves
Control UI canvas capability renewal had two independent lifecycle defects in its private scheduler:
setTimeout. Chromium converts delays above 2,147,483,647 ms into immediate callbacks, producing a real RPC storm.On frozen current main
fdcb321bfaaadb5a1e7d123b6be7a934980f8b12, independent Google Chrome 150 plus the full productioncreateApplicationGateway, genuine device-authenticated WebSocket challenge, and actual canvas refresh RPCs produced 123 server requests and 122 URL rotations in 120 ms. The same browser proof reproduced a timer being installed after stop and an active reconnect timer being orphaned.Why This Change Was Made
The existing canvas lease owns both the generation and its renewal timer, so both repairs belong in that one private scheduler. A canonical generation predicate now guards scheduling and checks stale callbacks before they mutate the active timer handle. All duplicate lifecycle checks reuse that predicate.
Every native delay goes through the existing exported browser-safe
resolveSafeTimeoutDelayMshelper; normal expiry, minimum delay, retry backoff, missing-expiry renewal, and single-flight behavior stay unchanged.Only one existing private production owner and its colocated tests change. There are no protocol, authentication, security, public configuration, persistence, dependency, or package-surface changes.
User Impact
Verification
Frozen base:
fdcb321bfaaadb5a1e7d123b6be7a934980f8b12.Immutable candidate:
e65158e7e953858ce3041159eb13831f51c817c6.oxlint --type-aware --type-check, targetedoxfmt --check, andgit diff --checkall passed.Native timer contracts: Node.js timers and browser maximum timer delay.