Skip to content

refactor(ui): retire dock controller host - #174896

Merged
steipete merged 2 commits into
mainfrom
solid2/w-idiom3-dock-owner
Oct 17, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-idiom3-dock-owner

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Dock layout still registered a Lit-era controller through a generic panel host even though the owning Solid views already controlled attachment and disposal. This replaces that contract with createDockLayout(deps) and explicit connection/cleanup, removes the shared panel registry and requestUpdate alias, and names the surviving synchronous base SolidPanelOwner.

Terminal layout restoration still precedes session startup, dock cleanup still follows session teardown, and embedded/fullscreen panels leave viewport reservations to their parent. Geometry and saved open intent remain synchronous domain state, published through each existing owner's notification. Panel tags, routes, selectors, commit receipts, and lazy boundaries stay intact. The independent terminal intent queue retains its explicit callback; it does not use the retired shared host contract.

Proof Result
pnpm tsgo:ui Passed after correcting callback visibility in the link-reader owner
Changed terminal hosted-tabs / restore / browser toolbar suites, once each with one worker 7 + 15 + 3 passed
Retained dock-layout / shared-panel contract proof 8 + 3 passed on the prepared cut; shared-base rename is mechanical
Scoped format / lint Passed; existing reactivity warnings remain on unchanged expressions
Production Knip Clean; no findings or new ignores
Independent P0–P2 review Scoped-clean; no actionable findings
Base/head pnpm ui:build and strict performance comparison Passed
Startup JS gzip 340,569 → 340,549 B (−20 B), 7 requests
Startup CSS requests 1 → 1
Chat/new boot JS gzip −98 / −98 B, request counts unchanged
Focused CI repair Fullscreen unavailable/denied case passed locally after migrating its stale requestUpdate() test call to invalidate(); UI typecheck and independent repair review passed
Full CI Original run 38987237068 found the stale fullscreen test caller; every other lane passed or skipped. Fresh ci:full runs every UI, browser-extension, and real-Gateway shard on the repaired head

No markup or CSS changes; the proof targets lifecycle, restoration, focus, and reservation behavior. The canonical boot-manifest generator also refreshes already-landed renamed/reachable modules; no manual manifest edits or new eager registration were added.

Touched production TS/TSX: 5,875 → 5,792 LOC (−83). Tests: 3,273 → 3,275. Controller-pattern references: 43 → 3; createEffect 7 → 7; createRenderEffect 3 → 3; untrack 5 → 5; native listeners 5 → 4; DOM queries 1 → 1; production flush and owner captures remain zero. The three remaining class-pattern matches belong to existing desktop/terminal/session owners; the dock factory and shared panel base have no controller registration or host lifecycle contract.

Simplify pass: removed the generic registry, obsolete lifecycle dispatch, dock host adapters, and invalidation synonym. Kept the existing synchronous domain state and DOM commit receipt because panel actions and persistence consume them directly. No replacement framework, compatibility alias, or new dependency was introduced.

The CI repair changes one test call only; production build, startup, Knip, and runtime-review inputs are unchanged, so their evidence is reused. Existing fullscreen assertions and polling are preserved.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T00:40:46.167214Z 58a49f5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58a49f5f5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

