Skip to content

native: MCP app frames and host bridge (TR-MCPAPP) #98

Closed

Description

@rynfar

Ledger row TR-MCPAPP (MCP app frames). First slice.

Web source: apps/web/src/components/chat/McpAppFrame.tsx, packages/client-runtime/src/mcpApps/host.ts (+ host.test.ts), packages/client-runtime/src/state/mcpApps.ts, the mcp-app timeline row in apps/web/src/session-logic.ts / TimelineAssistantRows.tsx. RPCs: mcpApps.callTool, mcpApps.toolInfo, mcpApps.readResource, mcpApps.updateModelContext (packages/contracts/src/rpc.ts).

Native: render the app resource in the sandboxed crates/app/src/webview (rules in webview/mod.rs), with the JSON-RPC host bridge ported to pure, tested Rust.

Activity

  1. added this to the M2 Parity core milestone on Nov 3, 2026
  2. added
    parity
    native:feature
    status:in-progress
    on Nov 3, 2026
  3. rynfar commented on Nov 3, 2026

    @rynfar
    OwnerAuthor

    First slice is ready in #104 (b4710ff6b9080733d96183b76298041c7c0d8eb5). TR-MCPAPP remains partial.

    Shipped: inline transcript app rows with source-scoped RPC forwarding, a pure Rust JSON-RPC host, default/clamped sizing, theme-token host styles, and the existing sandboxed WebKit page container. Read-only tools run after preflight; tools requiring confirmation are refused.

    Remaining gaps: fullscreen/pip display modes, ui/message, ui/update-model-context UI beyond the client RPC, ui/download-file, step-aside/confirm dialogs, theme changes while open, device permission grants, and host-initiated resource-teardown acknowledgement/timeout handling.

    All required native checks pass: 1,040 Rust tests, all-target Clippy, snapshot build, theme/parity/conformance drift checks and check:changed. The read-only smoke probe synchronized. Local before/after captures are listed in the PR; they show the real transcript's fixture row and WebKit-unavailable fallback. The offscreen renderer cannot execute WebKit, and no live provider-produced MCP app, real MCP tool/resource success, system-browser open, or interactive WebKit session was observed. The pure-host transcript and in-process WebSocket tests cover protocol behavior/forwarding. No server data was changed or paid turn sent.

  4. added
    status:review
    and removed
    status:in-progress
    status:review
    on Nov 3, 2026
  5. rynfar commented on Nov 3, 2026

    @rynfar
    OwnerAuthor

    Merged in #104. TR-MCPAPP stays partial; gaps are in the comment above (fullscreen/pip, ui/message, model-context UI, downloads, confirm/step-aside dialogs, live theme changes, device grants, teardown acknowledgement). Not yet seen running against a live MCP app in a real window. Leaving this open for them.

  6. added
    status:in-progress
    on Nov 4, 2026
  7. rynfar commented on Nov 4, 2026

    @rynfar
    OwnerAuthor

    PR #209 adds the teardown acknowledgement slice at f791bab30612692905eabe5b6975d52109ce6772, based on actual native 15ae309a5e3ef31f4403543ef355290ec3642618. Initialized inline close now sends ui/resource-teardown and waits for the matching result/error or a cancellable 2,000 ms deadline. Disposal, stale document generations, late completions, and Show app reopen are covered.

    TR-MCPAPP stays partial and #98 stays open. Remaining gaps: fullscreen/pip, ui/message, model-context UI, downloads, device permissions/dialogs, live theme updates, and live WebKit verification. Viewport detach/eviction/unmount still dispose immediately; no unsafe document retention was added.

    Passed strict native workspace Clippy, 1,364 workspace tests, normal/snapshot builds, theme/parity/conformance checks, scoped formatting, deterministic host transcript, and offscreen bridge audit/captures. The audit bypasses WebKit transport; the fallback captures do not prove JavaScript acknowledgement delivery. check:changed was skipped because this assignment prohibits its repo-wide fallback; parent-only root gate was not run here.

    Local evidence: /private/tmp/native-factory-2f5f764a/98-teardown/before-current.png, /private/tmp/native-factory-2f5f764a/98-teardown/after.png, /private/tmp/native-factory-2f5f764a/98-teardown/reopened.png; exact head/base/check/artifact provenance is in /private/tmp/native-factory-2f5f764a/98-teardown/provenance.json. No uploads or evidence assets were committed.

  8. added
    status:review
    and removed
    status:in-progress
    on Nov 4, 2026
  9. rynfar commented on Nov 4, 2026

    @rynfar
    OwnerAuthor

    Merged PR #209 as cf0ce8a7aab67a73bd326c7d51e2c266e08e2360, exact independently approved f791bab30612692905eabe5b6975d52109ce6772 onto 15ae309a5e3ef31f4403543ef355290ec3642618.

    Parent gate6719 JOINED exit0 GREEN: 1,364 native workspace tests, strict all-target Clippy, theme, parity and conformance. The actual gated index tree and squash tree match. TR-MCPAPP remains partial/#98; all130 other ledger rows are preserved. check:changed was skipped because the repository-wide fallback is prohibited; it is not claimed green.

    Primary merged snapshot build and deterministic host example36184 JOINED exit0. All three primary captures91483 JOINED exit0 and were inspected: open offscreen fallback, closed/Show app, reopened fallback. The bridge audit verifies matching result/error and explicit timeout, stale-generation rejection and timer/host release. Both immutable input fixture hashes match reviewed evidence. The unique user-requested normal15ae .app binary hash remains unchanged. Runtime transcript: /private/tmp/native-factory-2f5f764a/transcript-209-merged.log. PNGs/audits/provenance: /private/tmp/native-factory-2f5f764a/evidence-209-merged/manifest.json and outputs/.

    #98 remains open/partial: fullscreen/pip, ui-message, model-context UI, downloads, device/dialog/theme, live WebKit and graceful detach/unmount gaps remain. Offscreen callbacks inject the deadline and bypass WebKit transport/message pump; this is not proof of elapsed timer delivery or live WebView reopen. Native inline close/Show app is covered; web/mobile/Electron/server/provider logic is unchanged, environment-bound routing preserved. Remote behavior remains unverified.

    Root209 verification used copied14658 smoke data, no real windows/browser/clipboard/server writes/provider turns. Evidence stays local. Exact-clean-head cleanup follows home preservation; archive worker/reviewer only after cleanup joins.

  10. removed
    status:review
    on Nov 4, 2026
  11. added 2 commits that reference this issue on Nov 14, 2026
    9b8885c
    5affe3c
  12. rynfar commented on Nov 14, 2026

    @rynfar
    OwnerAuthor

    Closed by PR #366 (merged into native at 5affe3c19f0805047561a54e090d79091b06e0ee).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    native:featureparity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions