feat(cli): add browser launch options to preview and play#884
Merged
miguel-heygen merged 2 commits intoMay 16, 2026
Merged
Conversation
Collaborator
|
interesting, try to fix the failed ci checks, I'll consider this, seems very useful |
a5dc854 to
5133613
Compare
Contributor
Author
|
Thanks! I fixed the CI issue, and the checks are green now. I had tested locally with Appreciate you taking a look! |
miguel-heygen
approved these changes
May 16, 2026
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
Adds explicit browser launch options to
hyperframes previewandhyperframes play.New options:
--browser-path <path>: open the preview/player URL with a specific browser executable--user-data-dir <dir>: pass a Chromium-compatible profile directory when launching via--browser-pathDefault behavior is unchanged. Without these flags, both commands continue to use the existing default-browser behavior.
--no-openstill prevents any browser launch.Why
This is useful for local QA and development workflows where users want to open HyperFrames in a dedicated browser instead of their main browser session.
For example:
Behavior
--user-data-dirrequires--browser-path--no-openstill takes priority and launches no browseropenpackage pathNon-goals
Testing
Automated:
bunx oxlint packages/cli/src/commands/play.ts packages/cli/src/commands/preview.ts packages/cli/src/utils/openBrowser.ts packages/cli/src/utils/openBrowser.test.ts bunx oxfmt --check packages/cli/src/commands/play.ts packages/cli/src/commands/preview.ts packages/cli/src/utils/openBrowser.ts packages/cli/src/utils/openBrowser.test.ts bun test packages/cli/src/utils/openBrowser.test.tsManual smoke tests:
preview --user-data-dir /tmp/profileexits with validation errorpreview --no-openstarts the server without opening a browserpreview --no-open --browser-path ...Firefoxdoes not open a browserplay --user-data-dir /tmp/profileexits with validation errorpreview --browser-path ...Firefoxopens Firefoxpreview --browser-path ...Chrome --user-data-dir ...opens Chrome with an isolated profile