Repository navigation
refactor(ui): own desktop session subscriptions in Solid - #174170
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves Desktop gateway subscription lifetime into Solid while retaining synchronous session-target and availability ownership. Example: A Desktop panel viewing node:other switches gateway clients, then receives a locked-state event.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-directed refactor open: it completes a coherent lifecycle cutover, with no actionable correctness or security findings; both failing CI signatures also occur on other PRs. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI Desktop panel consumes gateway inventory and session events, resolves the selected machine, and publishes availability and connection state to its Solid presentation. flowchart LR
A[Desktop Solid component] --> B[Client memo and subscription effect]
B --> C[Gateway event stream]
C --> D[Desktop session owner]
D --> E[Desktop panel controller]
E --> F[Desktop presentation and viewer]
Technical reviewBest possible solution: Retain this focused Solid lifecycle cutover and preserve the existing synchronous session and connection owners. Do we have a high-confidence way to reproduce the issue? There is no reported behavioral defect to reproduce; inspection confirms a lifecycle refactor, and no target code was executed. Is this the best way to solve the issue? A memo-selected subscription effect fits Solid ownership while the plain TypeScript owner preserves synchronous admission and stale-result rejection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2bc8fef76158. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -2, Tests +12. Total +10 across 4 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 7:49 AM ET / 11:49 UTC. |
|
Merged via squash.
|
What Problem This Solves
Desktop session and availability requests still depended on a Lit-era subscription controller and host-wide update callback. That coupled synchronous target admission to the panel's old lifecycle.
User Impact
Desktop selection, startup polling, lock-state feedback, reconnect, and stale-result rejection keep their existing behavior. Native methods can still act before the Solid view mounts. Tags, selectors, markup, styles, and lazy boundaries are unchanged.
Why This Change Was Made
Keep
DesktopSessionOwneras a plain TypeScript domain owner: request generations, current targets, and startup state require synchronous decisions. Remove its structural host dependency andSubscriptionsControllerregistration.DesktopPanelContentselects the gateway client through a memo and owns the subscription through a split effect with returned cleanup. Existing parent projection publishes the aggregate view, so this adds no second store or child projection.Retain the session owner’s existing pure target-change predicate. Remove two redundant notifications from synchronous selection paths that already scheduled the same render before their next await; no extra helper or copied state is introduced.
Evidence
ci:full; every selected check passes. The earlier Models-layout and assertion-ratchet failures are resolved on this run.This is a lifecycle-only refactor; no screenshots, local E2E/parity runs, or remote test leases were needed. Broader startup, target switching, and document-state cases run in PR CI.
createEffectcreateRenderEffectuntrackaddEventListenerflushrunWithOwner/getOwnerProduction shrinks by 2 lines across three files. The new effect owns an external gateway subscription, not a copied value; its memo keeps the subscription stable across unrelated panel publications. The remaining checklist reference is the separate panel controller, whose larger render-fence cut is coordinated with the other panel consumers. The existing noVNC DOM island and lifetime-stable panel adapter remain outside this cut; main’s keyboard ref and factory remain intact.
The client memo is created after the panel render source binds: rc.14 computes memos eagerly, so creating it earlier would miss later client changes. The replacement-gateway case proves that new lock feedback renders without reconnecting RFB. Test LOC is 232 → 244 (+12).
Performance evidence: run 38898154138, job 116963950544, tested merge
25a59e9c8fe11f0b0fea95afefe1c01fe559e903.