Skip to content

feat(apps): share context with the originating conversation - #4866

Closed
reachjalil wants to merge 3 commits into
fix/app-conversation-ownershipfrom
feat/app-conversation-handoff
Closed

reachjalil wants to merge 3 commits into
fix/app-conversation-ownershipfrom
feat/app-conversation-handoff

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Dependency

Stacked on #4863 (fix/app-conversation-ownership). Uses its originating-conversation and live-launch contract; revalidate after any parent change.

Summary

Let a standard MCP App contribute context or request a reviewed follow-up in its originating conversation without silently starting turns or targeting the selected chat.

  • ui/update-model-context retains bounded, latest-per-source text/JSON context. Normal future submissions validate the live launch and append attributed, untrusted synthetic user input immediately before native prompt dispatch. Updates alone start no turn and never become system instructions.
  • ui/message accepts user-role text blocks, opens a native review dialog, and uses the owning conversation send/admission path. Success follows accepted/sent admission; composer drafts stay unchanged.
  • Reject dashboard, generated, read-only, stale and mismatched contexts. Private tool-result metadata is never automatically copied into model context.
  • Fence both v1 and v2 at the actual prompt boundary. V2 performs the final check after model/instruction preparation. Teardown can prevent an unsubmitted prompt, not recall an already-admitted turn.
  • Preserve newer acknowledged context across asynchronous validation, source ordering and late failures. Fresh approved retries release definite send failures, not unknown admission outcomes.

Context is ephemeral and limited to 16 KiB per update, 64 KiB across 16 Apps. Only supported text message modalities are advertised. View-exposed tools, resource proxies, streaming and generated-view writes are not added.

Verification

Signed head: fb89034c9a437d9bab6f2026e67dd031df330adc.
Exact parent-PR base: b067e9a174725085dbcebcf3c3ff963f0b597157.

Passed on that exact head, all exit 0:

  • pnpm --filter @openwork/app exec bun test --isolate ./tests/mcp-app-conversation.test.ts ./tests/queued-drain-admission-wedge.test.ts ./tests/mcp-app-origin.test.tsx — 39 passed.
  • pnpm --filter @openwork/app exec bun test ./tests/opencode-v2-adapter.test.ts --test-name-pattern "prompt|model admission|waiting for .* admission|variant" — 10 passed; 74 not selected.
  • pnpm --filter @openwork/app exec bun test ./tests/opencode-stream-timeout.test.ts --test-name-pattern "explicit client rejection|bounded native POST" — 2 passed; 17 not selected.
  • pnpm --filter openwork-server exec bun --conditions=development test src/mcp-app-host.test.ts — 37 passed.
  • pnpm --filter @openwork/app exec bun test --isolate ./tests/composer-focus-continuity.test.tsx — 1 passed.
  • pnpm --dir evals exec bun test ./packages/labs/test/mock-mcp.test.ts --test-name-pattern "App context witness" — 1 passed; 7 not selected.
  • App and server TypeScript checks and delta whitespace checks passed.

Total: 90 passed, zero failed/skipped; 98 tests were deliberately filtered out, not claimed as passed. All three delta commits have verified signatures.

Verdict and remaining coverage

Incomplete. The existing saved-app-creation journey was extended but not run with the real App/Den/model boundary. Cross-workspace handoff and the complete rendered review flow therefore still need end-to-end evidence. No real models, live providers, enterprise accounts or shared app profiles were used.

Rebase conflicts in session-surface.tsx preserved upstream send options/queued-item consumption and retained both uiStateOwner and the App-message handler. Focused composer coverage passed afterward; it emitted duplicate-key warnings, which are not represented as a failure or silently repaired out of scope.

The independent protocol-contract PR #4862 is not included in this stack. Combining it requires updating frame fixtures and supported-message expectations/docs; current checks do not certify that composed tree. Hosted CI/review are pending. No merge or deployment is included.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 10:53pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 10:53pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 10:53pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 10:53pm UTC

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — fb89034c Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — fb89034c Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — fb89034c Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — fb89034c Deployed Sep 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant