Skip to content

chore: migrate to @assembly-js/node-sdk and app-bridge#1176

Draft
foleyatwork wants to merge 1 commit intomainfrom
chore/migrate-assembly-js-sdk
Draft

chore: migrate to @assembly-js/node-sdk and app-bridge#1176
foleyatwork wants to merge 1 commit intomainfrom
chore/migrate-assembly-js-sdk

Conversation

@foleyatwork
Copy link
Copy Markdown
Contributor

Summary

  • Replace copilot-node-sdk with @assembly-js/node-sdk (v4.0.2) using the lazy init pattern for the now-async assemblyApi() factory
  • Replace manual postMessage hooks with @assembly-js/app-bridge (v1.1.0), wiring up automatic session token refreshing via AssemblyBridge.sessionToken.onTokenUpdate
  • Remove portalUrl prop drilling from 12 files — origins now configured once via AssemblyBridge.configure()
  • Migrate dispatchWebhook to SDK's first-class sendWebhook method
  • Make NEXT_PUBLIC_ASSEMBLY_API_DOMAIN optional — token's baseUrl takes priority
  • Fix serve-embedded: DASHBOARD_DOMAIN array-as-string bug, add localhost fallback when NGROK_AUTHTOKEN is unset

What's NOT in this PR

  • Class/file rename (CopilotAPIAssemblyAPI) — separate PR to reduce noise
  • Env var renames (COPILOT_API_KEYASSEMBLY_API_KEY) — old names still work, separate coordination
  • copilot-design-system rename — separate concern

Test plan

  • Type check passes (npx tsc --noEmit)
  • Verified locally in embedded dev mode (dashboard + standalone tab)
  • Token decryption works with production API key
  • Server-side rendering completes with API calls succeeding
  • Verify header controls (breadcrumbs, CTAs, actions menu) work in dashboard iframe
  • Verify token refresh works during long sessions
  • Verify webhook dispatch still works on task create/update/delete

🤖 Generated with Claude Code

- Replace copilot-node-sdk with @assembly-js/node-sdk (v4.0.2)
- Implement lazy init pattern for async assemblyApi() in CopilotAPI
- Migrate dispatchWebhook to SDK's sendWebhook method
- Replace manual postMessage hooks with @assembly-js/app-bridge
- Wire up AssemblyBridge token refresh in ClientSideStateUpdate
- Remove portalUrl prop drilling (handled by AssemblyBridge.configure)
- Make NEXT_PUBLIC_ASSEMBLY_API_DOMAIN optional (token baseUrl takes priority)
- Fix serve-embedded: DASHBOARD_DOMAIN array bug, localhost support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@foleyatwork foleyatwork self-assigned this Apr 8, 2026
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 8, 2026

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

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment Apr 8, 2026 3:43pm

Request Review

@foleyatwork
Copy link
Copy Markdown
Contributor Author

@greptileai review this PR please

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