-
Notifications
You must be signed in to change notification settings - Fork 875
feat(cli): add open app <workspace> <app-slug> command #17032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
70e04ba
to
a778d6c
Compare
a778d6c
to
afbe048
Compare
@@ -54,3 +62,107 @@ func Test_resolveAgentAbsPath(t *testing.T) { | |||
}) | |||
} | |||
} | |||
|
|||
func Test_buildAppLinkURL(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review: I adapted the test cases from app.test.ts
. If you have other suggestions for test cases, I'd be happy to add them!
u.RawQuery = q.Encode() | ||
// encodeURIComponent replaces spaces with %20 but url.QueryEscape replaces them with +. | ||
// We replace them with %20 to match the TypeScript implementation. | ||
u.RawQuery = strings.ReplaceAll(u.RawQuery, "+", "%20") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review: I'm not sure if this is strictly necessary? Did it for completeness' sake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a slightly better UX, but otherwise this looks great. Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niiice, thanks for improving the UX!
Fixes #17009
Adds a CLI command
coder open app <workspace> <app-slug>
that allows opening arbitrarycoder_apps
via the CLI.Users can optionally specify a preferred region for workspace applications.