Skip to content

refactor(ui): derive view lifetimes and retire unused controllers - #174263

Merged
steipete merged 3 commits into
mainfrom
solid2/w-idiom2-lib-lifetimes
Oct 16, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-idiom2-lib-lifetimes

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

New Session kept source identity synchronized through three effects even though the values are derived. The shell also retained a forwarding requestUpdate alias, and the i18n barrel exported an unused legacy controller.

Own projections in source-keyed memos, so replacement disposes the old subscription and parking still disconnects live reads. Delete the dead i18n class/tests, call the shell’s existing invalidate operation directly, and name layout disposal explicitly. Capture the worktree-name input by ref, use the existing listener helper for picker events, compose classes through Solid’s native array form, and bind the optional custom-model input by ref. Synchronous domain owners and native DOM integrations keep their authority.

Evidence

Proof Result
UI typecheck and targeted lint Pass on final production source
Gateway test-type shard + retained-pane integration Pass after updating the directly coupled fixture to invalidate
New Session model, welcome, checkout 29 cases pass after correcting source memo identity; no full local suites
UI build Pass
Production Knip Pass on final head
Independent review Initial patch and final ref/comment delta: no actionable P0–P2 findings
Same-machine base/head strict performance Pass against 0869909; normalized startup 339,348 B gzip, 1 CSS request
Final UI build + strict performance Pass; startup 339,576 B gzip, 7 JS requests, 1 CSS request; normal build identity differs from normalized comparison

Targeted lint has no errors; its existing Popover callback warning is unchanged. No visual design, CSS, tag, selector, route, or dependency changes. Existing tests cover model updates, source replacement, roster parking, and checkout validation. Full UI integration belongs to ci:full; no local E2E/parity runs.

Touched production metric Before After
LOC 6,552 6,535
Controller-pattern references 17 2
createEffect 13 10
createRenderEffect 1 1
untrack 25 22
addEventListener 14 12
DOM queries, including generic calls 36 34
Hand-built class strings 2 0
flush 0 0
getOwner/runWithOwner 2 2

Production code falls by 17 lines; dead test code falls by 63 lines. The retained toast and board bridge classes own synchronous deadlines and transport admission, respectively. No release-note behavior change.

The wider assigned audit found no remaining pure copied-state effects outside the composer work in #174226. Retained effects synchronize native geometry/focus, lazy loads, transport requests, or readiness receipts. Scope-upgrade and GitHub-publication owners remain synchronous domain authorities. The shared ControllerHost/SubscriptionsController adapter still serves ChatPaneBase and ten files of consumers, including active #174247 and #174035; retiring it here would duplicate those owners or cross their ongoing cutovers. DOM queries left in native menus, hovercards, branch suggestions, and page/palette popovers follow those islands’ focus and ordering contracts.

CI repair: run 38911020547 caught one directly coupled Gateway fixture still naming the removed requestUpdate method. The fixture now uses invalidate; the exact Gateway type shard and existing retained-pane integration test pass. No production change or new test was needed. The same run also hit an unrelated Plugins CSS line-clamp assertion. The replacement head received fresh full CI as described below.

Full replacement-head run 38914561541 completed: 71 jobs terminal. Both real-Gateway shards, all UI unit suites, the repaired Gateway type shard, and every other selected check passed except Activity recap and screenshot polish > loads remote previews during refresh at 390 px and the downstream gate. The test times out waiting for four image elements to report complete, before the refresh interaction. Activity, image presentation/admission, CSS and fixture source inputs are byte-identical to the tested main parent; this PR does not change image completion. The precise browser delay remains unknown.

The exact Activity case passes in completed scheduled main run 38908699969. The latest scheduled main run 38916811035 was queued at the comparison read. This is coordinator-authorized source-unrelated attribution, not a matching-main-failure claim. Native admin evidence binds tested merge e40cc11eb3159571d57f1907177162003a83b306, ordered parents, source hashes, exact job logs, completed job accounting and security-fast.

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

clawsweeper Bot commented Oct 16, 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.

@steipete
steipete marked this pull request as ready for review October 16, 2026 13:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T13:54:32.559220Z 73e003f 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 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 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR derives New Session subscription lifetimes through Solid memos, removes unused controller code, and simplifies native DOM bindings.

Example: New Session switches from the main agent's session roster to another agent's roster.

  • Before: An effect replaces the existing projection's source.
  • After: A source-keyed memo creates the replacement projection and disposes the previous subscription, preserving the displayed recents.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused cleanup with no identified patch defect; behavioral evidence is primarily mounted tests, and the failed core typecheck remains unclassified.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored internal refactor is outside the ordinary contributor-proof gate; its focused mounted-test results support lifecycle preservation, while the inspected downloaded screenshots belong to the separate composer-suggestions PR and do not prove this change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Users should retain responsive model controls, current recents, and working checkout interactions as legacy lifecycle adapters are retired.
Reason: Maintainer-authored direction is established, and the patch reduces obsolete machinery while retaining synchronous domain authority and existing interaction contracts.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored refactor removes obsolete lifecycle plumbing while preserving existing state owners; no actionable patch defect was found.

Priority: P3
Reviewed head: 73e003fa5a963a178018ee46c2b02910f9da83a0

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No supplied shipped-UI run demonstrates source replacement and parking/reveal after this refactor; existing preservation tests cover those contracts in process.
Agent review details

How this fits together

The Control UI consumes synchronous application owners through reactive projections, which supply model controls and welcome recents while native overlays own picker interaction.

