Skip to content

fix(apps): bind actions to the originating conversation - #4863

Merged
reachjalil merged 2 commits into
devfrom
fix/app-conversation-ownership
Sep 10, 2026
Merged

reachjalil merged 2 commits into
devfrom
fix/app-conversation-ownership

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Keep MCP App actions attached to the conversation and connection that opened them, rather than the currently selected workspace.

  • Pass the owning endpoint, workspace, session, engine and effective read-only state into App frames, including split conversations.
  • Require a bounded server-issued launch ID for callbacks. Revalidate the original tool/resource, session ownership/archive state and host-observable configuration/credential identity before dispatch.
  • Fence disposed views and late approval continuations. Keep generated previews and cached results read-only until they have a valid live launch.
  • Preserve working dashboard leases across equivalent fallback lists and unrelated provider/plugin/MCP changes. Relevant MCP replacement or restoration invalidates old launches.

App callbacks now require the returned launch ID. Older clients must update and reopen the App; there is no unbound-call fallback. Leases expire after 30 minutes and are capped at 256 per server instance. This does not revoke already-dispatched operations or detect upstream account changes that leave host-visible identity unchanged.

Verification

Signed head: b067e9a174725085dbcebcf3c3ff963f0b597157.
Base and merge-base: f550d6ebfc9649d43acc4f790eb63251767cc8cb (dev).

Passed on that exact head, all exit 0:

  • pnpm --filter @openwork/app exec bun test --isolate ./tests/mcp-app-frame.test.ts ./tests/mcp-app-origin.test.tsx ./tests/dashboard-tile-cache.test.ts ./tests/mcp-app-tile.test.tsx — 26 passed, 0 failed/skipped.
  • pnpm --filter openwork-server exec bun --conditions=development test src/mcp-app-host.test.ts — 35 passed, 0 failed/skipped.
  • pnpm --filter @openwork/app typecheck
  • pnpm --filter openwork-server typecheck
  • Diff whitespace check and signatures for both commits.

The tests cover explicit origin wiring, stale approvals, lease policy/configuration changes, unrelated-update preservation and dashboard lease ownership. They are focused feedback, not full desktop journey proof.

Verdict and remaining coverage

Incomplete. The existing saved-app-creation journey was extended with APP-ARCHIVE, but not executed. Cross-workspace iframe behavior, native approval timing, generated previews and actual v1/v2 HTTP session guards still need runtime proof. The archive case explicitly skips v2 where its archive mutation API is unavailable. No live provider or enterprise deployment was exercised.

This is the foundation for #4864 (direct resources), #4865 (audiences) and #4866 (conversation handoff). It does not implement those child outcomes. #4294 retains dashboard retry ownership; #4297 retains saved-input editing. Independent #4862 changes frame fixtures; rebase and adapt those fixtures to this explicit-origin contract when combining the changes, then rerun affected checks. Current results do not certify the combined set.

The latest rebase resolved one session-surface.tsx conflict by retaining upstream uiStateOwner alongside the owning client and engine. Focused checks above were rerun on the new head; old-head results are not substituted.

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:50pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 10:50pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 10:50pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 10:50pm UTC

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit b067e9a174725085dbcebcf3c3ff963f0b597157 · selected evidence

Open review report

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (276360 ms), confidentiality-review (356701 ms), spec-provenance-review (231956 ms), desktop-den-sync-review (430581 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 2
  • Distinct heads in retained window: 2
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 2/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 10, 2026

@diff-warden diff-warden 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.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (65295c3d5b96b1ae14aa8e241ca2a4e2e635736e). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@diff-warden diff-warden 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.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (b067e9a174725085dbcebcf3c3ff963f0b597157). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@reachjalil
reachjalil merged commit cac8ac7 into dev Sep 10, 2026
28 checks passed

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — b067e9a1 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — b067e9a1 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — b067e9a1 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — b067e9a1 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