Skip to content

fix: match workspace and agent names case-insensitively - #274

Merged
ethanndickson merged 3 commits into
mainfrom
fix/find-workspace-case-insensitive
Oct 21, 2026
Merged

ethanndickson merged 3 commits into
mainfrom
fix/find-workspace-case-insensitive

Conversation

@coder

@coder coder Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RDP deep links (coder://<host>/v0/open/ws/<workspace>/agent/<agent>/rdp) fail with Could 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.upsertWorkspace was 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, so My-Workspace never matched my-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 in upsertAgent now 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.

@coder
coder Bot requested a review from ethanndickson as a code owner October 20, 2026 17:21
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.
@ethanndickson ethanndickson changed the title fix: match workspace names case-insensitively when handling deep links fix: match workspace and agent names case-insensitively Oct 21, 2026
@ethanndickson

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T02:45:56.163932Z 6056300 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread Coder-Desktop/Coder-Desktop/VPN/MenuState.swift
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.
@ethanndickson

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 605630092e

ℹ️ 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".

@ethanndickson
ethanndickson merged commit dc57c40 into main Oct 21, 2026
3 checks passed
@ethanndickson
ethanndickson deleted the fix/find-workspace-case-insensitive branch October 21, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants