Repository navigation
refactor(ui): simplify systems and portals ownership - #173780
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 replaces Systems and Portals controller classes with factory-owned state and forwards desktop requests through an owned element reference. Example: Open Systems with Demo Gateway selected, then view the Garden planner portal.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is a useful maintainer-directed refactor with no actionable correctness or security findings; the real-Gateway CI shards remain pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI owners consume Gateway snapshots, events, and user actions, then supply machine inventory, desktop presentation, portal previews, and presentation receipts to Solid views. flowchart TD
A[Gateway snapshots and events] --> B[Systems route owner]
A --> C[Portals component owner]
B --> D[Systems page and sidebar]
D --> E[Desktop panel reference]
C --> F[Portal iframe]
C --> G[Presentation receipts]
Technical reviewBest possible solution: Retain the single synchronous owner for each page and complete the existing exact-head CI and landing workflow. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor rather than a reported bug; source and supplied evidence were inspected without executing target code. Is this the best way to solve the issue? The approach preserves synchronous state and existing lifecycle boundaries while deleting the replaced implementations and removing DOM lookup for desktop forwarding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6871f81d89fb. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -5, Tests +6. Total +1 across 11 files. Added test files: 0. View PR surface stats
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, 12:25 AM ET / 04:25 UTC. |
|
Merged via squash.
|
What Problem This Solves
Systems and Portals render in Solid but still retain controller classes and forwarding adapters. Systems also searches the DOM to forward desktop requests.
User Impact
No intended behavior change. Systems keeps cached selection, search, filters, and sort across navigation; sidebar observation remains passive. Portals keeps iframe identity, probe reuse, environment polling, synchronous request admission, and one presentation receipt per command.
Why This Change Was Made
Replace the classes with
createSystemsandcreatePortals. Systems remains a plain route-cached owner because the sidebar and page share its identity and retained preferences; mounted Solid views own observation and active reads. Portals owns its subscriptions and cleanup within the component. Command receipts remain explicit synchronous transitions. A branch-owned desktop ref replaces the DOM query.Touched production files: 2,466 → 2,461 LOC (-5). Test LOC: 1,367 → 1,373 (+6). Controller references: 24 → 0;
createEffect: 4 → 4;untrack: 0 → 0;addEventListener: 2 → 2, paired with cleanup. Counts include imports and exclude AbortController. Lazy route modules, host tags, classes, and selectors remain intact.Evidence
Broad proof runs in PR CI with
ci:full. No local full suite or parity run was used.The complete 1280×900 dark captures were inspected and contain only synthetic data. Contact sheets are ordered Systems, Portals. The first baseline capture used mismatched fixture build identity; the corrected harness reads each build’s actual identity. No build or passing test suite was repeated.
The Systems sort/filter test emits pre-existing
NO_OWNER_EFFECTdiagnostics: the unchanged shared Menu activation path reads inline JSX items outside an owner. Source comparison against the base confirms the same item construction and event path; this attribution is not a baseline runtime replay.