Skip to content

refactor(ui): use native Solid plugin reload and async state - #179221

Merged
steipete merged 4 commits into
mainfrom
solid2/w-s2-app-lib-plugins
Oct 21, 2026
Merged

steipete merged 4 commits into
mainfrom
solid2/w-s2-app-lib-plugins

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Plugin UI reloads still manage a separate busy flag around an asynchronous mutation. The session dashboard packs its lazy BoardView import and error into one result and uses a retry counter to refetch it.

User Impact

Preserve the existing reload button, disabled pending state, persistent inline failure and retry behavior. The dashboard keeps its existing loading, error and retry UI, including import timing while empty or collapsed. Provider leases, permissions, selected tabs and presentation state retain their existing owners.

Why This Change Was Made

Use a Solid action with a co-written optimistic busy value for reload, while the plugin runtime remains the mutation authority. Derive old-error visibility from pending state so a retry clears the previous error immediately. Use an async memo and native Errored reset for the dashboard module read; remove its packed result and retry counter. Derive retry-error visibility with isPending so a pending retry keeps the previous blank loading presentation.

The new action/optimistic engine initializers require an explicit small runtime chunk. Without it, their eager initialization pulls either the lazy Plugins page or the shared route boot group into startup. The generated boot map and exact stable chunk assignments preserve the Plugins route boundary without regrouping other libraries. Main already isolates the action initializer; this change adds the optimistic lane and pending-read initializers to that same runtime chunk.

View production LOC: 368 → 363 (−5). The chunking configuration adds two initializer cases and a short explanation. No dependency or configuration option added.

Evidence

Check Result
pnpm tsgo:ui Passed on final merged head
Targeted lint/format View and corrected E2E source passed; existing dashboard reactivity warning retained without suppression. Chunk config formatting passed; its earlier separate lint attempt timed out in plugin-SDK declaration preparation before lint ran.
Contributions regression Eight tests passed initially; the one failed retry-error assertion passed after deriving visibility from the optimistic busy value. Only that failed test was rerun.
Dashboard unit file Attempted once with pinned Bun; no assertions before watchdog exit 143. No passing result claimed.
pnpm deadcode:knip View-source run passed; no ignores added. Final corrected-source run also passed
Boot map generation Passed; dynamic entries unchanged
Base/head production builds Passed with supported optional artifact cache disabled after cache-publication stalls
Strict startup check Both fail the existing absolute gzip cap; exact comparison below
Synthetic visual proof Passed in 17.56s under Node for Playwright. Reload pending and synthetic rejection at 1400×900, exact base and head builds. Full images inspected; all data synthetic.
Independent review View conversion, generated map and final retry/test correction independently reviewed P0–P2 scoped-clean
CI Replacement ci:full run 39569225275 completed: 35 jobs passed, including all UI unit/type/lint jobs, both real-Gateway shards and the corrected pane-header case (5309 ms). Its sole failing table-width case exactly matches newest completed scheduled main run 39570916649, confirmed at 09:08 UTC.
Native async retry probe Passed: blank → error → blank while retry pending → loaded; two async read attempts. This verifies primitive behavior, not a full dashboard browser retry.
Startup metric Base a6b339e1c4d6 Head 8d0aa41f4ca
JavaScript gzip 331,677 B 333,096 B
JavaScript raw 996,829 B 999,570 B
JavaScript requests 8 8
CSS gzip 40,439 B 40,439 B
CSS requests 1 1

The 1,419 B gzip increase is the native Solid optimistic and pending-read engine on the merged baseline; it stays in the existing runtime request. Startup remains below the migration's original 374,285 B ceiling. Both revisions exceed the current stricter absolute cap; no budget or baseline is changed. Earlier intermediate builds that accidentally loaded unrelated chunks are not claimed as passing proof.

Solid 2 checklist

Counts cover the two touched production views.

Item Before → after
Conditional intrinsic handler defects 0 → 0
Component lifecycle cleanup 0 → 0; one computation-scoped provider lease cleanup retained
Async reads Packed import result and retry counter → native async memo and Errored reset
Mutations One manual reload flag → one action and one optimistic value
Code splitting BoardView import stays dynamic and starts at dashboard mount; Plugins route remains lazy
State shape createSignal 4 → 2; persistent inline error and presentation writable derivation remain
Handwritten component construction 0 → 0
Throw-only context wrappers 0 → 0
Sibling loading groups needing Reveal 0 → 0
Root/getOwner/runWithOwner 0/0/0 → 0/0/0

