feat(local-env): localhost iframe loop for blueprint dev#3180
Merged
feat(local-env): localhost iframe loop for blueprint dev#3180
Conversation
Two coordinated changes that make the iframe pathway testable end-to-end against locally-running blueprint dev servers, with no env-var fiddling beyond what's needed to enable iframe rendering itself: - apps/tangle-cloud/src/blueprintApps/policy.ts: isIframeAllowedHost now accepts localhost / 127.0.0.1 / 0.0.0.0 when the dapp is itself running on a local preview host (uses the existing isLocalPreviewHost helper). Production behaviour unchanged — checks fail for everyone except the trusted-host suffix list when dapp is hosted on a real domain. - scripts/local-env/blueprint-ui-catalog.mjs: BLUEPRINT_UI_USE_LOCAL_IFRAMES=true rewrites externalApp.url at seed time to a per-slug localhost dev port. Seeded URLs in the local catalog point at where each blueprint's pnpm dev would be running. Per-slug ports are inline in LOCAL_IFRAME_DEV_URLS — add an entry when a new blueprint gains a UI. Documented end-to-end flow in iframe/README.md.
✅ Deploy Preview for tangle-cloud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for tangle-dapp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for tangle-leaderboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Lets the iframe pathway be tested end-to-end against locally-running blueprint dev servers. Two coordinated changes:
isIframeAllowedHostacceptslocalhost/127.0.0.1/0.0.0.0when the dapp itself is on a local preview host. Production behaviour unchanged.BLUEPRINT_UI_USE_LOCAL_IFRAMES=truein the catalog seed rewritesexternalApp.urlto per-slug localhost ports.End-to-end flow documented in
apps/tangle-cloud/src/blueprintApps/iframe/README.md.