Skip to content

refactor(ui): simplify plugin and new session ownership - #174946

Merged
steipete merged 2 commits into
mainfrom
solid2/w-idiom4-plugin-session-refs
Oct 17, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-idiom4-plugin-session-refs

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Plugin dashboard selection copied reactive state through an effect, settings presentation duplicated asset disposal already owned by the plugin runtime, and New Session menus searched their own markup to restore focus. Selection now derives from its inputs, the runtime owns settings assets through its abort lifetime, and the mounted view owns only its own disposer. New Session pickers, path inputs, and folder options use owned refs with cleanup.

The Draft and Capabilities modules now use the names of their existing synchronous owners. All callers move together, the old paths are deleted, and the boot manifest is regenerated. No compatibility aliases or new state owners are introduced.

User Impact

Existing focus, cancellation, veto, origin, and authority checks remain. Tags, classes, routes, and selectors are unchanged. No intended appearance change; before/after visual screenshots are not applicable.

Evidence

Check Result
Exact-candidate UI typecheck Passed
New Session runtime 6 tests passed on this isolated candidate
Existing scoped behavior proof Reused 42 passing New Session cases and 9 settings lifetime cases on the same ref/disposal changes
Production builds and strict performance Exact base and candidate passed on the same host with normalized metadata
Startup JS 340,343 → 340,356 B gzip (+13 B); raw JS 1,035,280 → 1,035,273 B (−7 B); 7 → 7 requests
Startup CSS 38,666 B unchanged, 1 → 1 request
New Session boot JS 47 B smaller; requests unchanged
Production Knip Passed
Scoped lint Passed; existing reactivity/style warnings remain
Independent review Fresh isolated review clean through P2
Broad proof ci:full requested for menus, focus, and shared plugin rendering

The 13 B gzip increase is a small compression change while raw startup code decreases. No new eager library or lazy-boundary change is introduced; startup remains below the strict checked budget.

Solid Refactor Checklist

Metric Before After
Production LOC 8334 8332
createEffect 7 6
createRenderEffect 0 0
untrack 3 2
Raw listener matches 15 0
DOM query matches, including generic calls 12 2
Controller patterns 0 0
Hand-built classes 0 0
flush 0 0
Owner capture 4 4

The PR touches 39 logical files, including three file renames. Remaining effects synchronize imperative plugin views; owner capture mounts Solid inside foreign plugin regions. The two remaining DOM queries inspect foreign content rather than markup rendered by the querying owner.

CI Correction

Run 38992065856 found a possibly undefined snapshot access in the dashboard test and an obsolete assertion-safety allowance for draft-place-browser.ts. The test still requires revision 2; it now waits safely for the optional snapshot. The allowance is deleted because the refactor removed the assertion. All 10 dashboard cases pass on the correction; the exact UI-other test-typecheck and assertion-safety ratchet both pass.

The same old run also reported a mock-export violation in src/cli/update-cli/update-command-service-maintenance-native.test-support.ts, outside this diff and still present on main when inspected. The replacement CI run remains authoritative; no failed run is called green.

Final CI attribution

Current-head CI run 38994725052 completed with all UI unit, UI E2E, real-Gateway, typecheck, performance, and security checks passing. It remains failed solely on the unrelated CLI mock-export rule at src/cli/update-cli/update-command-service-maintenance-native.test-support.ts:52. The fixture, checker, and mock baseline are byte-identical between the actual CI baseline f2556399319a and tested merge 83c68c97d0d2. Landing uses the native inherited-failure exception; the failed run is not reported as green.

@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-17T01:47:08.941519Z eb38914 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.

@steipete
steipete enabled auto-merge (squash) October 17, 2026 01:56
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates plugin cleanup, derives dashboard presentation state, and replaces New Session DOM searches with owned references.

Example: A user selects Research and collapses a dashboard before its snapshot advances from revision 1 to revision 2.

  • Before: An effect reconciles the selected tab and expansion state.
  • After: A writable derivation retains Research and the collapsed state within the same dashboard scope.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source change is coherent and the CI correction preserves coverage; supplied behavioral evidence remains harness-based.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor-proof gate; its reported validation exercises New Session and settings harnesses, while inspected media belongs to an earlier port.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No intended user-visible behavior change; duplicated presentation bookkeeping makes focus and plugin lifetimes harder to maintain.
Reason: The maintainer-authored direction removes redundant synchronization and cleanup while preserving synchronous domain ownership.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: the ownership refactor is coherent, the CI correction preserves its assertions, and no actionable defect was found; exact-head CI remains pending.

Priority: P3
Reviewed head: e2312d629410a9847ef0d68b8b811403c9bbd10e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-browser trace demonstrates this PR's dashboard scope replacement, settings retirement, or picker focus; the supplied coverage is harness-based.
Agent review details

How this fits together

Control UI views consume session and plugin owners, render their projections, and release mounted content, listeners, and assets when their respective lifetimes end.

flowchart LR
  A[Gateway snapshots] --> B[Session and plugin owners]
  B --> C[Solid projections]
  C --> D[Dashboard presentation]
  B --> E[New Session views]
  E --> F[Owned DOM references]
  B --> G[Plugin runtime asset cleanup]
  C --> H[Mounted view cleanup]
Loading

Technical review

Best possible solution:

Retain the single-owner refactor and complete the existing exact-head CI gate before landing.

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

This refactor has no standalone bug reproduction; source and supplied tests identify the dashboard-selection, picker-focus, and plugin-cleanup contracts.

Is this the best way to solve the issue?

The implementation consolidates responsibilities at existing owners and migrates internal callers without adding public APIs, configuration, or persisted formats.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -3, Tests +180, Other -1. Total +176 across 39 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 29 297 300 -3
Tests 9 199 19 +180
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 39 496 320 +176

Labels

Label changes:

  • add P3: This is behavior-preserving UI maintenance without an established urgent user-facing defect.
  • 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.

Label justifications:

  • P3: This is behavior-preserving UI maintenance without an established urgent user-facing defect.
  • 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-17T01:58:28.294Z sha eb38914 :: needs maintainer review before merge. :: none

Reviewed October 16, 2026, 10:29 PM ET / October 17, 2026, 02:29 UTC (Revision 2).

@steipete
steipete disabled auto-merge October 17, 2026 02:05
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The CI corrections are pushed at e2312d6. The dashboard still asserts revision 2 while waiting safely for its optional snapshot, and the obsolete assertion allowance is removed. All 10 dashboard tests, the UI-other test-typecheck, and the assertion-safety ratchet pass. Production behavior and the prior build/performance proof are unchanged.

@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. labels Oct 17, 2026
@steipete
steipete merged commit a5959e0 into main Oct 17, 2026
110 of 116 checks passed
@steipete
steipete deleted the solid2/w-idiom4-plugin-session-refs branch October 17, 2026 02:48
@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. 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