Skip to content

fix(ui): keep widget errors scoped to their action target - #180751

Merged
steipete merged 3 commits into
mainfrom
solid2/w-s2-widget-error-receipts-ready
Oct 22, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-s2-widget-error-receipts-ready

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A failed dashboard-widget command can publish its error into a replacement widget. Widget action feedback also keeps separate mutable error flags after the Solid 2 migration.

User Impact

Widget failures remain attached to their action target. Pin and dashboard controls retain their identity, busy feedback, retry behavior, and existing error copy.

Why This Change Was Made

Retain rejected completion promises and render their failures through narrow Solid error boundaries. Pin uses a boolean-only boundary for its native title; its optimistic label remains outside that boundary. Dashboard cells keep their existing synchronous admission and manual pending state because observing a pending receipt holds busy updates across their shared bridge roots. Only settled failures enter the cell's error slot, after checking its current widget binding.

Evidence

Proof Result
Widget-card tests 24 passed, including pending/retry labels, stable identity, and one toast per failure
Board MCP App cell tests 21 passed, including held retry, stable controls, and late rejection after widget replacement
Production UI typecheck and targeted lint Passed
Chat test-type leaf Passed on replacement head; boolean toast-spy return repaired
Production UI build Passed
Strict performance comparison Passed; no violations
Production Knip Passed on integrated head 0a82b0c3d130b3e8bfb61db23f7ad20f9a775882 (2m 14.9s); main removed the two previously reported unused files
Independent review No actionable P0–P2 findings
Visual proof Four synthetic screenshots inspected by the author and coordinator; no browser errors. Pending and failure before/after pairs are byte-identical.
State Before After
Pending pin and dashboard action Pending widget actions before Pending widget actions after
Failed pin and dashboard action Failed widget actions before Failed widget actions after

The measured pre-integration comparison (bbdbd1c3a28955978fe1dbfe9c7477e33a292993 → eaf20cbce12e810f8d208a9c138f08baa9ffd37a, whose four patch files are unchanged on the integrated head) has startup JavaScript 317,335 → 317,331 B gzip; startup CSS remains one request at 40,939 B. Chat boot is 1,440,302 → 1,440,312 B and new-chat boot is 1,017,375 → 1,017,377 B, both within the 64 B build-variance allowance. Lazy boundaries are unchanged.

Production LOC: 768 → 810 (+42). Test LOC: 1,187 → 1,255 (+68). The production growth replaces two mutable error copies with promise receipts and narrow error slots; no domain owner, RPC, dependency, or startup import is added.

Recipe and refactor counts for the two changed production files
Pattern Before → after Accepted exception
Mutable local action-error copies 2 → 0 Existing body-render recovery receipt is unchanged
Rejected action outcomes read by error boundaries 0 → 2 Pin needs a low-level boolean boundary for a native attribute
Co-written optimistic saving flags 1 → 1 Board keeps one manual pending flag for the observed shared-root hold behavior
Optimistic values/writes 2 → 2 Saving and pinned state
Quiet reconciliation refresh 1 → 1 The pin's owner already settles the authoritative snapshot
affects, isPending, latest, Solid Loading on, Reveal 0 → 0 Board's local component named Loading is not Solid's boundary
Async outcome memos / loadingValue 0 → 2 / 0 → 2 Error observation must not hold the busy affordance
Effects / component cleanup 2 → 2 / 2 → 2 Existing imperative integrations unchanged
Outside-hold reads 0 → 0 No new pending read outside a loading boundary

The initial Board test run used two updateComplete ticks and missed the new asynchronous error read. The final test waits for the observable error with waitForSolid; immediate busy, duplicate-admission, retry-clear, identity, and stale-binding assertions remain intact.

The first full CI run exposed a test-only TypeScript mismatch: the new toast spy returned void while showToast returns boolean. Commit 743b0f63fa37dbc009ef8dbf7af7c11e06ee17fb fixes that return. The exact chat test-type leaf passes, and the isolated repair review found no actionable issues. Production and screenshot inputs are unchanged. Replacement full CI run 39813450564 passed type checks but failed two assertions:

  • Control UI Details panel navigation > opens Files from View all and dismisses Details in Chat and Dashboard: waiting for the workspace side panel after View all timed out. The exact case passed locally on retained earlier main 48b7b4e6c2836891339d977bc939ce651946d891 (3.007 s) and this PR's prior head 743b0f63fa37dbc009ef8dbf7af7c11e06ee17fb (2.916 s). Main's focused fixture repair #180699, commit 30a24bee8576b47b0d01c441ceafd509b8660e9f, waits for the visible conversation transcript before opening Details; it passed full CI. This branch merges main to include that readiness correction.
  • Delegated task PRs through a real Gateway > shows three persisted descendant PRs while keeping the parent branch unpublished: persisted receipts lacked nested pullRequest enrichment after an acknowledged foreground subscription. The exact case passed locally on retained earlier main 48b7b4e6c2836891339d977bc939ce651946d891 (93.362 s). Its CI cause remains unexplained.

These passes are diagnostic; neither failure is classified as inherited. No assertion, timeout, or retry was weakened. The merge integrates d2c70ddbf19fc201bbdd4c4c9373cb03ab4d1324 without changing this PR's four-file patch or dependencies. Prior production, focused unit, performance, screenshot, and independent review evidence is reused for that identical patch. Fresh full CI 39819301112 on integrated head 0a82b0c3d130b3e8bfb61db23f7ad20f9a775882 completed successfully, including all Control UI unit/E2E and real-Gateway shards. No inherited-failure or admin exception is needed for recovery of the cancelled auto-merge request. Production Knip was rerun because its previous failure inputs changed; it passes.

@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 🔄 Running since 2026-10-22T17:03:31.075340Z 0a82b0c 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.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 15:59
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. 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 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 scopes dashboard action failures to their original widget binding and renders widget errors through narrow Solid boundaries.

Example: A removal starts for widget alpha, its instance changes to replacement-instance, and the old removal rejects.

  • Before: The replacement widget displays the old removal failure.
  • After: The binding check discards the obsolete failure and restores usable controls.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch has no identified correctness or security finding; evidence for the central asynchronous sequence remains at the component boundary.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected synthetic screenshots show preserved pending/failure appearance, while the stale-target sequence is covered only by component-test evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A replacement dashboard widget can display a failure from an operation started against its predecessor.
Reason: The change restores target-scoped feedback, follows the documented retry/reset contract, and has owner direction through maintainer authorship.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a current widget-feedback bug, preserves established interaction contracts, and has no concrete introduced defect identified.

Priority: P2
Reviewed head: eaf20cbce12e810f8d208a9c138f08baa9ffd37a

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The screenshots do not show a held action rejecting after widget replacement, and a red-on-base regression result is not supplied.
Agent review details

How this fits together

Chat pin buttons and dashboard cells invoke existing board operations; completion promises feed local feedback while board providers retain mutation authority and authoritative snapshots.

flowchart TD
  A[Widget controls] --> B[Existing board operations]
  B --> C[Completion promise]
  C --> D[Current widget binding check]
  D --> E[Narrow error boundary]
  B --> F[Board snapshot owner]
  F --> A
Loading

Technical review

Best possible solution:

Keep feedback with the existing widget binding and observe rejected completions in narrow presentation boundaries without changing board mutation ownership.

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

Current main permits a pending widget operation to reject after its binding changes and publish into the successor; the added component regression exercises that sequence, but no reproduction was run during this read-only review.

Is this the best way to solve the issue?

The repair uses the existing binding owner, preserves its reset semantics, and follows the repository's local-error recipe without adding another mutation path or domain owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit d48d36d adds ui/src/components/board/board-widget-cell.solid.tsx:67 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d48d36d7c205; files: ui/src/components/board/board-widget-cell.solid.tsx)

PR surface

Source +42, Tests +68. Total +110 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 87 45 +42
Tests 2 72 4 +68
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 159 49 +110

Review metrics

Metric Value Why it matters
Production versus test growth Production +42 LOC; tests +68 LOC The growth replaces copied error state with completion receipts and narrow boundaries, with focused retry, identity, stale-binding, and notification coverage.

Labels

Label changes:

  • add P2: The bug misattributes local widget failures but does not change the underlying write or prevent ordinary recovery.
  • 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:

  • P2: The bug misattributes local widget failures but does not change the underlying write or prevent ordinary recovery.
  • 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 22, 2026, 12:10 PM ET / 16:10 UTC.

@steipete
steipete disabled auto-merge October 22, 2026 16:21
@steipete
steipete merged commit d8ba66d into main Oct 22, 2026
105 checks passed
@steipete
steipete deleted the solid2/w-s2-widget-error-receipts-ready branch October 22, 2026 17:36
@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
…80751)

* fix(ui): route widget action failures through Solid boundaries

* test(ui): match widget toast spy return type
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. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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