Repository navigation
refactor: simplify Solid widget lifecycles and DOM ownership - #176377
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 19, 2026
…w#176377) * refactor: simplify Solid widget lifecycles and DOM ownership * fix: retire noVNC listeners with explicit teardown
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Solid widget shells still contain redundant lifecycle effects, reactive tracking suppression, and DOM searches for elements whose owners already know them.
User Impact
No intended visual change. Existing host tags, classes, selectors, routes, lazy imports, iframe retirement acknowledgements, terminal focus, and remote input behavior are preserved. Remote desktop callbacks now retire after permanent disconnect, including with noVNC’s custom event target, which ignores
AbortSignallistener options.Why This Change Was Made
Use owner-scoped listener cleanup, plain arguments for retained services, refs for board/MCP/lobster elements, and derived terminal trigger selection. Custodian refresh follows the visible component's lifetime; preview commits follow their update handler; lobster animation timers start at the synchronous owner's reconciliation. A small Tabs ref interface exposes its existing tab registry to board scrolling. noVNC cleanup uses actual removal callbacks rather than unsupported listener options, with a regression fixture matching its installed
EventTargetMixincontract. MCP activity retains one deliberate initial snapshot because activity and visibility must publish atomically.This is the first widget cleanup batch, not a claim that the wave-zero targets are complete. It removes all direct DOM listeners from the Solid shells and 24 of 25 scoped
untrackcalls. The remaining effects synchronize existing external owners. Reaching the 70% effect target needs shared commit/measurement primitives or changes to those owners; wrapping the same work in local helpers would only hide it. Four composer geometry searches and assistant foreground-pane discovery require owner interfaces in the chat/composer lane.Evidence
pnpm tsgo:uiShowsignatures--maxWorkers=1git diff --checkSTRICT_READ_UNTRACKEDdiagnostics, with remaining tracking cleanup explicitly unfinished85fc54e83789head:reply-admission-ticket.ts,reply-turn-admission-owner.ts; no widget findingsc7d32eea66f; the subsequent correction changes only the existing isolated desktop runtimeci:full; PR CI owns broad proofNo rendered markup or stylesheet changes are intended, so this refactor makes no visual-change or screenshot claim. No local E2E or full test suite ran, and no remote testing lease was requested.
Refactor measurements
Against
6fcf1c433273aa44c0663c09a4c0432bc5567ece; production widget scope excludes tests and test helpers. Query totals include generic TypeScript calls that the checklist's literal regex misses.createEffectcreateRenderEffectuntrackaddEventListenerreferences, including Gateway API declaration/callsquerySelector(All)(literal checklist regex)The 69-line production growth is principally explicit paired listener disposal and element-ref ownership. No dependency, configuration option, controller, or alternative renderer is introduced.
Remaining effects and queries
Effects: board document binding (
board/board-document.tsx:313), MCP retirement (board/board-mcp-app-content.tsx:33), tab scroll measurement (board/board-tabs.tsx:37), board readiness (board/board-view.tsx:172), widget frame/loading/error owners (board/board-widget-cell.solid.tsx:214,241,266); browser/terminal commit receipts (browser/browser-panel-registration.tsx:84,terminal/terminal-panel-registration.tsx:100); desktop transport authority/subscription (desktop/desktop-panel-solid.tsx:70,81); assistant dock reconciliation/subscriptions (assistant-panel-solid.tsx:46,66); MCP iframe binding/title/presentation/geometry (mcp-app-view.tsx:54,57,67,68); canvas authorization/sandbox (canvas-widget-view.tsx:649,663); link-reader intersection/markdown/owner binding/commit work (link-reader-content.tsx:362,link-reader-markdown.tsx:194,link-reader-panel.tsx:176,207); lobster owner props (lobster-pet.tsx:27). The shared intersection primitive is still in the primitives lane.The scoped
untracksurvivor isboard/board-mcp-app-lifecycle.ts:52, the intentionalinitialActivesnapshot. The coupled Tabs file retains its unchanged keyed-value lifetime snapshot (solid/tabs.tsx:69). Remaining listener references belong to WebSocket, AbortSignal, AudioBufferSourceNode, or the Gateway event API, with abort scopes or paired removal.Foreign-island queries: remote favicon document (
browser/browser-favicon-script.ts:7,13), noVNC (desktop/desktop-client.ts:20), markdown output (link-reader-hovercard-owner.ts:188,link-reader-markdown.tsx:216,227,231,link-reader-panel-owner.ts:278,link-reader-prefetch-owner.ts:194), inert SVG export (lobster-image.ts:62,68,69). Remaining scoped work: MCP host discovery across render roots (mcp-app-unmount.ts:20) needs lifecycle registration; it is not an iframe-internal query. Cross-lane work still required: authoritative foreground pane lookup (assistant-panel-controller.ts:173) and composer geometry refs (lobster-pet-scene.ts:261,262,266,272).Exact-head CI attribution
Final head
85fc54e83789ranci:fullrun 39162184776. All non-skipped jobs passed except the two real-Gateway jobs and their aggregate gate.security-fastpassed. The added noVNC regression is covered by the passing full UI unit job. All three failed test names and assertion signatures also fail in latest completed scheduled main run 39158806323:chat-managed-media-order: keeps headings, managed images and trailing prose ordered live and after reload without duplicateschat-tts-supplement: attaches delayed speech to each original answer live and after reloadcontrol-ui-media-transcript: delivers PowerPoint and keeps persisted attachment failures replay-safeslides.pptxattachment cardLanding uses the authorized native inherited-failure route with retained exact-head checkout and annotation evidence; these CI failures remain failures.