Add Local environment option to boxel profile add#4420
Conversation
Add a third environment choice for local development (localhost:4201) so developers don't need to manually configure Matrix and realm server URLs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
boxel profile add
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c3e603e41
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export function getEnvironmentFromMatrixId(matrixId: string): Environment { | ||
| if (matrixId.endsWith(':stack.cards')) return 'staging'; | ||
| if (matrixId.endsWith(':boxel.ai')) return 'production'; | ||
| if (matrixId.endsWith(':localhost')) return 'local'; |
There was a problem hiding this comment.
Preserve explicit URL handling for localhost profiles
Returning 'local' for :localhost makes ProfileManager.addProfile() treat @user:localhost as a known environment, so the non-interactive path (boxel profile add -u ... -p ...) no longer requires explicit URLs and silently falls back to the staging defaults (https://matrix-staging.stack.cards and https://realms-staging.stack.cards/). In practice, local profiles created this way point to staging endpoints and break local auth/workflows; addProfile needs a local default branch (or localhost should remain unknown until that branch exists).
Useful? React with 👍 / 👎.
|
Let's make sure to update the software-factory README.md to describe the end to end flow for running the factory. right now it's using env vars instead of relying on the boxel-cli profile |
When testing boxel-cli locally I needed an option to save a profile that works in a local setup. I think it would be beneficial to others too.