Skip to content

refactor(ui): scope MCP operation error feedback - #180635

Merged
steipete merged 1 commit into
mainfrom
solid2/w-s2-recipe-audit-a-mcp
Oct 22, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-s2-recipe-audit-a-mcp

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

MCP app onboarding, settings mutations, and context removal copied failed operations into renderer-local error strings. Those strings could outlive their target and did not use the Solid 2 outcome recipe.

User Impact

Errors still appear beside the existing controls, edited settings and attached context. A retry clears its previous failure; moving to another target retires the old feedback. The Gateway and existing plain owners continue to decide admission, execution and reconciliation.

Why This Change Was Made

Each renderer observes an admitted promise in a narrow, keyed Errored slot. Only the alert slot changes on a new attempt, preserving form and app content. Optimistic busy state remains independent. Synchronous disconnected/mount failures keep their user-facing text. Onboarding navigation stays after action settlement so it sees the current destination.

Evidence

Proof Result
Three directly changed test files Initial run: 27/33 passed; the 6 failures were fixed and the 8 affected cases passed in targeted reruns. Unchanged passing cases were not rerun
UI typecheck / targeted lint / formatting / diff check Passed; the existing context-strip subscription warning remains
Base/head production builds and strict performance Passed; startup 316,757 → 316,776 B gzip (+19 B, within 64 B build variance); one CSS request
Chat / New Session boot 1,440,550 → 1,440,769 B / 1,016,774 → 1,016,938 B; both under cap
Production Knip Same two unused heartbeat files as base; no new findings or ignores. Base additionally reports the existing eslint dependency
Independent review Scoped clean at P0–P2 with full source and test context
Synthetic Chromium proof Byte-identical before/after captures; three failures visible, draft and context retained, controls re-enabled, exactly five RPCs per side, no page errors
Full UI/browser/real-Gateway CI Completed with ci:full; two attributed baseline failures, all other jobs passed or skipped

Production LOC: 967 → 1,042 (+75); tests +84 lines. Renderer error signals: 3 → 0; scoped outcome slots: 0 → 3; Errored: 1 → 4. Actions (3), optimistic flags (2), optimistic store (1), Loading boundaries (3), effects (1) and untrack calls (2) are unchanged. The added lines bind errors to the admitted target and keep their retry boundaries separate from retained controls. No dependencies, domain owners or eager imports were added.

Before / after

Both captures use synthetic app data, actual components and production CSS. Failed onboarding, settings save and context removal preserve the same UI.

Before: retained MCP content with operation errors

After: scoped error boundaries preserve the same content

Exact-head CI attribution

CI run 39784492579 completed on f152336ac8c59f37486814aa9abadb7c9d5e821d. All 62 other jobs passed or were skipped, including security-fast; two inherited roots remain failed and feed the CI gate:

  • checks-ui-e2e (5/9): Control UI Workboard routing > routes, pins, persists, and normalizes Workboard boards waits for the old Workboard heading at line 156. Main changed it to All boards in fix(workboard): title the unfiltered Workboard page as All boards #174430. The exact case reproduces on clean protected main d5ce64b7e2d2; its test, heading owner and English strings are identical to this run’s base 8f195e6a4239.
  • check-test-types-core-4: sessions-patch.test.ts lines 500, 507 and 513 report TS2353 because patch is absent from PatchFixture. The same three diagnostics reproduce on clean protected main; failed source and core typecheck inputs match this run’s base.

The native inherited-failure recovery preserves these failed results and their baseline evidence. No CI retry or passing-CI claim is used.

Observe admitted onboarding, settings, and context-removal outcomes through narrow Solid error boundaries. Retain controls and drafts, clear errors on retry or target retirement, and keep owner admission and reconciliation unchanged.
@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

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-22T13:10:17.227141Z f152336 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 22, 2026 13:16
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@steipete
steipete disabled auto-merge October 22, 2026 13:28
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces renderer-local MCP error strings with scoped Solid error boundaries for onboarding, settings operations, and context removal.

Example: Context removal fails in session agent:main:one, then the user opens agent:main:two.

  • Before: The previous removal error can remain beside the new session's context.
  • After: The error slot hides feedback belonging to the previous session.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful scoped feedback work with inspected component visuals, but a concrete concurrent-removal regression requires repair.
