Repository navigation
fix: match workspace and agent names case-insensitively - #274
Conversation
Store workspace names as the server sends them and lowercase only where the offline-workspace hostname is built. Workspace and agent lookups, and the previous-build agent dedupe, now ignore case.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a2dd2c769
ℹ️ 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".
Workspace.agents duplicated the workspace IDs in the agents map and could go stale. The previous-build cleanup in upsertAgent never removed the old agent's ID, so deleting the replacement agent left the workspace with neither an agent row nor an offline row. upsertWorkspace also reset the set whilst agents were still connected, which showed an offline row next to the agent row. sorted now shows a workspace as offline when no agent in the agents map belongs to it.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
RDP deep links (
coder://<host>/v0/open/ws/<workspace>/agent/<agent>/rdp) fail withCould not find workspace '<name>'. Does it exist?when the workspace name has uppercase letters in it, e.g.My-Workspace. A community user ran into this on 0.8.4, whilst their coworkers with all-lowercase workspace names could connect fine.VPNMenuState.upsertWorkspacewas lowercasing workspace names on the way in, just so offline workspaces would show a lowercase hostname in the menu.findWorkspace(name:)then compared that against the deep link's name exactly, soMy-Workspacenever matchedmy-workspace.To fix, we'll store workspace names as they come from the server, and only lowercase them where we build the offline workspace hostname. Workspace and agent names are both unique case-insensitively, so
findWorkspace,findAgent, and the previous-build agent cleanup inupsertAgentnow ignore case.As a result, the latency tooltip and the dashboard link now use the workspace name's original casing. The dashboard link still works, as coderd looks up workspaces by name case-insensitively.
Until this is released, users can workaround it by using an all-lowercase workspace name.