Skip to content

fix(mcp): keep app forms, file updates and context in sync after live testing - #164277

Merged
steipete merged 27 commits into
mainfrom
steipete/mcp-apps-deslop
Oct 3, 2026
Merged

steipete merged 27 commits into
mainfrom
steipete/mcp-apps-deslop

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Related: #161747

What Problem This Solves

Fixes: after #161747 landed, a live test of MCP plugin apps against a purpose-built demo server found that rich forms were cancelled by the 60 s MCP request timeout while the person was still answering, file viewers never received live-update notifications, the "App context" strip stayed stale after a turn consumed it, expired or reconstructed app views failed silently, the Apps page errored on a fresh install, launches ignored the app's preferred display mode, and several smaller UI defects (overlapping thumbnails, keyboard shortcuts, raw Zod errors). The landed diff also carried leftover slop from its team-session origin.

User Impact

User impact: MCP app forms wait for the person answering them (one shared ten-minute allowance per tool call, matching the view lease) instead of timing out mid-form; file viewers get live updates after the file changes on disk; the context strip clears when the context is sent and removing already-sent context no longer errors; views whose lease ended show "This app session ended" with a Relaunch action, and reconstructed transcript views say "Send a message to interact again"; the Apps page works before any session exists; apps open inline unless they prefer fullscreen; thumbnails, numeric shortcuts (1–9) and mention-search errors render correctly. No configuration changes.

Why This Change Was Made

Two notification events (mcp.app.resourceUpdated, mcp.app.hostContextChanged) were never registered with the Gateway broadcaster's event-scope guard, so the live broadcaster dropped them while unit tests with a mocked broadcaster kept passing; both regressions now go through the real broadcaster. The elicitation handler holds a human-input lease that suspends the per-request deadline only while a question is pending, so ordinary tool calls keep their configured timeout. The file watcher retains the subscribe request's device-revocation capture for its lifetime and logs its close reason instead of closing silently. The UI consumes facts the Gateway already had (reconstruction state, consumed-context receipts, preferred display modes) rather than adding new owners. A behavior-neutral deslop pass over the landed diff and nearby cleanup fund most of the additions; the inactive-view state, session adoption and lease logic account for the remaining production growth.

Evidence

Live test on an isolated Gateway with a demo MCP Apps server ("Parts Lab": global/thread/file entrypoints, settings, mentions, model context, rich-form elicitation, resource subscriptions). Findings and the re-verification log are summarized below; each fix has a regression at the registered Gateway route or mounted component.

  • Verified live on the fix build: inline launch with Fullscreen option; thumbnails beside labels; reconstructed view banner; order form call completed after 137 s (previously -32001 Request timed out at 60 s); after the broadcaster-scope fix, file append and atomic rename changed the viewer's ETag and the Apps-page context strip cleared after the turn (worker Playwright proof plus mounted AppsPage coverage).
  • Coordinator-recorded gates on pre-integration head f224fac35509cd3b35dcb19e674ffd0ca7b3c37f: focused tests (290 across the touched files), format, diff-check, type-aware oxlint, tsgo lanes, Knip, madge, full check-changed, matched-base startup JS 373,179 B (CI's ui:check-performance:base mode; the ordinary local check is already over its ceiling on current main itself at 373,753 B). Independent Codex autoreview at P1: four findings, all on inherited main commits or a false prerequisite, dispositions recorded.
  • Main integration: merged e40ed06f23cb8bd939c9a6ff537eba7136074686 without conflicts or overlapping changed paths, preserving all 24 reviewed commits. Integrated head 3fa8ecd843a80d381878535e3b84973f36e14964 passed pnpm format:check, git diff --check, git diff origin/main --check, and node scripts/run-tsgo.mjs with tsconfig.core.json and tsconfig.ui.json. No branch fixtures or budgets required resolution; the earlier focused tests were not rerun.
  • Deferred: replacing the native window.confirm() for app→conversation messages with a pane-owned confirmation (embedded hosts suppress native dialogs); per-view approval grants for app-initiated app-only tools.

Before/after (synthetic fixtures):

Rich-form thumbnails at 440 px Expired app view
before before
after after

CI follow-up

CI run 37120318762 at 3fa8ecd843a80d381878535e3b84973f36e14964 found a dashboard layout regression in checks-ui-e2e (8/9): a read-only board app incorrectly received the conversation recovery banner, shifting its full-height iframe by 48 px. The fail-fast monitor canceled 20 sibling jobs; that attempt is failed/canceled evidence, not passing coverage.

Fixed in 533d3bd4284febb5445094e3ea343d9600da1cd4 by making the embedding surface explicit. The board keeps its existing grant, renewal, and Retry/Remove owner; conversation previews retain their recovery message and entrypoint Relaunch action. The read-only fixture and zero-inset browser assertions remain unchanged. No configuration or authorization change.

The unchanged pre-fix browser case reproduced the exact 48 px failure. After the fix, all 5 board E2E cases passed (27.70 s wall; retained-runtime case 1.810 s), along with 36 view/board/transcript unit tests (18.00 s total; 21 view tests in 8.56 s, modified case 2 ms), focused formatting, type-aware oxlint, UI tsgo, and diff-check. Fresh independent Codex autoreview through P2 found no actionable issues. New-head CI is required before landing.

Dashboard before Dashboard after
Read-only board app incorrectly showing conversation recovery Board app fills its owner-managed dashboard surface

Review follow-up

Addressed both ClawSweeper findings in 808d08038ca0c4cd8339aa7dbb02c043181aea16. The pinned protocol specification explicitly supports experimental["openai/settings"] for MCP 2025-11-25 and earlier. The shared decoder again accepts it after extensions precedence, so direct and native catalog consumers retain settings discovery. The existing real SDK catalog test now protects that documented contract.

Reconstructed views now show genuine sandbox setup failures alongside their recovery guidance. Only typed ended-session errors are replaced by the recovery state. The four existing invalid-sandbox cases were extended to reconstructed payloads; all four failed before the fix and pass afterward. The board recovery repair remains unchanged.

Proof: the settings catalog case failed with undefined before the decoder fix; the full six-case registered MCP suite then passed (54.36 s Vitest / 67.81 s wrapper with --maxWorkers=1, including a 40.405 s cold compiled-worker preparation; settings case 34 ms). This existing suite exercises real SDK negotiation and registered Gateway dispatch with fake timers. Direct checks also passed for extensions-only, experimental-only, and extensions precedence. All 21 view tests passed (9.37 s Vitest / 13.27 s wrapper; changed cases 72–92 ms). Focused format, type-aware lint, core/UI tsgo, and diff checks passed. A fresh combined isolated Codex autoreview through P2 completed with no actionable findings.

Reconstructed setup failure before Reconstructed setup failure after
Reconstructed preview hides its sandbox setup error Reconstructed preview displays the concrete sandbox setup error

Remove narrating comments, redundant request and navigation intermediates, an inferred schema annotation, and unused private parameter defaults. Preserve request capture order and all runtime boundaries.
Reuse the shared record guard and consolidate reservation cleanup.
Remove unused form state and redundant aliases, flatten context projection,
and trim verbose commentary and declaration style drift.
Remove duplicate binding and URI validation, a redundant choice-value
intermediate, and the unused cross-module URI validator export.

Reuse the declared form-origin type instead of repeating callback fields.
Remove revision narration and normalize string construction without changing
error text, authority checks, wire payloads, or async boundaries.
…p-b' and 'steipete/mcp-apps-deslop-c' into steipete/mcp-apps-deslop
Keep McpAppSettingSchema private after the UI cleanup removed its only
external type annotation, so production and full-tree export scans pass.

Restore the original question-media record predicate: sharing it through
the normalization package changes UI chunking. The isolated comparison
measures 40 fewer startup gzip bytes with the local predicate, preserving
validation behavior and the existing performance ceiling.
Exclude pending elicitation time from the runtime deadline while preserving ordinary request timeouts and parent cancellation. The SDK absolute deadline includes the existing 120-second question allowance; repeated questions share that allowance so a server cannot renew a tool indefinitely. Approval already completes before dispatch and is covered by the registered-route regression.

Fake-clock app and model calls now return after a 70-second human wait; ordinary calls still expire at 60 seconds.
Publish the cleared revision through the existing host-context event and discard older in-flight UI refreshes. Removing already-consumed context succeeds; an outdated receipt still cannot remove a newer update. Registered Gateway and mounted component regressions cover consumption and late removal.
Retain the subscribe request device-revocation capture for the watcher lifetime. The accepted RPC previously released that capture before file notifications arrived. View, session, requester and revocation checks remain current; watcher closure now logs its reason.

Registered subscription proof covers real append and atomic rename. Registered launch proof separately confirms retained interaction authority survives launch request disposal and rejects later revocation; one-shot approval is not widened.
Use fixed marker/thumbnail columns and shrinkable copy in a flex option row. The previous three-column grid placed four children into overlapping/wrapped columns. Chromium component geometry and inspected screenshots cover 320, 400, 440 and 480 pixel widths.
Render ended-session and reconstructed-preview states in the view chrome. The existing typed expiry signal and read-only capability control the state; entrypoint panels supply their existing launch operation for Relaunch. The ten-minute view lease and authorization policy are unchanged.
Describe the selected session and adopt that same key through the canonical session creator only when no row exists, then discover apps. Existing rows and refreshes avoid repeated creation. This preserves the session-owned harness and tool-policy contract instead of inventing a sessionless runtime.

A mounted global catalog regression fails before the orchestration fix. Complementary registered Gateway proof exercises missing-row denial, sessions.create and discovery before any model turn.
Honor tool preference, then resource preference, defaulting inline; advertised resource modes constrain the chosen mode. Intersect those modes with initialized app capabilities and immediately publish the negotiated host context. Resource hints can no longer widen the initialized capabilities.
Classify malformed upstream resource lists as UNAVAILABLE with stable detail code MCP_APP_UNSUPPORTED_MENTION_RESULT. Render localized plain-language copy in the resource picker; request validation retains INVALID_REQUEST. The host continues to reject nonconforming resource data.
Match the visible 1-9 badges to rendered option buttons and omit inaccessible Other badges. Hidden implicit-resource choices neither consume shortcut numbers nor respond to keys. Resource preview requests retain their original option indices in their separate owner.
Keep only x-openai-thumbnail and extensions-based settings metadata; remove the unused form-resource constructor requestId and stop forwarding it from callers. The public harness adapter parameter shape is unchanged.

Fetched https://developers.openai.com/plugins/build/extensions/ with curl (HTTP 200); it names x-openai-thumbnail and Plugin settings without an experimental placement. The suggested /plugins/build/extensions/settings page returned HTTP 404. The linked formal specification is on GitHub and was not fetched under this work order. No experimental-placement contract was found in the fetched official documentation.

A registered app form regression proves the unsupported alias is ignored while canonical thumbnails survive. The actual SDK runtime catalog no longer advertises experimental settings; registered resource lifecycle tests cover the constructor cutover.
Only offer Relaunch recovery copy when the view retains an entrypoint launch callback. Expired transcript and question previews cannot safely reconstruct a tool launch, so direct them to send a new message instead. Preserve the existing expiry event and panel Relaunch path.

Two mounted-view assertions fail before this change; all 20 view tests pass afterward.
Keep the view below its existing 700-line cap by moving its unchanged Lit stylesheet into a module loaded with the view. Use the context-provider test helper as the actual relaunch fixture parent and add required loop braces. No limit or baseline changes.

The final lint attempt exposed these three issues; scoped type-aware lint and all 28 mounted-view/catalog tests pass after repair.
Use the existing test-client factory to supply the full GatewayBrowserClient contract and preserve the mounted frame owner identity. Remove the invalid partial-client cast.

The UI component type lane and all 20 mounted-view tests pass with this fixture.
Share guarded context publication across existing refresh paths, render notice copy in place, and reuse the session target. Remove a one-use display intermediate and a redundant comment. Preserve synchronous clear receipts, revision checks, authority checks, and timeout bounds.

Document the shared 120-second human-input allowance in one sentence. This removes 25 production lines; regression tests are unchanged.
Move per-request cancellation, the bounded human-input allowance, and local timeout provenance into the existing client lifecycle owner. Each server creates its own lifecycle so failure backoff still recognizes only its own request timeouts.

This removes over-cap growth from the catalog runtime without changing the line ratchet, timeout values, authority checks, or tests. The registered timeout regressions and elicitation binder tests pass.
Register file notifications with the read scope used by the subscribe route. Targeted broadcasts still enforce view, session, requester, connection and device authority; unknown events remain denied.

Exercise file-entrypoint launch, append and atomic rename through the real broadcaster. The regression failed with no socket frame before registration and passes after; isolated Parts Lab Playwright proof confirms both ETag changes.
Authorize host-context notifications with the read scope used by the bound view. The live broadcaster previously dropped this unregistered event, including targeted receipts. Preserve revision tracking and connection targeting.

The registered-route regression fails before registration and passes after two successive context updates. Mounted AppsPage coverage verifies both conversation controllers clear three chips and the bridge context on the latest receipt.
Use the existing shared allowance constant for ten-minute questions and per-call human input. SDK total deadlines become the configured active-work timeout plus 600 seconds. Ordinary requests, approval ordering and the ten-minute view lease are unchanged.

Fake-timer route regressions fail under the 120-second allowance and pass with 500-second human waits; repeated questions expire at 660 seconds for a 60-second request budget. Document the per-call shared limit.
Fold one-use prompt and resource projections, share identical catalog callbacks, and remove redundant validation scaffolding and branches. Preserve URI and resource admission, revision comparison, fresh result arrays, subscription order and all authority checks.

Remove 43 production lines with existing tests unchanged. Nine owner test files pass; the branch remains net positive because further candidates would alter observable projections or lifecycle contracts.
@clawsweeper

clawsweeper Bot commented Oct 3, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling labels Oct 3, 2026
@clawsweeper clawsweeper Bot added the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 8:04 AM ET / 12:04 UTC (Revision 3).

ClawSweeper review

What this changes

The PR repairs MCP app form deadlines, file and context notifications, fresh-session discovery, display preferences, and UI recovery while simplifying nearby code.

Merge readiness

✅ Ready for maintainer review

Both previous blockers are resolved, with no additional actionable correctness finding. The repairs remain necessary on current main, and the recorded live evidence supports the changed behavior.

Priority: P2
Reviewed head: 808d08038ca0c4cd8339aa7dbb02c043181aea16

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, well-supported repairs with both prior blockers resolved and no remaining actionable finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Recorded isolated-Gateway proof exercises the MCP deadline owner with a 137-second form and the notification owners with append, atomic rename, and context consumption; inspected before/after images show layout and recovery improvements. Follow-up registered and mounted regressions support the latest fixes. Newer attachment inspection was unavailable to this reviewer. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Recorded isolated-Gateway proof exercises the MCP deadline owner with a 137-second form and the notification owners with append, atomic rename, and context consumption; inspected before/after images show layout and recovery improvements. Follow-up registered and mounted regressions support the latest fixes. Newer attachment inspection was unavailable to this reviewer. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduction and clean checkout: Reviewed the introduced merge-base-to-head delta at 808d080. The checkout was clean. The supplied test merge is stale relative to the pinned base and was not used to infer removal of current-main behavior.
Previous findings resolved: The exact-head GitHub commit patch restores experimental settings advertisement after extensions precedence and limits setup-error suppression to typed ended-session state. Registered SDK catalog coverage and reconstructed invalid-sandbox cases exercise the repaired contracts. Local comparison against the earlier review commit encountered a Git object fetch HTTP 403; the read-only GitHub commit endpoint supplied the exact follow-up patch instead.
Settings dependency contract: The PR explicitly depends on the settings advertisement contract. The pinned specification permits both extensions and legacy experimental placement for MCP 2025-11-25 and earlier, matching the restored decoder: https://github.com/openai/mcp-extensions/blob/ca16cb3bc015baaa1b849082d8755bbef18770cb/docs/spec.md#capability-advertisement.
Findings None None.
Security None None.

How this fits together

MCP apps are interactive plugin views hosted by OpenClaw. The Gateway connects their tools, forms, files, and selected context to the owning conversation, while the Control UI renders the app and recovery controls.

flowchart TD
  A[Plugin MCP server] --> B[Gateway app runtime]
  C[Conversation and requester authority] --> B
  B --> D[Human input forms]
  E[Workspace file changes] --> F[Scoped notifications]
  B --> F
  F --> G[Control UI app view]
  D --> G
  G --> H[Next conversation turn]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +102, Tests +1388, Docs +1. Total +1491 across 60 files.

View PR surface stats
Area Files Added Removed Net
Source 45 502 400 +102
Tests 14 1458 70 +1388
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 60 1963 472 +1491

Review metrics

Metric Value Why it matters
Production and regression growth production net +102 lines; tests net +1388 lines The PR explains the production growth through bounded deadline handling, inactive-view recovery, and session adoption, with focused boundary regressions.

Technical review

Best possible solution:

Keep the repairs within the existing MCP lifecycle, Gateway authority, session, and UI owners, preserving settings interoperability and actionable recovery.

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

Yes, source establishes the dropped-notification mechanism and configured deadline conflict, with registered regressions and reported live failures. This read-only review did not execute a reproduction.

Is this the best way to solve the issue?

Yes, the patch repairs existing owners and restores the documented settings contract; the previous setup-error and board-recovery concerns are addressed without a parallel runtime or new configuration.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Recorded isolated-Gateway proof exercises the MCP deadline owner with a 137-second form and the notification owners with append, atomic rename, and context consumption; inspected before/after images show layout and recovery improvements. Follow-up registered and mounted regressions support the latest fixes. Newer attachment inspection was unavailable to this reviewer. No stored-data contract changes.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: These are bounded reliability and usability repairs to the opt-in MCP app workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Recorded isolated-Gateway proof exercises the MCP deadline owner with a 137-second form and the notification owners with append, atomic rename, and context consumption; inspected before/after images show layout and recovery improvements. Follow-up registered and mounted regressions support the latest fixes. Newer attachment inspection was unavailable to this reviewer. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded isolated-Gateway proof exercises the MCP deadline owner with a 137-second form and the notification owners with append, atomic rename, and context consumption; inspected before/after images show layout and recovery improvements. Follow-up registered and mounted regressions support the latest fixes. Newer attachment inspection was unavailable to this reviewer. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduction and clean checkout: Reviewed the introduced merge-base-to-head delta at 808d080. The checkout was clean. The supplied test merge is stale relative to the pinned base and was not used to infer removal of current-main behavior. (808d08038ca0)
  • Previous findings resolved: The exact-head GitHub commit patch restores experimental settings advertisement after extensions precedence and limits setup-error suppression to typed ended-session state. Registered SDK catalog coverage and reconstructed invalid-sandbox cases exercise the repaired contracts. Local comparison against the earlier review commit encountered a Git object fetch HTTP 403; the read-only GitHub commit endpoint supplied the exact follow-up patch instead. (src/agents/mcp-app-extension-metadata.ts:91, 808d08038ca0)
  • Settings dependency contract: The PR explicitly depends on the settings advertisement contract. The pinned specification permits both extensions and legacy experimental placement for MCP 2025-11-25 and earlier, matching the restored decoder: https://github.com/openai/mcp-extensions/blob/ca16cb3bc015baaa1b849082d8755bbef18770cb/docs/spec.md#capability-advertisement. (docs/spec.md, ca16cb3bc015)
  • Repairs remain absent from current main: Fetched main's event guard lacks both MCP notification registrations, and its client lifecycle lacks the bounded human-input deadline owner added by this branch. No same-repository merged replacement establishing these fixes was supplied. The latest release predates the related MCP app expansion. (src/gateway/server-broadcast-scopes.ts:80, 063685e96d00)
  • Retained subscription authority: The file watcher retains the original device-revocation capture, releases it on close, and rechecks connection, requester, session, view, workspace, and interaction authority after awaited work before targeted publication. Registered coverage exercises real append and atomic rename through the production broadcaster and verifies that another connection receives no frame. No new authority bypass was found. (src/gateway/mcp-app-host-files.ts:303, 808d08038ca0)
  • Live and visual proof: The captured PR body reports an isolated Gateway and Parts Lab MCP server completing a form after 137 seconds, changed file ETags after append and atomic rename, and consumed-context chips clearing. Four locally prepared images were inspected and show before/after thumbnail geometry and expired-view recovery. The newer board and reconstructed-error image pairs were absent from the manifest; browser inspection returned cache misses, a reviewer limitation rather than missing contributor evidence. Captured body source identity: dad44c4ca93ee2f564ec6f635d07efc358567083d1b36715d8364cbc251578cb. (808d08038ca0)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • roboclaw-bot: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-03T11:45:36.389Z sha 3fa8ecd :: blocked before merge. :: [P1] Preserve the documented experimental settings advertisement | [P2] Keep reconstructed-view setup failures visible
  • reviewed 2026-10-03T11:56:01.059Z sha 533d3bd :: blocked before merge. :: [P1] Preserve the documented experimental settings advertisement | [P2] Keep reconstructed-view setup failures visible

Restore the experimental settings capability documented for MCP 2025-11-25 and earlier, retaining extensions precedence. Keep sandbox setup failures visible alongside reconstructed-view guidance; typed session expiry retains its recovery state.
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Addressed both findings in 808d080: restored the documented experimental settings advertisement with extensions precedence, and preserved genuine setup errors for reconstructed views. Both regressions fail before the fixes and pass afterward; focused proof and inspected synthetic before/after images are in the PR body. The earlier board layout failure is also fixed in 533d3bd.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 3, 2026
@steipete
steipete merged commit e906068 into main Oct 3, 2026
158 of 160 checks passed
@steipete
steipete deleted the steipete/mcp-apps-deslop branch October 3, 2026 12:22
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
… testing (openclaw#164277)

* refactor(ui): deslop MCP app UI

Remove narrating comments, redundant request and navigation intermediates, an inferred schema annotation, and unused private parameter defaults. Preserve request capture order and all runtime boundaries.

* refactor(mcp): deslop MCP app runtime

Reuse the shared record guard and consolidate reservation cleanup.
Remove unused form state and redundant aliases, flatten context projection,
and trim verbose commentary and declaration style drift.

* refactor(harness): deslop MCP app harness

Remove duplicate binding and URI validation, a redundant choice-value
intermediate, and the unused cross-module URI validator export.

Reuse the declared form-origin type instead of repeating callback fields.
Remove revision narration and normalize string construction without changing
error text, authority checks, wire payloads, or async boundaries.

* fix(mcp-apps): keep cleanup within export and UI budgets

Keep McpAppSettingSchema private after the UI cleanup removed its only
external type annotation, so production and full-tree export scans pass.

Restore the original question-media record predicate: sharing it through
the normalization package changes UI chunking. The isolated comparison
measures 40 fewer startup gzip bytes with the local predicate, preserving
validation behavior and the existing performance ceiling.

* fix(mcp): keep elicitation-backed tool calls alive while a human answers

Exclude pending elicitation time from the runtime deadline while preserving ordinary request timeouts and parent cancellation. The SDK absolute deadline includes the existing 120-second question allowance; repeated questions share that allowance so a server cannot renew a tool indefinitely. Approval already completes before dispatch and is covered by the registered-route regression.

Fake-clock app and model calls now return after a 70-second human wait; ordinary calls still expire at 60 seconds.

* fix(ui): clear the app context strip when a turn consumes it

Publish the cleared revision through the existing host-context event and discard older in-flight UI refreshes. Removing already-consumed context succeeds; an outdated receipt still cannot remove a newer update. Registered Gateway and mounted component regressions cover consumption and late removal.

* fix(gateway): deliver file-change notifications to subscribed app views

Retain the subscribe request device-revocation capture for the watcher lifetime. The accepted RPC previously released that capture before file notifications arrived. View, session, requester and revocation checks remain current; watcher closure now logs its reason.

Registered subscription proof covers real append and atomic rename. Registered launch proof separately confirms retained interaction authority survives launch request disposal and rejects later revocation; one-shot approval is not widened.

* fix(ui): keep rich-form thumbnails beside their labels

Use fixed marker/thumbnail columns and shrinkable copy in a flex option row. The previous three-column grid placed four children into overlapping/wrapped columns. Chromium component geometry and inspected screenshots cover 320, 400, 440 and 480 pixel widths.

* fix(ui): show expired and reconstructed app views as inactive

Render ended-session and reconstructed-preview states in the view chrome. The existing typed expiry signal and read-only capability control the state; entrypoint panels supply their existing launch operation for Relaunch. The ten-minute view lease and authorization policy are unchanged.

* fix(ui): discover apps on the Apps page before any session exists

Describe the selected session and adopt that same key through the canonical session creator only when no row exists, then discover apps. Existing rows and refreshes avoid repeated creation. This preserves the session-owned harness and tool-policy contract instead of inventing a sessionless runtime.

A mounted global catalog regression fails before the orchestration fix. Complementary registered Gateway proof exercises missing-row denial, sessions.create and discovery before any model turn.

* fix(ui): honor the app's preferred display mode on launch

Honor tool preference, then resource preference, defaulting inline; advertised resource modes constrain the chosen mode. Intersect those modes with initialized app capabilities and immediately publish the negotiated host context. Resource hints can no longer widen the initialized capabilities.

* fix(ui): report unsupported mention results plainly

Classify malformed upstream resource lists as UNAVAILABLE with stable detail code MCP_APP_UNSUPPORTED_MENTION_RESULT. Render localized plain-language copy in the resource picker; request validation retains INVALID_REQUEST. The host continues to reject nonconforming resource data.

* fix(ui): accept numeric shortcuts for every rendered option

Match the visible 1-9 badges to rendered option buttons and omit inaccessible Other badges. Hidden implicit-resource choices neither consume shortcut numbers nor respond to keys. Resource preview requests retain their original option indices in their separate owner.

* refactor(mcp): drop unshipped compatibility aliases

Keep only x-openai-thumbnail and extensions-based settings metadata; remove the unused form-resource constructor requestId and stop forwarding it from callers. The public harness adapter parameter shape is unchanged.

Fetched https://developers.openai.com/plugins/build/extensions/ with curl (HTTP 200); it names x-openai-thumbnail and Plugin settings without an experimental placement. The suggested /plugins/build/extensions/settings page returned HTTP 404. The linked formal specification is on GitHub and was not fetched under this work order. No experimental-placement contract was found in the fetched official documentation.

A registered app form regression proves the unsupported alias is ignored while canonical thumbnails survive. The actual SDK runtime catalog no longer advertises experimental settings; registered resource lifecycle tests cover the constructor cutover.

* fix(ui): keep inactive app recovery actionable

Only offer Relaunch recovery copy when the view retains an entrypoint launch callback. Expired transcript and question previews cannot safely reconstruct a tool launch, so direct them to send a new message instead. Preserve the existing expiry event and panel Relaunch path.

Two mounted-view assertions fail before this change; all 20 view tests pass afterward.

* refactor(ui): separate MCP App view styles

Keep the view below its existing 700-line cap by moving its unchanged Lit stylesheet into a module loaded with the view. Use the context-provider test helper as the actual relaunch fixture parent and add required loop braces. No limit or baseline changes.

The final lint attempt exposed these three issues; scoped type-aware lint and all 28 mounted-view/catalog tests pass after repair.

* test(ui): use the Gateway client fixture for relaunch

Use the existing test-client factory to supply the full GatewayBrowserClient contract and preserve the mounted frame owner identity. Remove the invalid partial-client cast.

The UI component type lane and all 20 mounted-view tests pass with this fixture.

* refactor(mcp-apps): trim live-fix additions

Share guarded context publication across existing refresh paths, render notice copy in place, and reuse the session target. Remove a one-use display intermediate and a redundant comment. Preserve synchronous clear receipts, revision checks, authority checks, and timeout bounds.

Document the shared 120-second human-input allowance in one sentence. This removes 25 production lines; regression tests are unchanged.

* refactor(mcp): keep request deadlines with client lifecycle

Move per-request cancellation, the bounded human-input allowance, and local timeout provenance into the existing client lifecycle owner. Each server creates its own lifecycle so failure backoff still recognizes only its own request timeouts.

This removes over-cap growth from the catalog runtime without changing the line ratchet, timeout values, authority checks, or tests. The registered timeout regressions and elicitation binder tests pass.

* fix(gateway): authorize app resource update delivery

Register file notifications with the read scope used by the subscribe route. Targeted broadcasts still enforce view, session, requester, connection and device authority; unknown events remain denied.

Exercise file-entrypoint launch, append and atomic rename through the real broadcaster. The regression failed with no socket frame before registration and passes after; isolated Parts Lab Playwright proof confirms both ETag changes.

* fix(gateway): deliver consumed app context receipts

Authorize host-context notifications with the read scope used by the bound view. The live broadcaster previously dropped this unregistered event, including targeted receipts. Preserve revision tracking and connection targeting.

The registered-route regression fails before registration and passes after two successive context updates. Mounted AppsPage coverage verifies both conversation controllers clear three chips and the bridge context on the latest receipt.

* fix(mcp): give app forms the view lease's ten minutes

Use the existing shared allowance constant for ten-minute questions and per-call human input. SDK total deadlines become the configured active-work timeout plus 600 seconds. Ordinary requests, approval ordering and the ten-minute view lease are unchanged.

Fake-timer route regressions fail under the 120-second allowance and pass with 500-second human waits; repeated questions expire at 660 seconds for a 60-second request budget. Document the per-call shared limit.

* refactor(mcp-apps): fund live fixes with nearby cleanup

Fold one-use prompt and resource projections, share identical catalog callbacks, and remove redundant validation scaffolding and branches. Preserve URI and resource admission, revision comparison, fresh result arrays, subscription order and all authority checks.

Remove 43 production lines with existing tests unchanged. Nine owner test files pass; the branch remains net positive because further candidates would alter observable projections or lifecycle contracts.

* fix(ui): preserve board app recovery ownership

* fix(mcp): preserve settings compatibility and visible setup errors

Restore the experimental settings capability documented for MCP 2025-11-25 and earlier, retaining extensions precedence. Keep sandbox setup failures visible alongside reconstructed-view guidance; typed session expiry retains its recovery state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation extensions: codex gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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