Skip to content

refactor(ui): use native async Debug boundaries - #180409

Merged
steipete merged 2 commits into
mainfrom
solid2/w-s2-debug-current
Oct 22, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-s2-debug-current

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Solid 2 checklist

Counts cover the two touched production files against official main 955669d69147.

Item Before → after
1. Conditional intrinsic handlers 0 → 0
2. Lifecycle component onCleanup 0 → 0; onSettled 4 → 4
3. Async reads SectionState record 1 → 0; async memo call sites 0 → 2; Loading / Errored 1 → 3 each
4. Mutations retry action / createOptimistic 0 → 1 each; import-loaded flag 1 → 0
5. Code splitting lazy 1 → 1; the existing deferred content import remains deferred
6. Structured state stores 2 → 2; immutable object/array signals 0 → 0
7. JSX manual createComponent 0 → 0
8. Context throw-only wrappers 0 → 0; optional bridge-context consumers stay unchanged
9. Sibling loading four useful sections remain independent; Reveal 0 → 0 so pending active runs do not hold vitals or events
10. Owner escapes createRoot / getOwner / runWithOwner 0 → 0

What Problem This Solves

The Debug overlay mirrored descriptor reads into manual loading/ready/error records. It now consumes the admitted descriptor promises through Solid async memos and independent loading/error boundaries. The plain polling owner still controls request admission, permissions, cancellation, connection epochs, and polling cadence. Reconnects hide retired samples; ordinary refreshes retain settled content and the 90-sample history store.

The lazy import remains behind the existing overlay boundary. Its retry uses an optimistic action for the loading affordance while preserving stale-chunk recovery, persisted replay, and dismissal cancellation.

Supersedes the now-closed #179755. Its retained native workflow is pinned to state schema 30, while shared landing state uses schema 31. This replacement preserves the reviewed three-file contribution and uses the current native workflow; no binding or shared state was changed.

Evidence

Proof Result
UI typecheck pnpm tsgo:ui passed on 9354dfc3c178
Changed overlay tests 9/9 passed, one file, --maxWorkers=1, pinned Bun
Full CI Run 39740900093, attempt 2 passed; all 14 UI jobs plus dependency/security gates passed
Lint / controller guard Passed for the three files; guard compared with 955669d69147
Independent review P0–P2 scoped-clean; final changes after review are formatting only
Production Knip Identical 13 unused heartbeat files on exact base and head; no UI files
Paired production builds / strict performance Builds passed on both sources; strict base/head/paired checks all passed
Plugin input equality All seven canonical browser plugins rebuilt independently; 29 consumed package files and 45 emitted plugin files byte-identical
Synthetic production captures Expanded pending, compact pending, expanded ready; live event and held-sibling polling assertions
Surface Base gzip JS Head gzip JS Delta
Startup 316,652 B 316,666 B +14 B
Chat 1,439,730 B 1,439,738 B +8 B
New session 1,016,596 B 1,016,628 B +32 B

All differences are below the 64 B build-variance allowance. Startup stays at 7 JS requests and 1 CSS request; CSS bytes and all request counts are unchanged. Same machine, Node 24.22.1, pnpm 12.15.0, fixed build timestamp/options, and compile cache disabled on both sides.

Production LOC: 461 → 517 (+56); the new section/compact fallbacks preserve headings, accessible loading state, and existing unavailable presentation. Tests add 28 lines. Total contribution: 3 files, +219/−135. No dependency changes.

The focused production capture uses Node because it launches Playwright; unit tests use the pinned Bun fork. Existing stale-chunk recovery tests passed on the earlier head with identical retry code; full current-head UI coverage passed through ci:full.

The first full CI attempt had one timeout in Details → View all opening Files. The exact named case passed once on both the merge base and this head, with the original test and timeout unchanged; one supported failed-job rerun then passed. The original failure is retained as attempt 1, not classified as inherited. The targeted browser replay used Node because it launches Playwright.

Screenshots

All six complete frames were inspected and contain only synthetic fixture data.

State Before After
Expanded loading Before: Expanded loading After: Expanded loading
Compact loading Before: Compact loading After: Compact loading
Expanded ready Before: Expanded ready After: Expanded ready

Use lazy, Loading, and Errored for System busyness imports and independent section presentation while retaining request authority, cancellation, replay, and polling history. Cover both initial and settled polling independence, including deferred status samples while active-run data stays pending.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 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 22, 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-22T07:39:06.498077Z 9354dfc 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces manual Debug readiness records with independent Solid async boundaries and optimistic retry presentation.

Example: An active-run refresh stays pending while CPU samples advance from 0.10 to 0.40 cores.

  • Before: Manual section records keep CPU updates independent.
  • After: Solid boundaries preserve independent CPU updates and all four history samples.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused native-boundary refactor with inspected production UI proof, meaningful behavioral coverage, and successful exact-head gates.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Production-browser screenshots show the changed Debug loading paths in expanded and compact modes; supplied browser results cover held-sibling polling, live events, and retry dismissal through the existing UI entry point.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Users need live diagnostics to remain independent during slow reads and to preserve loading, retry, and reconnect behavior.
Reason: The maintainer-authored direction follows the established Solid migration recipe while retaining the existing user contract.

Merge readiness

✅ Ready for maintainer review

This PR is ready for normal landing consideration: no actionable defects were found, and both earlier blockers are resolved.

Priority: P3
Reviewed head: 9354dfc3c1780c6b45010d9cf260901f95588c52

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI Debug overlay reads Gateway diagnostics through existing polling owners and renders expanded sections or a compact live widget.

flowchart LR
  A[Gateway diagnostics] --> B[Polling and connection owner]
  B --> C[Admitted descriptor promises]
  C --> D[Solid async boundaries]
  D --> E[Expanded sections]
  D --> F[Compact widget]
Loading

Technical review

Best possible solution:

Adopt the native presentation boundaries while retaining the existing polling, connection, and recovery owners.

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

This is a refactor rather than a reported bug; supplied production-browser captures and focused tests exercise the preserved behavior.

Is this the best way to solve the issue?

The change follows the repository's admitted-promise recipe, removes the manual readiness record, and preserves independent sections without unnecessary replacement machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Descriptor readiness and polling presentation keeps the original intent (d64ce70: The Solid migration preserved independent diagnostics, cancellation, and connection lifetimes; subsequent ownership work used a keyed section store.)
  • History and lifecycle receipts keeps the original intent (841b90f: The preceding lifecycle refactor retained Debug's history store and deferred async readiness conversion to this focused successor.)
  • Lazy import and recovery presentation changes intended behavior with a stated reason (2a5eb68: Native lazy loading retained deferred imports, warm reopen behavior, and synchronous dismissal authority; this PR explains replacing the remaining loaded flag with lazy-owned readiness.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ca13046 adds ui/src/pages/debug/debug-overlay-content.tsx:79 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ca130462b6c5; files: ui/src/pages/debug/debug-overlay-content.tsx)

PR surface

Source +56, Tests +28. Total +84 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 191 135 +56
Tests 1 28 0 +28
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 219 135 +84

Review metrics

Metric Value Why it matters
Production versus test growth Production +56 lines; tests +28 lines Growth supplies independent pending/error frames, shared status readiness, and retry presentation without adding a competing domain owner.

Root-cause cluster

Relationship: canonical
Canonical: #180409
Summary: This PR is the active replacement for the closed submission with the same reviewed head.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, 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 a focused behavior-preserving UI refactor with no demonstrated urgent user-facing failure.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-22T07:49:44.384Z sha 9354dfc :: needs changes before merge. :: none

Reviewed October 22, 2026, 4:22 AM ET / 08:22 UTC (Revision 2).

@steipete

Copy link
Copy Markdown
Contributor Author

The superseded duplicate-head PR #179755 is closed. Full CI run 39740900093 attempt 2 and the dependency/security gates now pass. The initial Details timeout, both exact targeted replays, and the single supported retry are documented in the updated evidence section. No source changed.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 22, 2026
@steipete
steipete merged commit cfeafed into main Oct 22, 2026
258 of 263 checks passed
@steipete
steipete deleted the solid2/w-s2-debug-current branch October 22, 2026 08:24
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
Use lazy, Loading, and Errored for System busyness imports and independent section presentation while retaining request authority, cancellation, replay, and polling history. Cover both initial and settled polling independence, including deferred status samples while active-run data stays pending.
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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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