flowchart LR
  A[Application owners] --> B[Source keyed memos]
  B --> C[Reactive projections]
  C --> D[New Session views]
  D --> E[Native picker overlays]
  E --> A
Loading

Technical review

Best possible solution:

Retain this focused cleanup with existing owner, parking, native-event, and localization contracts intact.

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

This is a behavior-preserving refactor rather than a defect report; source and existing mounted tests establish the contracts being retained.

Is this the best way to solve the issue?

The approach fits the existing projection owner and removes superseded plumbing without introducing another state authority.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -17, Tests -63. Total -80 across 28 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 25 104 121 -17
Tests 3 7 70 -63
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 28 111 191 -80

Review metrics

Metric Value Why it matters
Production versus test changes Production +104/-121; tests/support +7/-70 Production shrinks by 17 lines, and obsolete controller tests disappear with their unused implementation.

Labels

Label changes:

  • add P3: Internal lifecycle cleanup preserves user-facing behavior and addresses no established urgent regression.
  • 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: Internal lifecycle cleanup preserves user-facing behavior and addresses no established urgent regression.
  • 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.

Reviewed October 16, 2026, 10:06 AM ET / 14:06 UTC.

@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Oct 16, 2026
steipete added a commit that referenced this pull request Oct 16, 2026
Main hourly 38908699969 exposed a same-name auth wrapper and dead exports.
The transport redactor became unused after the intentional content-free
logging cut in d8faf88; the later cancellation fix is preserved.

Keep the public SDK auth-patch name and narrow signature. Distinguish the
internal normalizer and migrate its callers. Retire the unused redactor
and Crabbox case builder, make local Ollama/Nostr/Talk helpers private,
and link the existing oMLX guide from the provider index.

Proof: 102 owner cases pass in 247.39s and 532 shared-helper consumer cases
pass in 445.57s, both via pnpm test with --maxWorkers=1. Owning typechecks,
architecture, source contracts, targeted lint/format and P2 review pass.
Knip full-tree and scripts are clean; production has only I18nController,
covered by active PR #174263. The labeler fix landed via #174277.
No ignores, baseline increases, assertion changes or timeout changes.
@steipete
steipete merged commit 382de49 into main Oct 16, 2026
136 of 139 checks passed
@steipete
steipete deleted the solid2/w-idiom2-lib-lifetimes branch October 16, 2026 14:58
@steipete

Copy link
Copy Markdown
Contributor Author

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

steipete added a commit that referenced this pull request Oct 16, 2026
Hourly 38916811035 reported the route inventories as unused, but Vite
loads them through runnerImport and embeds them in the offline shell.
Keep that runtime contract and model the actual named property reads in
Knip through its existing MJS compiler. Preserve Vite discovery and
TypeScript declaration-to-source mapping; add no ignores.

Make four remaining declarations private after #174279 and #174260
removed external logging consumers and #174255 consolidated fixtures.
Their internal callers and behavior remain intact. I18nController was
already removed by #174263.

Proof: all three deadcode export scans have zero findings; the original
baseline had six. The guard passes with pnpm test
test/scripts/check-deadcode-exports.test.ts --maxWorkers=1 (5.67s).
Existing route/build/cache tests and 148 owner/importer cases pass
(199.76s for the owner batch). Owning typechecks, typed lint, boundary
lint, and formatting pass. Negative control and P2 review recorded in
PR evidence.

P2 autoreview is scoped-clean with no actionable findings.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
Main hourly 38908699969 exposed a same-name auth wrapper and dead exports.
The transport redactor became unused after the intentional content-free
logging cut in 36f75e7; the later cancellation fix is preserved.

Keep the public SDK auth-patch name and narrow signature. Distinguish the
internal normalizer and migrate its callers. Retire the unused redactor
and Crabbox case builder, make local Ollama/Nostr/Talk helpers private,
and link the existing oMLX guide from the provider index.

Proof: 102 owner cases pass in 247.39s and 532 shared-helper consumer cases
pass in 445.57s, both via pnpm test with --maxWorkers=1. Owning typechecks,
architecture, source contracts, targeted lint/format and P2 review pass.
Knip full-tree and scripts are clean; production has only I18nController,
covered by active PR openclaw#174263. The labeler fix landed via openclaw#174277.
No ignores, baseline increases, assertion changes or timeout changes.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…enclaw#174263)

* refactor(ui): derive library view lifetimes in Solid

* refactor(ui): finish native boundary cleanup

* test(ui): update Gateway fixture to shell invalidation API
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…w#174358)

Hourly 38916811035 reported the route inventories as unused, but Vite
loads them through runnerImport and embeds them in the offline shell.
Keep that runtime contract and model the actual named property reads in
Knip through its existing MJS compiler. Preserve Vite discovery and
TypeScript declaration-to-source mapping; add no ignores.

Make four remaining declarations private after openclaw#174279 and openclaw#174260
removed external logging consumers and openclaw#174255 consolidated fixtures.
Their internal callers and behavior remain intact. I18nController was
already removed by openclaw#174263.

Proof: all three deadcode export scans have zero findings; the original
baseline had six. The guard passes with pnpm test
test/scripts/check-deadcode-exports.test.ts --maxWorkers=1 (5.67s).
Existing route/build/cache tests and 148 owner/importer cases pass
(199.76s for the owner batch). Owning typechecks, typed lint, boundary
lint, and formatting pass. Negative control and P2 review recorded in
PR evidence.

P2 autoreview is scoped-clean with no actionable findings.
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. gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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