fix(cli): fix preview opening wrong project in dev mode#221
Merged
miguel-heygen merged 1 commit intomainfrom Apr 7, 2026
Merged
fix(cli): fix preview opening wrong project in dev mode#221miguel-heygen merged 1 commit intomainfrom
miguel-heygen merged 1 commit intomainfrom
Conversation
This was referenced Apr 7, 2026
Collaborator
Author
4 tasks
7a618b8 to
eb54b7b
Compare
755cf74 to
0722171
Compare
eb54b7b to
eb1f836
Compare
0722171 to
c34a95f
Compare
eb1f836 to
f1e8590
Compare
c34a95f to
7fccfc8
Compare
jrusso1020
approved these changes
Apr 7, 2026
Collaborator
Author
Merge activity
|
The dev mode preview URL used `#/project/<name>` (with leading slash) but the studio's App.tsx route parser expects `#project/` (no leading slash). The hash never matched, so the studio fell through to auto-selecting the first project from /api/projects instead of the one specified on the command line. Removes the leading slash to match the studio's expected format, which local-studio and embedded modes already use correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7fccfc8 to
6c4549c
Compare
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
One-character fix: removes leading
/from the preview URL hash.Dev mode opened
#/project/<name>but the studio expects#project/<name>. The route regex inApp.tsx(/^#project\/([^/]+)/) never matched the slash-prefixed hash, so it fell through to auto-selecting the first project from/api/projects— ignoring the project path you passed on the CLI.Root cause
Local-studio mode and embedded mode already used the correct
#project/format.Test plan
npx tsx cli preview /path/to/projectopens the correct project in the studio