Effects 0 → 0; memos 6 → 6. The provider lease remains tied to its reactive resource computation. No parallel runtime store, new authority owner or manual pending/error resource wrapper is added.

Before: plugin reload pending

After: plugin reload pending

Before: synthetic reload error

After: synthetic reload error

CI attribution and correction

The final run’s sole substantive failure is chat-markdown-table-interactions.e2e.test.ts > Control UI Markdown table interactions > contains content-sized tables after restoring a percentage reading width (job 119119403256, assertion at 214:38). The exact name and assertion also fail on completed scheduled main 39563487228, job 119100314952. Native inherited-failure evidence retains the failed gate and verified CI merge tree. The prior chat-panel-layout and CI-planner type failures are absent from the final run and are not part of this exception.

The pane-header failure was different: a Session information hovercard intercepted the test’s fixed pane-relative coordinate. The browser intentionally keeps the card open while hovered, so retrying that coordinate sustained the obstruction. The test now clicks each pane’s composer to exercise its real pointer/focus activation owner and retains all header, active-pane and emphasis assertions. No forced action, synthetic event dispatch, production hovercard change, or suppression was added.

Final CI attribution: replacement head 8d0aa41f4ca has one inherited failure, chat-markdown-table-interactions.e2e.test.ts > contains content-sized tables after restoring a percentage reading width, with the same assertion at 214:38 in newest completed scheduled main run 39570916649. The corrected pane-header case, all types and UI unit shards, both real-Gateway shards, lint, security, and performance passed.

@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 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 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-21T08:56:16.447235Z 8d0aa41 New commits
ℹ️ 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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 21, 2026
@steipete
steipete enabled auto-merge (squash) October 21, 2026 08:00
@steipete
steipete disabled auto-merge October 21, 2026 08:08
@clawsweeper clawsweeper Bot added clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces manual plugin reload and dashboard import state with native Solid primitives and preserves lazy chunk boundaries.

Example: Reload plugin UI fails with “Synthetic reload failure”.

  • Before: The reload button becomes available again and the failure remains visible.
  • After: The same controls and failure remain visible, with Solid managing the pending lifetime.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch has no identified defect; inspected reload visuals support parity, while dashboard browser coverage remains limited.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; paired synthetic browser screenshots demonstrate plugin reload presentation, while dashboard retry evidence is limited to the reported primitive probe.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The area owner's direction is recorded in this maintainer-authored PR, and the implementation reduces manual async state without adding a public capability or competing owner.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed refactor removes manual async bookkeeping while preserving existing owners and controls; no concrete introduced defect was found.

Priority: P3
Reviewed head: 8d0aa41f4ca1bfe519bdbf32aecabd99e7bc969e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show dashboard module rejection and Retry recovery through the rendered dashboard; the reported async probe exercises the primitive only.
Agent review details

How this fits together

Control UI views consume the plugin runtime and board provider, translating reload requests and lazy module results into pending, error, retry, and board presentations.

flowchart LR
  A[Plugin settings] --> B[Solid reload action]
  B --> C[Plugin runtime]
  C --> D[Gateway]
  E[Session dashboard] --> F[Async BoardView import]
  F --> G[Loading and error boundaries]
  G --> H[Board presentation]
Loading

Technical review

Best possible solution:

Retain the focused native-primitive conversion with the existing runtime authority, provider leases, retry presentation, and lazy boundaries.

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

This PR proposes a behavior-preserving refactor rather than a reported upstream failure; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The change follows the pinned Solid contract, removes the superseded state paths, and keeps mutation and provider decisions with existing owners.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 3ffdc1b adds ui/config/control-ui-chunking.ts:40 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 3ffdc1bfccd4; files: ui/config/control-ui-chunking.ts)

PR surface

Source +1, Tests +12. Total +13 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 50 49 +1
Tests 2 15 3 +12
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 65 52 +13

Labels

Label changes:

  • add P3: This is a focused behavior-preserving UI refactor without an established urgent user-facing defect.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • 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 a focused behavior-preserving UI refactor 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.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 21, 2026, 4:49 AM ET / 08:49 UTC.

@steipete
steipete merged commit 0f737e5 into main Oct 21, 2026
125 of 129 checks passed
@steipete
steipete deleted the solid2/w-s2-app-lib-plugins branch October 21, 2026 09:18
@steipete

Copy link
Copy Markdown
Contributor Author

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

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…w#179221)

* refactor(ui): use Solid async state for plugin views

* build(ui): isolate Solid action initializers from route chunks

* fix(ui): preserve retry and pane activation behavior
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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