Skip to content

refactor(ui): use Solid readiness for MCP app settings - #179906

Merged
steipete merged 2 commits into
mainfrom
solid2/w-s2-mcp-panel-settings
Oct 22, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-s2-mcp-panel-settings

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole assigned-scope census against b3245a241c58c3015086d8505e9bbf11d83c3c35; unchanged cells apply to both base and candidate. Counts are syntax candidates, not unresolved defects. Optimistic counts combine createOptimistic and createOptimisticStore; async callbacks returning promises without async are described below. Existing open lane PRs retain their files.

Family 1 Handlers 2 Cleanup 3 Async fn/memo 4 Action/optimistic 5 Import/lazy 6 Structured/store/projection 7 Factory 8 Context 9 Reveal 10 Root/get/run LOC
solid 4 10 8/0 0/0 → 1/1 3/2 0/2/0 0 0 0 1/1/1 7857 → 7946
config 0 0 0/0 0/0 0/0 1/1/0 0 0 0 0/0/0 4962
menus 0 5 7/0 0/0 3/1 2/0/0 2 0 0 0/0/0 8248
rest 4 18 21/2 1/1 6/1 2/1/0 0 2 0 0/0/1 19999
pagesA 3 3 85/7 13/16 6/0 1/3/1 0 0 0 0/0/0 25911
pagesB 1 12 152/2 1/2 22/4 4/6/1 0 1 1 0/0/0 42797
pagesC 4 30 200/1 2/4 43/4 12/9/0 20 0 0 0/0/0 54428
app 2 3 129/0 0/0 67/6 1/2/0 0 1 0 0/0/0 31680
lib 0 5 267/0 1/1 12/1 1/2/0 3 1 0 2/0/2 54615
plugins 0 3 18/0 1/1 13/1 1/2/0 0 0 0 2/2/3 4024
api 0 0 12/0 0/0 2/0 0/0/0 0 0 0 0/0/0 2104
total 18 89 899/12 19/25 → 20/26 177/20 25/28/2 25 5 1 5/3/7 256625 → 256714

What Problem This Solves

The MCP app panel tracked settings readiness and operation progress manually. Settings now flow through an admitted promise receipt consumed by an async memo under Loading and Errored; an action and one optimistic busy value present mutation progress.

User Impact

A replacement app keeps usable settings while an older save settles; loading and retry feedback retain their existing appearance.

Why This Change Was Made

Gateway request admission and accepted publication remain in the existing imperative owner. A synchronous workspace subscription retires the presentation when its launch is replaced, so a held old save cannot disable the successor or publish its late failure. This also publishes retained preview content replacements after the content changes. The actual write still finishes normally. Native app retirement stays outside settings readiness and errors, and the existing lazy import remains intact.

The memo returns the admitted promise without an async keyword (one native async read, despite the syntax census showing zero async-keyword memos). latest() retains the edited form while a save reloads settings. The owner already performs update plus reload; affects()/refresh() would duplicate or couple that read, so no refresh machinery is added. Switching away from the workspace tab intentionally retires presentation.

Evidence

Touched-file checklist Before After
1 Intrinsic conditional-handler debt 0 0
2 Component cleanup 0 onCleanup; 1 settled cleanup unchanged; coupled chat primitive keeps its primitive cleanup
3 Manual settings readiness / native async read 1 / 0 0 / 1 (latest, Loading, Errored)
4 Manual busy / action / optimistic busy 1 / 0 / 0 0 / 1 / 1
5 Native lazy boundary 1 lazy + preload unchanged
6 Structured edit-state signals 0 0
7 Handwritten component factories 0 0
8 Throw-only context wrappers 0 0
9 Sibling readiness requiring Reveal 0 0; settings and native app retirement are independent
10 Solid root/getOwner/runWithOwner 0 0

The whole-scope table excludes chat and the root MCP owner modules. The coupled chat files add one subscription to the existing workspace owner, no additional Solid state or root APIs. Panel createSignal count falls 5 → 4, untrack stays 2, and createEffect stays 1 for launching admitted work.

Production LOC: 2,968 → 3,109 (+141) across seven files; panel 297 → 386 (+89). Test LOC: 2,299 → 2,549 (+250) across five files. Growth preserves held-request replacement and native-view lifetimes while separating read readiness from mutation presentation; no new dependency or owner is introduced.

Proof Result
Four settings boundary cases Pass on default pinned Bun: held read/error/retry; save retention/reload/rejection; held-read replacement; held-save replacement
Workspace owner tests 14/14 pass on default pinned Bun
Existing native view retirement case 1/1 pass on default pinned Bun
UI tsrs / format / diff whitespace Pass
Scoped typed lint Pass: complete touched-file run found only a test loop brace; corrected-file run passed
Production Knip Pass; final-head production scan, 18m 4s
Independent P0–P2 review Scoped-clean, final source integrity verified. Subsequent test-only curly-brace correction has no semantic change
Exact paired strict performance Pass; no violations. Fixed metadata, same machine/base; startup +4 B is inside 64 B variance
Full UI unit/E2E/browser extension/real-Gateway ci:full requested; CI is broad proof

Local runs were limited to touched contracts. The first final settings run passed three cases; the fourth used a detached input after schema replacement. Requerying the live control preserved the form-retention assertion and passed the single failed case. The workspace fixture's first run failed setup (missing gateway argument); the corrected suite passed. The broad lint wrapper timed out generating unrelated extension declarations before lint; the canonical UI tsconfig run is recorded separately.

Synthetic before/after captures cover ready, pending read, and rejected save at the same viewport. No layout change; native app content remains outside the settings fallback. All captures were fully inspected; browser errors were empty.

Surface Base gzip B Head gzip B Delta
Startup JS 325,433 325,437 +4
Startup CSS 40,780 40,780 +0
Chat boot JS 1,441,444 1,441,627 +183
New-session boot JS 1,019,649 1,019,669 +20
Locale catalog JS 3,070,543 3,070,507 -36

MCP settings ready before

MCP settings ready after

MCP settings loading before

MCP settings loading after

MCP settings error before

MCP settings error after

CI follow-up: run 39676300347 found three MCP test fixtures missing sidebarContent plus the shared boot-render-storm heading assertion. Commit 8b639a792d67 adds those three fixture fields; the exact chat test-type graph passes and independent review is clean. The boot failure now matches the exact test name and Message permissions timeout at line 233 on latest completed scheduled main 39687169253, job 119524443291. Replacement full ci:full run 39687093117, on exact head 8b639a792d67b6a18ada82b12ee20c7a5986a98f, is complete. Its sole failing test is the same boot-render-storm case (job119524375687); all UI unit shards, remaining E2E shards, types, lint and performance pass. The fixture-only correction leaves production build and media inputs unchanged. Native inherited-failure landing uses the matching-name evidence for that one assertion.

@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-21T21:22:37.055639Z 292a552 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 292a552eef

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<Errored
fallback={(failure, reset) => (
<>
<SettingsContent settings={null} pending={false} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset the error boundary from every visible retry

When the initial mcp.app.settings read rejects, this fallback renders SettingsContent with no settings, which leaves its toolbar “Settings” button visible. That button starts readSettings() but does not call the boundary's reset(), so even a successful response remains hidden behind the latched error fallback and the click has no visible outcome; only the separate “Try again” button works. Suppress the toolbar action in this fallback or wire it through the same reset path.

AGENTS.md reference: AGENTS.md:L73-L75

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR moves MCP settings readiness and mutation progress to Solid async boundaries and optimistic actions.

Example: Save the parts app’s collection name from Library to Parts.

  • Before: Manual settings and busy signals manage loading and save progress.
  • After: An async receipt supplies settings while an optimistic action retains and disables the edited form during saving.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Focused tests and paired component captures support the refactor, but the retained-launch regression and broken test types block merge.
Proof confidence 🦐 gold shrimp (3/6) The supplied maintainer-authored exemption applies to the ordinary contributor proof gate; inspected ready/loading screenshots show component presentation, while mocked boundary tests cover settings replacement and save rejection.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: MCP settings readiness and save progress depend on manual renderer bookkeeping.
Reason: The maintainer-authored direction follows the repository’s Solid migration contract while retaining Gateway admission and native app ownership.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep this maintainer-authored PR open; the refactor has value, but it introduces a retained-app launch regression and a test-host type mismatch.

Priority: P2
Reviewed head: 292a552eefd560879b893b76aa476437c0ec0e76

Before merge

  • Preserve native launch settlement when a retained tab is hidden (P2) - Open a native MCP app, switch to another workspace tab while preload or mcp.app.launch is pending, then return. The workspace observer sets retired permanently, so current() either prevents dispatch after preload or discards the returned viewId. chat-files-panel retains the same keyed component while hidden, and openIdentity excludes active-tab selection, so returning does not run open() again. The tab remains empty without a retry control. Retire the optimistic presentation independently from accepting a valid native launch result, or provide an owned resume path without repeating an already-dispatched tool effect.
  • Keep the expanded MCP host contract compatible with existing fixtures (P2) - Adding required sidebarContent to ChatPaneMcpAppState makes the three makeChatHost-based assignments to f.owner.state fail type checking: that fixture does not provide sidebarContent. The exact-head CI failure and PR body identify the same three errors. This field is not read by createChatPaneMcpApps; remove the unnecessary requirement or add the field to all affected fixtures.
  • Complete next step - Classify the separate boot-render-storm Message permissions failure against the exact base and reviewed patch before treating that failed CI lane as resolved.
  • Explain or restore the original intent of Native launch settlement - 7b4fdfb: The prior lazy-boundary change explicitly preserved launch behavior and live-target checks; retiring valid native results on temporary tab selection is not explained by the settings presentation goal.

Findings

  • [P2] Preserve native launch settlement when a retained tab is hidden — ui/src/components/solid/mcp-app-panel.tsx:125-129
  • [P2] Keep the expanded MCP host contract compatible with existing fixtures — ui/src/pages/chat/chat-pane-mcp-app.ts:73

Provenance

  • Native launch settlement changes intended behavior without addressing why it exists (7b4fdfb: The prior lazy-boundary change explicitly preserved launch behavior and live-target checks; retiring valid native results on temporary tab selection is not explained by the settings presentation goal.)

Tests

  • Missing end-to-end proof: The supplied tests and screenshots do not exercise switching away during a pending native launch and returning to the retained tab.
Agent review details

How this fits together

The chat workspace retains MCP app tabs; their panels send settings and launch requests through the existing Gateway client and render accepted settings or native app views.

flowchart LR
  Workspace[Chat workspace owner] --> Panel[MCP app panel]
  Panel --> Gateway[Gateway client]
  Gateway --> Server[MCP server]
  Gateway --> Receipt[Settings receipt]
  Receipt --> Boundary[Solid readiness boundary]
  Panel --> View[Retained native app view]
Loading

Technical review

Best possible solution:

Retire optimistic busy presentation without discarding valid native-launch results for retained tabs, and remove unused required host fields or update their consumers.

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

Source traces a pending native launch through tab-selection retirement to discarded publication, while retained rendering provides no restart on return; no target code was executed.

Is this the best way to solve the issue?

The readiness conversion follows the existing owner model, but presentation retirement must remain separate from accepting a still-valid native app result.

Full review comments:

  • [P2] Preserve native launch settlement when a retained tab is hidden — ui/src/components/solid/mcp-app-panel.tsx:125-129
    Open a native MCP app, switch to another workspace tab while preload or mcp.app.launch is pending, then return. The workspace observer sets retired permanently, so current() either prevents dispatch after preload or discards the returned viewId. chat-files-panel retains the same keyed component while hidden, and openIdentity excludes active-tab selection, so returning does not run open() again. The tab remains empty without a retry control. Retire the optimistic presentation independently from accepting a valid native launch result, or provide an owned resume path without repeating an already-dispatched tool effect.
    Confidence: 0.98
  • [P2] Keep the expanded MCP host contract compatible with existing fixtures — ui/src/pages/chat/chat-pane-mcp-app.ts:73
    Adding required sidebarContent to ChatPaneMcpAppState makes the three makeChatHost-based assignments to f.owner.state fail type checking: that fixture does not provide sidebarContent. The exact-head CI failure and PR body identify the same three errors. This field is not read by createChatPaneMcpApps; remove the unnecessary requirement or add the field to all affected fixtures.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Settings readiness and mutation presentation keeps the original intent (91fd61d: The Solid conversion preserved settings, request admission, and awaited app retirement; subsequent work preserved drafts and introduced lazy rendering.)
  • Workspace publication keeps the original intent (82599a2: The synchronous workspace owner publishes raw preview identities to Solid; the added notification completes that existing ownership path.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/components/mcp-app-panel-settings.test.tsx ui/src/components/mcp-app-panel.test.tsx ui/src/pages/chat/chat-pane-mcp-app.test.ts --maxWorkers=1
  • pnpm tsgo:ui
  • pnpm check:test-types
  • Verify the retained-tab launch regression fails on the reviewed head and passes with the repair.
  • Exercise a pending native app launch through the workspace UI, switch tabs, settle it, and verify returning reveals the accepted app without another launch.

What I checked:

PR surface

Source +141, Tests +247. Total +388 across 12 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 7 233 92 +141
Tests 5 254 7 +247
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 487 99 +388

Review metrics

Metric Value Why it matters
Production versus test growth Production +141 lines; tests +247 lines The added boundary tests cover distinct loading, rejection, and replacement cases; synchronous presentation retirement supports held actions, but its application to native launch results needs correction.

Labels

Label changes:

  • add P2: The introduced regression affects optional MCP app tabs during ordinary navigation, with limited blast radius.
  • 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 introduced regression affects optional MCP app tabs during ordinary navigation, with limited blast radius.
  • 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 21, 2026, 5:54 PM ET / 21:54 UTC.

@steipete
steipete merged commit 644fe4c into main Oct 22, 2026
117 of 123 checks passed
@steipete
steipete deleted the solid2/w-s2-mcp-panel-settings branch October 22, 2026 00:06
@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
* refactor(ui): use Solid readiness for MCP app settings

* test(ui): complete MCP pane action fixtures
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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant