-
Notifications
You must be signed in to change notification settings - Fork 88
Set an explicit default Gitpod host for existing users #192
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
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.
Pull Request Overview
This PR sets an explicit default Gitpod host for users who have not configured their endpoint manually. It updates the storage logic in both the dashboard content script and the button component to ensure the default endpoint ("https://gitpod.io") is applied appropriately.
- Simplifies the conditional check for updating the endpoint in the dashboard script.
- Removes the default parameter from the useStorage hook in the button component and adds an effect to initialize the default if unset.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/contents/gitpod-dashboard.ts | Updates the logic for conditionally updating the stored endpoint. |
src/button/button.tsx | Removes the default from useStorage and adds a useEffect to set the default endpoint. |
Comments suppressed due to low confidence (2)
src/button/button.tsx:53
- [nitpick] Default address initialization logic appears in multiple locations; consider consolidating this logic into a shared module to prevent potential inconsistencies.
const actions = useMemo(() => {
src/contents/gitpod-dashboard.ts:26
- Verify that removing the explicit check against DEFAULT_GITPOD_ENDPOINT does not unintentionally override a user-set default when running on gitpod.io. Consider ensuring that the logic maintains the intended behavior in all hosting environments.
if (!currentlyStoredEndpoint || new URL(currentlyStoredEndpoint).host !== currentHost) {
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.
@filiptronicek should we bump the version in package.json?
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.
Works as advertised. 😄
✅ to unblock
I'm not sure how we generally ship, but it seems like we should bump the version before we do (ref: #192 (review))
I usually make version upgrades with Lines 69 to 70 in a7b3145
|
Description
Preps for NEXT-3410 by making sure all users who use the extension get their host set to https://gitpod.io, if they haven't set it to something else manually.
Related Issue(s)
Fixes NEXT-3408
How to test
Application
->Extension storage
->Gitpod
->Sync
and see the value is set to"https://gitpod.io"
. If not, go to a page the extension is active on (such as this PR) and see again.The rollout plan here is to let the extension explicitly set the hostname for a couple of weeks and then roll out a new version where the default is
app.gitpod.io
.