Repository navigation
Backport multi-org CLI support to v1 - #822
Merged
Merged
Conversation
(cherry picked from commit cb80d0c)
| let app: App; | ||
| try { | ||
| app = getApp(appId); | ||
| app = await getApp(appId); |
There was a problem hiding this comment.
[Refactor suggestion — optional] Use a single error boundary for flag creation
Move const app = await getApp(appId) and the production-environment lookup into the start of the main try, removing the lookup-only try/catch and outer let app. Both catches call handleError(error, "Flags Create"), and spinner?.fail(...) is a no-op before the spinner is created, so one error boundary preserves lookup-failure handling while keeping app local and immutable.
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.
What changed
The stable CLI currently loads apps from one default organization after a personal sign-in. This backports the app-discovery fix so users in multiple organizations can find their apps without moving to CLI v2.
reflag apps listshows apps across accessible organizations, with the organization name and ID.reflag initasks users with multiple organizations to pick an organization before picking an app.--org-idand optionalorgIdinreflag.config.jsonpin the organization. Invalid or mismatched selections fail rather than falling back.Existing
appId-only configs and app-scoped API keys still work. This keeps the v1 flag API and generated types, including remote config payloads, and does not change MCP connections.Release and verification
maintenance/cli-v1, where the Changesets plan contains only@reflag/cli1.0.5. The maintenance branch does not publish automatically. Nothing has been published from this PR.