feat: app-bridge entry point (Feature 7) - #2
Merged
Conversation
Add framework-agnostic postMessage utilities for communicating with the
Assembly dashboard parent frame:
- constants.ts — DASHBOARD_DOMAINS (prod + staging)
- types.ts — Icons enum, AppBridgePayload discriminated union,
PrimaryCtaPayload, SecondaryCtaPayload, ActionsMenuPayload,
CtaConfig, ActionItem, BridgeOpts
- send.ts — sendToParent(): fans out to all DASHBOARD_DOMAINS or a
single portalUrl origin; ensureHttps() upgrades http://;
no-op in SSR (typeof window === 'undefined')
- index.ts — barrel export for assembly-kit/app-bridge entry point
10 tests passing covering domain fan-out, single-origin targeting,
http→https upgrade, SSR safety, payload forwarding, and Icons values.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion rule - Rewrites test/app-bridge.test.ts to use a plain Call[] array instead of bun:test mock(), eliminating the empty callback that triggered the eslint(no-empty-function) CI failure on all platforms - Adds app-bridge entry point to bunup.config.ts and package.json exports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
assembly-kit/app-bridgeentry point — framework-agnostic postMessage utilities for communicating with the Assembly dashboard parent frameDASHBOARD_DOMAINS— prod + staging origins as a typedas consttuplesendToParent(payload, portalUrl?)— fans out to all domains or a single origin; upgradeshttp://tohttps://; no-op in SSR (typeof window === 'undefined')Iconsenum,AppBridgePayloaddiscriminated union (PrimaryCtaPayload | SecondaryCtaPayload | ActionsMenuPayload),CtaConfig,ActionItem,BridgeOpts(ready for Feature 8 React hooks)Test plan
sendToParentwithoutportalUrl→ posts to everyDASHBOARD_DOMAINsendToParentwithportalUrl→ posts to that origin onlyhttp://URLs upgraded tohttps://windowis undefinedIconsenum values correctDASHBOARD_DOMAINSentries usehttps://bun run type-checkpassesbun test— 10/10 pass🤖 Generated with Claude Code