Skip to content

feat(shell): push project switches to embedded apps over the live bridge - #14

Merged
huhn511 merged 1 commit into
mainfrom
feat/projects-live-project-switch
Jun 20, 2026
Merged

feat(shell): push project switches to embedded apps over the live bridge#14
huhn511 merged 1 commit into
mainfrom
feat/projects-live-project-switch

Conversation

@huhn511

@huhn511 huhn511 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

What

Lets the shell's project switcher reach an embedded project-scoped app (Projects) live, and registers Projects as a built-in iframe app.

Why

Project switches recreated the bridge, whose proactive welcome goes out at the un-negotiated host protocol version (v2) and a v1 app-broker silently drops it — so the embedded app never learned the new project.

Changes

  • bridge.ts: new setProject() updates the live bridge identity and re-sends welcome at the negotiated protocol version (mirrors setTheme).
  • IframeHost.tsx: removed project from the bridge-creation deps (no more teardown on switch); push it live via a setProject effect.
  • context.tsx: register Projects as a first-party iframe built-in.

Depends on

  • core PR: broker carries BridgeIdentity.project + subscribeBrokeredIdentity (needs publish before this works in prod).

Verification

Playwright-verified: No-project ↔ My-Workspace switching updates the embedded iframe without reloading it (same iframe element throughout).

🤖 Generated with Claude Code

Selecting a project in the shell switcher must reach an embedded
project-scoped app (Projects) without tearing down its iframe.

- bridge.ts: add setProject() — updates the live bridge identity and
  re-sends welcome at the NEGOTIATED protocol version (mirrors setTheme).
  Recreating the bridge instead would send a proactive welcome at the
  un-negotiated host version, which a v1 app-broker silently drops.
- IframeHost.tsx: stop tearing down the bridge on project change (removed
  `project` from the creation deps); push it live via a setProject effect.
- context.tsx: register Projects as a first-party iframe built-in app.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@huhn511
huhn511 merged commit cad2960 into main Jun 20, 2026
2 of 3 checks passed
@huhn511
huhn511 deleted the feat/projects-live-project-switch branch June 20, 2026 18:16
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