Proof confidence 🦐 gold shrimp (3/6) The supplied maintainer-authored classification exempts ordinary contributor proof gating; inspected synthetic Chromium screenshots establish retained failure presentation, while retry and target retirement are supported by component tests rather than shipped-entry-point evidence.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An MCP operation's error can remain visible after the user changes its target.
Reason: The maintainer-directed change improves feedback ownership while retaining existing controls and Gateway admission.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: the scoped feedback change is useful and maintainer-directed, but concurrent context removals can now silently lose a failure.

Priority: P2
Reviewed head: f152336ac8c59f37486814aa9abadb7c9d5e821d

Before merge

  • Preserve failures from independently pending context removals (P2) - The strip permits concurrent removals from different view IDs because pending controls are keyed by view ID, but this assignment replaces the only observed outcome. Attach context from views A and B, start removing A, then remove B while A is pending. If B succeeds and A subsequently rejects, the boundary still observes B's resolved promise; A's rejection is consumed by the catches and no alert appears, although A's context remains. The previous catch published that failure. Preserve independently pending outcomes within the current scope and add a two-view regression covering this settlement order.

Findings

  • [P2] Preserve failures from independently pending context removals — ui/src/components/solid/mcp-app-context-strip.tsx:161-164

Tests

  • Missing end-to-end proof: The supplied captures do not exercise retry or target replacement through the shipped Control UI, and red-on-base execution of the new regressions is not shown.
Agent review details

How this fits together

Control UI components admit MCP operations through existing Gateway clients and owners, then render their outcomes beside retained controls, settings drafts, and attached context.

flowchart LR
  A[User controls] --> B[Existing operation admission]
  B --> C[Gateway MCP requests]
  C --> D[Owner reconciliation]
  C --> E[Scoped outcome receipts]
  E --> F[Solid error slots]
  D --> G[Retained app content]
Loading

Technical review

Best possible solution:

Keep scoped error boundaries while preserving an observable outcome for each independently removable app view.

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

Source establishes both current-main stale feedback and the introduced concurrent-removal failure path; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

Narrow keyed boundaries fit the existing ownership model, but a single removal receipt cannot represent the independently admitted operations already supported by the strip.

Full review comments:

  • [P2] Preserve failures from independently pending context removals — ui/src/components/solid/mcp-app-context-strip.tsx:161-164
    The strip permits concurrent removals from different view IDs because pending controls are keyed by view ID, but this assignment replaces the only observed outcome. Attach context from views A and B, start removing A, then remove B while A is pending. If B succeeds and A subsequently rejects, the boundary still observes B's resolved promise; A's rejection is consumed by the catches and no alert appears, although A's context remains. The previous catch published that failure. Preserve independently pending outcomes within the current scope and add a two-view regression covering this settlement order.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/components/mcp-app-context-strip.test.tsx --maxWorkers=1
  • pnpm --dir ui test src/components/mcp-app-catalog.test.ts src/components/mcp-app-panel-settings.test.tsx --maxWorkers=1
  • pnpm tsgo:ui
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 76b012f adds ui/src/components/solid/mcp-app-context-strip.tsx:129 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 76b012fc77c6; files: ui/src/components/solid/mcp-app-context-strip.tsx)

PR surface

Source +75, Tests +84. Total +159 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 135 60 +75
Tests 3 88 4 +84
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 223 64 +159

Review metrics

Metric Value Why it matters
Production versus test growth Production net +75 lines; tests net +84 lines Scoped receipts and narrow boundaries explain the production growth; the added assertions protect retry clearing, target replacement, and retained controls.

Labels

Label changes:

  • add P2: The feedback improvement has limited blast radius, and the introduced defect suppresses a context-removal error without corrupting the retained context.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The feedback improvement has limited blast radius, and the introduced defect suppresses a context-removal error without corrupting the retained context.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • 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, 9:28 AM ET / 13:28 UTC.

@steipete
steipete merged commit bf8bcb4 into main Oct 22, 2026
110 of 115 checks passed
@steipete
steipete deleted the solid2/w-s2-recipe-audit-a-mcp branch October 22, 2026 13:39
@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 23, 2026
Observe admitted onboarding, settings, and context-removal outcomes through narrow Solid error boundaries. Retain controls and drafts, clear errors on retry or target retirement, and keep owner admission and reconciliation unchanged.
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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant