Skip to content

feat(local-env): localhost iframe loop for blueprint dev#3180

Merged
drewstone merged 1 commit intodevelopfrom
feat/local-iframe-loop
May 7, 2026
Merged

feat(local-env): localhost iframe loop for blueprint dev#3180
drewstone merged 1 commit intodevelopfrom
feat/local-iframe-loop

Conversation

@drewstone
Copy link
Copy Markdown
Contributor

Lets the iframe pathway be tested end-to-end against locally-running blueprint dev servers. Two coordinated changes:

  • isIframeAllowedHost accepts localhost/127.0.0.1/0.0.0.0 when the dapp itself is on a local preview host. Production behaviour unchanged.
  • BLUEPRINT_UI_USE_LOCAL_IFRAMES=true in the catalog seed rewrites externalApp.url to per-slug localhost ports.

End-to-end flow documented in apps/tangle-cloud/src/blueprintApps/iframe/README.md.

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.
@drewstone drewstone requested a review from AtelyPham as a code owner May 7, 2026 09:31
@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for tangle-cloud ready!

Name Link
🔨 Latest commit aa483aa
🔍 Latest deploy log https://app.netlify.com/projects/tangle-cloud/deploys/69fc5bf6809d470007918cf3
😎 Deploy Preview https://deploy-preview-3180--tangle-cloud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for tangle-dapp ready!

Name Link
🔨 Latest commit aa483aa
🔍 Latest deploy log https://app.netlify.com/projects/tangle-dapp/deploys/69fc5bf6d8793100081c4b2d
😎 Deploy Preview https://deploy-preview-3180--tangle-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for tangle-leaderboard ready!

Name Link
🔨 Latest commit aa483aa
🔍 Latest deploy log https://app.netlify.com/projects/tangle-leaderboard/deploys/69fc5bf6fbcc4c0008f20d96
😎 Deploy Preview https://deploy-preview-3180--tangle-leaderboard.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@drewstone drewstone merged commit e020ad3 into develop May 7, 2026
20 checks passed
@drewstone drewstone deleted the feat/local-iframe-loop branch May 7, 2026 09:52
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