desktopClientFactory: { default: () => new DesktopClient(), attribute: false },
},
methods: ["handleToggleRequest", "requestUpdate"],
methods: ["handleToggleRequest", "invalidate"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Migrate the remaining requestUpdate caller

The bridge no longer exposes requestUpdate, but ui/src/e2e/desktop-panel-fullscreen.e2e.test.ts:311-313 still invokes that method to force a rerender after changing document.fullscreenEnabled. That scenario now throws TypeError: ...requestUpdate is not a function before checking the unavailable-fullscreen state, so the existing desktop E2E lane will fail; update that caller to use invalidate or retain an alias until all callers are migrated.

AGENTS.md reference: AGENTS.md:L50-L53

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces the dock controller host with explicit lifecycle operations and renames the surviving synchronous panel base to SolidPanelOwner.

Example: A saved Browser dock is open on the right at 560px while an embedded Browser panel mounts and unmounts.

  • Before: The shared controller preserves the standalone dock's 560px reservation.
  • After: The dock factory preserves the same reservation through explicit connection and disposal.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The cutover is coherent and the prior blocker is fixed; confidence rests on source review and reported harness validation rather than directly observed runtime behavior.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; reported focused checks support lifecycle preservation, while inspected media belongs to the earlier reservation fix.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: There is no intended user-visible change; obsolete controller registration complicates panel lifecycle ownership.
Reason: The maintainer-authored direction follows the repository's Solid cutover policy and removes a redundant lifecycle registry without adding another state owner.

Merge readiness

✅ Ready for maintainer review

The previous fullscreen finding is fixed, and no new actionable code defects were found in this useful maintainer-directed lifecycle cutover.

Priority: P3
Reviewed head: cf1113083866e94dcd69e36852d64a0a26969b94

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No directly inspectable after-refactor runtime capture was supplied; historical reservation media does not establish this lifecycle cutover.
Agent review details

How this fits together

Control UI panel owners consume saved layout preferences and panel availability, maintain synchronous geometry and open intent, and publish rendering notifications and viewport reservations.

flowchart TD
  A[Panel host properties] --> B[Synchronous panel owner]
  C[Saved layout preferences] --> D[Dock layout factory]
  B --> D
  D --> E[Viewport reservations]
  D --> F[Solid rendering notification]
  B --> G[Explicit connection and disposal]
Loading

Technical review

Best possible solution:

Retain the explicit dock lifecycle cutover with synchronous state, existing persistence contracts, and complete caller migration.

Do we have a high-confidence way to reproduce the issue?

This refactor has no reported product defect to reproduce; source comparison confirms the previously reported fullscreen test failure is repaired.

Is this the best way to solve the issue?

The factory removes the obsolete registration layer while retaining synchronous layout decisions, saved intent, commit receipts, and explicit teardown ordering.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 58fb58883a67.

Provenance checked

  • Dock state and lifecycle changes intended behavior with a stated reason (d170459: Consolidate reactive state and lifecycle bookkeeping into focused controllers; this PR preserves those synchronous responsibilities while removing obsolete host registration.)
  • Settings suppression and saved open intent keeps the original intent (1c0ccdd: Hide docks during full-page Settings without overwriting saved open preferences, while allowing explicit opens.)
  • Embedded viewport reservations keeps the original intent (739d436: Prevent embedded panels from clearing the standalone dock's shared reservation and causing visible layout oscillation.)
  • Shared Solid panel base keeps the original intent (89564fa: Keep synchronous panel owners behind the shared Solid bridge and committed-DOM lifecycle during the renderer migration.)
  • Link reader attachment changes intended behavior with a stated reason (6d01bf5: Preserve plain TypeScript request and tab ownership during the Solid viewer migration; attachment now runs in onSettled with paired disposal.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduction reviewed: Reviewed the introduced merge-base-to-head hunks separately from base movement; fetched main still contains the controller host this PR retires. (ui/src/components/dock-layout.ts:16, cf1113083866)
  • Previous finding resolved: The sole follow-up commit changes the fullscreen unavailable-case caller and its structural type from requestUpdate to invalidate, matching the desktop bridge's exposed method. (ui/src/e2e/desktop-panel-fullscreen.e2e.test.ts:312, cf1113083866)
  • Lifecycle ordering retained: Terminal dock restoration still precedes session connection, and session disconnection still precedes dock disposal. (ui/src/components/terminal/terminal-panel.ts:159, cf1113083866)
  • Reservation contract preserved: The factory retains the standalone-only reservation contract established by fix(ui): layout flickers when Browser is open in the dock and a side panel #157533; its historical screenshots were inspected and are not attributed to this refactor. (ui/src/components/dock-layout.ts:25, 739d436f3766)
  • Current checks remain incomplete: Exact-head CI still has running lanes; the failed context check's annotation requests authored problem and evidence section headings, so it establishes a workflow gate rather than a production defect. (cf1113083866)
  • Repository policy and inspection limits: Read the complete root and UI policies and applicable Solid guidance; no deeper UI AGENTS.md or maintainer-notes directory was present. The installed Solid cheatsheet was absent, one historical layout blob was unavailable, and historical video preparation failed with ffprobe ENOENT; no browser playback tool was available. Checkout status remained clean. (ui/AGENTS.md:7, cf1113083866)

Likely related people:

  • Peter Steinberger: Raw commit babf04c adds ui/src/components/terminal/terminal-panel.ts:145 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: babf04ca0fcb; files: ui/src/components/terminal/terminal-panel.ts)
  • Charlie K: Raw commit 739d436 adds ui/src/components/browser/browser-panel.test.ts:243 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 739d436f3766; files: ui/src/components/browser/browser-panel.test.ts)
  • Vyctor H. Brzezowski: Raw commit 02be7fe adds ui/src/components/dock-panel-layout.test.ts:225 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 02be7fea9725; files: ui/src/components/dock-panel-layout.test.ts)

PR surface

Source -79, Tests +2. Total -77 across 34 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 23 274 353 -79
Tests 11 89 87 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 34 363 440 -77

Labels

Label changes:

  • add P3: This is behavior-preserving internal UI cleanup without an established current user-facing failure.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is behavior-preserving internal UI cleanup without an established current user-facing failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-17T00:51:43.038Z sha 58a49f5 :: needs changes before merge. :: [P2] Migrate the remaining desktop fullscreen E2E caller

Reviewed October 16, 2026, 9:19 PM ET / October 17, 2026, 01:19 UTC (Revision 2).

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The current head fixes the stale fullscreen test call found by CI. Its exact unavailable/denied case, UI typecheck, and independent repair review pass; production inputs and proof are unchanged. The PR body records the failed run and current evidence.

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 17, 2026
@steipete
steipete enabled auto-merge (squash) October 17, 2026 01:25
@steipete
steipete merged commit 343fb38 into main Oct 17, 2026
106 of 108 checks passed
@steipete
steipete deleted the solid2/w-idiom3-dock-owner branch October 17, 2026 01:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant