Skip to content

refactor(ui): own sidebar menus outside reactive roots - #179166

Merged
steipete merged 1 commit into
mainfrom
solid2/w-s2-comp-a-followup
Oct 21, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-s2-comp-a-followup

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope Solid 2 census

Measured 154 production files / 36,938 lines on base aeae6d1d79a30036edc275bcfcccbd396d2805d3. Each cell is before → after this PR. This is a full-scope audit, not a claim that all remaining candidates are complete.

File family Files 1 stale intrinsic handlers 2 onCleanup calls 3 async-read candidates 4 local mutation flows 5 renderer-loader candidates 6 structured signals 7 hand createComponent 8 throw-only context 9 sibling Loading 10 owner calls
app-sidebar* 42 0→0 4→2 0→0 0→0 1→1 0→0 0→0 0→0 0→0 5→3
sidebar-* 40 0→0 4→3 1→1 4→4 2→2 2→2 0→0 0→0 0→0 0→0
session-* 72 0→0 8→7 3→3 1 compliant→1 compliant 0→0 4→4 0→0 0→0 0→0 4→4
Total 154 0→0 16→12 4→4 4+1 compliant→same 3→3 6→6 0→0 0→0 0→0 9→7

Item 2 counts raw calls, including allowed primitive cleanup. Item 10 counts imported owner escape calls: three remain candidates for later removal, four mount foreign DOM. Runtime imports total 19; only three are renderer-loader candidates. Other imports load domain commands, observers, registration, or retained prewarm/retry adapters. The conditional Online handler is on Dynamic, whose runtime spread keeps it current.

What Problem This Solves

Removes the detached reactive root used to keep sidebar menus alive across provider replacement, and pairs sidebar/dropdown/placement cleanup with Solid 2 settled lifetimes.

User Impact

No intended visual or interaction change. Open menus and their pending work retain the sidebar host's lifetime; recreated views subscribe to that owner. Dropdown hover listeners still detach on removal, and placement animations cancel when their group disappears.

Why This Change Was Made

Sidebar menu state is now synchronous plain-owner state, read through a view-owned projection. Native host disposal releases its subscriptions, timers and pending work explicitly. This removes a detached createRoot/runWithOwner pair without moving work into the provider lifetime. The existing provider/client replacement and native reconnect tests protect that boundary.

Dropdown teardown is registered before Menu publishes its settled handle; listener setup stays at handle publication. Sidebar disconnect joins existing settled teardown after session-data disconnect. DestinationGroup cancellation is also settled cleanup. Synchronous catalog/ref registrations and scoped observer cleanup remain primitive-owned.

The retained session-menu JSX and three manual renderer loaders are subsequent families. Async reads/actions will follow the shared recipes when #179123 lands; that PR and the rc.16 upgrade #179116 are still open at this checkpoint.

Evidence

Check Result
UI typecheck (tsrs) Passed
Navigation-menu tests (Bun) 11 passed after correcting settled handle ordering
Sidebar menu ownership tests (Bun) 6 passed, including provider/client replacement and native reconnect
Session placement tests (Bun) 19 passed
Targeted lint / whitespace Passed
Formatting Passed; final change is formatter-only line wrapping
Production Knip Passed
Independent Codex review through P2 Scoped-clean; no actionable findings
Base/head production build and strict performance Both built; absolute startup cap fails on both. Startup 331,682→331,679 B gzip (−3 B), 8 JS requests, 1 CSS request. Chat 1,494,154→1,494,184 B (+30 B); New Session 1,013,451→1,013,454 B (+3 B). Route and locale caps pass. No startup growth while over budget.
Full CI Will request ci:full for menus/focus

Touched production LOC: 2,494 → 2,528 (+34). Whole-scope LOC: 36,938 → 36,972 (+34). Growth replaces the implicit detached-root lifetime with explicit owner subscription/disposal and read-through projection. Test LOC is unchanged. No screenshots: no markup, style, or intended visual state changes. No Crabbox/Testbox lease.

Refactor-checklist counts in touched production files: controllers 0→0; effects 1→1; render effects, untrack, direct listeners, DOM queries and flush 0→0; getOwner 1→1, runWithOwner 2→1, createRoot 2→1. The retained calls mount the plugin fallback into foreign DOM.

Exact inherited CI failure

Full CI run 39558078495 has one non-aggregate failure: Control UI chat panel layout > opens this dashboard’s chat and details independently without losing either draft in checks-ui-e2e (4/9). It times out at chat-panel-layout.e2e.test.ts:207 waiting for the dashboard header Chat button, before Details or draft-retention interactions.

A single targeted Playwright run on exact PR merge base aeae6d1d79a30036edc275bcfcccbd396d2805d3 reproduced that same named test and assertion (1 failed, 3 skipped, 288.36 s). Main commit f9376e14a2b (#179094), already an ancestor of the base, intentionally removed the duplicate header Chat control for a main Dashboard in favor of Panels. The latest earlier completed schedule 39550194897 predates that change and passed this case; it was not used to claim inherited failure. This is matching-name base evidence, not job-name attribution. All other selected jobs passed or were skipped. Native inherited-failure landing records CI as failed.

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

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 21, 2026 06:51
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T07:11:04.196249Z be85122 Draft marked ready
ℹ️ 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.

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 21, 2026
@steipete
steipete merged commit 5e9c3fb into main Oct 21, 2026
160 of 164 checks passed
@steipete
steipete deleted the solid2/w-s2-comp-a-followup branch October 21, 2026 07:29
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

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. clawsweeper:intake:feature Preliminary submission classification; full source review pending. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant