Skip to content

feat(ui): render MCP Apps in dashboard widgets#111585

Closed
fuller-stack-dev wants to merge 3 commits into
mainfrom
codex/mcp-app-widget-ui
Closed

feat(ui): render MCP Apps in dashboard widgets#111585
fuller-stack-dev wants to merge 3 commits into
mainfrom
codex/mcp-app-widget-ui

Conversation

@fuller-stack-dev

Copy link
Copy Markdown
Member

Depends on #111552.

What Problem This Solves

Dashboard widgets persisted as MCP Apps cannot yet render in the Control UI, recover from expired source leases, or preserve AppBridge teardown while cells leave the board.

Why This Change Was Made

This adds the renderer/lifecycle half of dashboard MCP Apps. Near-visible cells resolve a Gateway-owned app-view lease and render it through the existing <mcp-app-view> and sandbox; the cell alone owns visibility, proactive renewal, expiry/stale recovery, and teardown sequencing, while the provider only deduplicates identical materialization requests.

The scope intentionally excludes transcript pinning, new pin contracts, channels, and alternate sandbox/bridge implementations. Pending and rejected widgets retain read-only resource rendering beneath their grant notice; the Gateway remains authoritative for every interactive capability.

User Impact

Users can view persisted MCP Apps in dashboard cells, resize them with correct host-context propagation, and retry or remove stale apps. Large boards materialize only visible or near-visible app leases instead of eagerly minting every cell.

Evidence

  • Focused Control UI proof on exact stacked base 7ed78c78627cd8940ec9c4e72b7225061fe06684: 78 component/provider tests passed.
  • Real Chromium mocked-Gateway proof: 2 E2E tests passed, covering exact app-view request parameters, proactive lease renewal, real sandbox/frame mounting, and a 48-cell board that does not mint all offscreen leases.
  • Lifecycle regressions cover authority changes, HTML↔MCP cell reuse, AppBridge teardown, fixed-height host context, slow renewal expiry, offscreen expiry watchdog retention, stale retry/remove, and pending/rejected notices.
  • Full branch autoreview against the stacked backend: clean, with no accepted/actionable findings.
  • git diff --check: passed.
  • Broad pnpm check:changed: pending required CI/Testbox recovery. Blacksmith lease tbx_01kxya9dzpzyr8384dsvhv21k7 remained capacity-queued and was stopped; its queued Actions run was cancelled before the repository command began. Direct AWS fallback was blocked before allocation by unavailable broker access. No broad fan-out was run locally. This PR is not merge-ready until exact-head CI is green after feat(dashboard): persist MCP Apps as board widgets #111552.

AI-assisted implementation and review; no agent transcript included.

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Jul 20, 2026
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 20, 2026
@clawsweeper

clawsweeper Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 19, 2026, 11:02 PM ET / July 20, 2026, 03:02 UTC.

Summary
The branch adds Control UI rendering, lease renewal/recovery, teardown, and Gateway protocol handling for persisted MCP App dashboard widgets.

PR surface: Source +888, Tests +1225, Other +67. Total +2180 across 37 files.

Reproducibility: not applicable. this is a feature PR, not a report of broken established behavior. The relevant validation path is an after-fix persisted-widget flow through the real Gateway rather than a current-main failure reproduction.

Review metrics: 1 noteworthy metric.

  • Gateway protocol surface: 1 RPC added: board.widget.appView. The new cross-client request joins persisted board metadata to live MCP App leases, so integration and compatibility verification matter before merge.

Stored data model
Persistent data-model change detected: persistent cache schema: ui/src/lib/board/provider.test.ts, serialized state: src/boards/sqlite-board-store.ts, unknown-data-model-change: packages/gateway-protocol/src/schema/board.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body reports focused tests and a real Chromium run, but the E2E uses a mocked Gateway; add redacted proof of a persisted MCP App widget being restored and rendered through the real Gateway, including lease-expiry or restart behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The feature is coupled to the still-open backend companion at feat(dashboard): persist MCP Apps as board widgets #111552; maintainers need an integrated rebase and exact-head validation after deciding whether to land the feature pair.
  • [P1] The supplied Chromium E2E run uses a mocked Gateway, so it does not yet demonstrate the real persisted-widget → Gateway remint → sandbox interaction path after restart or lease expiry.
  • [P1] The branch adds one public Gateway RPC and carries persisted MCP App authority metadata across protocol, storage, mobile models, and the web UI; compatibility and authorization behavior need integrated upgrade review before merge.

Maintainer options:

  1. Validate the feature pair before merge (recommended)
    After the backend prerequisite lands, rebase this branch, demonstrate a persisted MCP App through a real Gateway and sandbox lifecycle, and obtain green required checks for the exact head.
  2. Pause for dashboard product direction
    Do not merge either half until maintainers explicitly accept the durable MCP App dashboard, protocol, and authority model.

Next step before merge

  • [P2] The remaining blockers are maintainer product acceptance, integration ordering with the open backend PR, and real behavior proof rather than a narrow mechanical repair.

Maintainer decision needed

  • Question: Should OpenClaw ship durable MCP Apps as first-class dashboard widgets, including the new Gateway app-view endpoint and persisted authority lifecycle, once the backend prerequisite is ready?
  • Rationale: The patch is a coherent implementation of a new cross-layer product capability, but selecting the permanent dashboard, protocol, persistence, and authorization surface is a maintainer product and security-boundary choice rather than a mechanical repair.
  • Likely owner: fuller-stack-dev — They authored the connected backend and UI feature-series commits and can provide the clearest implementation and proof follow-up.
  • Options:
    • Sponsor the feature pair (recommended): Review and land the backend prerequisite first, then require this rebased UI layer to show real-Gateway persisted-widget proof and green exact-head checks.
    • Narrow or defer the capability: Keep MCP App rendering out of durable dashboard widgets until maintainers choose a smaller read-only or non-persisted product boundary.

Security
Cleared: The dedicated pass found no concrete authorization bypass in the proposed checks; the remaining security concern is proving the persisted-widget authority path against a real Gateway before merge.

Review details

Best possible solution:

Accept or narrow the durable-dashboard-MCP-App product direction as one feature series, land the backend prerequisite first, then rebase this UI PR and prove a persisted widget through a real Gateway with its required exact-head checks green.

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

Not applicable: this is a feature PR, not a report of broken established behavior. The relevant validation path is an after-fix persisted-widget flow through the real Gateway rather than a current-main failure reproduction.

Is this the best way to solve the issue?

Unclear. The UI/provider/handler split is internally coherent, but the best permanent solution depends on maintainer acceptance of the durable MCP App dashboard contract and proof against the real backend prerequisite.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against eb3a600571fd.

Label changes

Label changes:

  • add merge-risk: 🚨 compatibility: The branch adds a Gateway method and changes durable MCP App widget data across protocol, storage, desktop/mobile models, and the web UI.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests and a real Chromium run, but the E2E uses a mocked Gateway; add redacted proof of a persisted MCP App widget being restored and rendered through the real Gateway, including lease-expiry or restart behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: 📣 needs proof.

Label justifications:

  • P2: This is a substantial but non-emergency dashboard capability whose remaining work is maintainer acceptance and integration validation.
  • merge-risk: 🚨 compatibility: The branch adds a Gateway method and changes durable MCP App widget data across protocol, storage, desktop/mobile models, and the web UI.
  • merge-risk: 🚨 security-boundary: The app-view path remints leases and authorizes interactive MCP App capabilities from persisted widget authority, which requires end-to-end boundary verification.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests and a real Chromium run, but the E2E uses a mocked Gateway; add redacted proof of a persisted MCP App widget being restored and rendered through the real Gateway, including lease-expiry or restart behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +888, Tests +1225, Other +67. Total +2180 across 37 files.

View PR surface stats
Area Files Added Removed Net
Source 22 961 73 +888
Tests 13 1249 24 +1225
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 74 7 +67
Total 37 2284 104 +2180

What I checked:

  • UI lifecycle implementation: The UI cell owns visibility-gated materialization, lease renewal, stale recovery, and teardown, while the board view supplies the provider callback for the new app-view flow. (ui/src/components/board/board-widget-cell.ts:1, 17dd3215989b)
  • Gateway authority path: The new board handler validates the app-view request and connects it to MCP App active-view resolution and transcript reconstruction, making this a cross-layer feature rather than a UI-only change. (src/gateway/server-methods/board.ts:1, 17dd3215989b)
  • Focused browser coverage: The branch adds a Chromium Control UI E2E scenario for sandbox/frame mounting, renewal, and avoiding eager materialization of offscreen cells; the PR body identifies its Gateway as mocked, so it is useful supplemental coverage rather than real integrated behavior proof. (ui/src/e2e/board-mcp-app.e2e.test.ts:1, 17dd3215989b)
  • Prerequisite feature series: The PR explicitly depends on the still-open backend/persistence companion at feat(dashboard): persist MCP Apps as board widgets #111552, whose head is the stacked base commit used by this branch. (src/boards/board-store.ts:1, 7ed78c78627c)
  • Repository policy applied: The root review policy requires whole-surface review, maintainer handling for larger product/security-sensitive behavior, and proof that matches the actual integration risk; this PR changes gateway protocol, persisted widget metadata, and UI lifecycle behavior. (AGENTS.md:1, eb3a600571fd)

Likely related people:

  • fuller-stack-dev: Authored the connected backend persistence work and the UI renderer/lifecycle commit sequence, giving them clear cross-layer context for the proposed dashboard MCP App feature. (role: feature-series author; confidence: medium; commits: 4513825130a3, 7ed78c78627c, 17dd3215989b; files: src/boards/board-store.ts, src/gateway/server-methods/board.ts, ui/src/components/board/board-widget-cell.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (1 earlier review cycle)
  • reviewed 2026-07-20T01:47:58.631Z sha 17dd321 :: needs maintainer review before merge. :: none

@fuller-stack-dev
fuller-stack-dev changed the base branch from codex/mcp-app-widget-backend to main July 20, 2026 02:57
@openclaw-barnacle openclaw-barnacle Bot added app: android App: android gateway Gateway runtime agents Agent runtime and tooling size: XL labels Jul 20, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed 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. labels Jul 20, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Closing as superseded in feature scope by #111524, merged as 64c82812a5e52f4a03d2b89b8132c068a048a81b.

Fresh-main audit confirms that main already contains pinned MCP App rendering, provider dedupe, read-only Gateway enforcement, lease remint, and live resize/host-context propagation. After retargeting, this PR now duplicates the backend plus renderer work across 37 files (+2284/-104) and should not be rebased or merged wholesale.

The remaining renderer work is narrower and is being prepared from fresh main: near-viewport materialization to respect lease capacity, fixed board height, observer cleanup, a hard expiry watchdog, offscreen renewal behavior, and focused Chromium proof. No Gateway, protocol, storage, or chat-pinning changes belong in that follow-up.

Reopen only if current main is shown to lack the merged renderer surface itself; lifecycle refinements belong in the fresh follow-up.

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: android App: android app: web-ui App: web-ui gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant