Skip to content

fix(playground): make browser playground boot in repo dev mode#25

Open
GangWangAI wants to merge 1 commit intorivet-dev:mainfrom
GangWangAI:fix/playground-browser-dev-boot
Open

fix(playground): make browser playground boot in repo dev mode#25
GangWangAI wants to merge 1 commit intorivet-dev:mainfrom
GangWangAI:fix/playground-browser-dev-boot

Conversation

@GangWangAI
Copy link

Summary

Fix the browser playground so the documented local dev flow works again.

This updates the playground dev server and worker bundling so
pnpm -C packages/playground dev can boot the browser runtime without
failing on unresolved workspace imports or runtime bridge loading.

Problem

The playground README says it can be started directly from the repo, but the
page failed to boot in browser dev mode:

  • the browser could not resolve secure-exec/browser
  • the generated playground worker still tried to dynamically import
    @secure-exec/core/internal/bridge
  • the worker bundling script pointed at the proxy worker entry instead of the
    actual browser worker implementation

That left the playground stuck with errors like:

  • Failed to resolve module specifier "secure-exec/browser"
  • Failed to load bridge module from @secure-exec/core

Changes

  • add local static path aliases for @secure-exec/core and @secure-exec/browser
    assets in the playground dev server
  • add an import map in the playground HTML so browser ESM can resolve the
    workspace packages from local dist/ output
  • point the playground worker bundler at packages/secure-exec-browser/src/worker.ts
    instead of the proxy worker entry
  • patch the generated playground worker to statically include the bridge module
    instead of leaving a runtime dynamic import behind

Why

The playground is intended to be runnable directly from this repository.
These changes make the repo-local dev path match the documented setup and keep
the worker self-contained enough for browser dev mode.

Validation

Attempted:

  • pnpm -C packages/playground build:assets

Note:

  • in my sandbox this is currently blocked by tsx IPC socket permissions
    (listen EPERM ... tsx-*.pipe), so I could not complete end-to-end
    verification from the agent environment.

@GangWangAI GangWangAI marked this pull request as ready for review March 21, 2026 08:32
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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