feat: use the deployment's hostname suffix in the UI#133
Merged
Conversation
ethanndickson
commented
Apr 11, 2025
| headers: useLiteralHeaders ? literalHeaders.map { $0.toSDKHeader() } : [] | ||
| ) | ||
| Task { | ||
| await handleTokenExpiry() |
Member
Author
There was a problem hiding this comment.
drive-by fix: we need to check for token expiry on app launch. We were previously only checking when the menu bar window was opened, and Connect was disabled. We need to account for when Connect is configured to start when the app is launched.
Comment on lines
+164
to
+167
| // If fetching the config fails, there's likely a bigger issue. | ||
| // We'll show an error in the UI if they try and do something | ||
| logger.error("failed to refresh deployment config: \(error)") | ||
| return |
Member
Author
There was a problem hiding this comment.
If we wanted to show that something went wrong to the user here, the UX would be awkward. I don't think we should create an alert or anything, and I don't think we should reuse the Connect failure error box.
I'm not sure how the user would get into a state where everything else was functional, except the deployment config couldn't be fetched, so I'm happy with this.
spikecurtis
reviewed
Apr 11, 2025
spikecurtis
reviewed
Apr 14, 2025
spikecurtis
approved these changes
Apr 14, 2025
Member
Author
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.

Closes #93.
The only time the hostname suffix is used by the desktop app is when an offline workspace needs to be shown in the list, where we naively append
.coder. This PR sets this appended value to whatever--workspace-hostname-suffixis configured to deployment-side.We read the config value from the deployment when: