Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(site): add Install Coder Desktop item to UserDropdown - #28244

Merged
jakehwll merged 11 commits into
mainfrom
jakehwll/devex-722-add-install-coder-desktop-button-to-userdropdown
Aug 19, 2026
Merged

feat(site): add Install Coder Desktop item to UserDropdown#28244
jakehwll merged 11 commits into
mainfrom
jakehwll/devex-722-add-install-coder-desktop-button-to-userdropdown

Conversation

@jakehwll

@jakehwll jakehwll commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🤖 This PR was modified by Coder Agents on behalf of Jake Howell.

Resolves DEVEX-722.

Adds an Install Coder Desktop item to UserDropdown, sitting directly above the existing Install CLI option. Because UserDropdownContent is shared, it appears in both the navbar dropdown and the agents-page sidebar footer.

Screenshots

macOS/Windows shots are captured with navigator.platform overridden accordingly; the Linux shot is the real workspace platform, where the Coder Desktop item is hidden. Install Coder Desktop uses a monitor glyph, and Install CLI now uses a terminal glyph (it was a monitor on main).

main (before) This PR · macOS/Windows This PR · Linux / iPad OS
UserDropdown on main UserDropdown with Install Coder Desktop UserDropdown on Linux without the Desktop item

Behaviour

  • Platform-gated visibility: shown only on macOS and Windows (the platforms Coder Desktop ships for), hidden on Linux/other. The Linux client (coder/coder-desktop-linux) is experimental and not advertised yet, so it stays hidden there.
  • Links to the docs (https://coder.com/docs/user-guides/desktop) rather than a single install method. The docs page is the canonical hub covering Homebrew, WinGet, manual release downloads, and source, and it stays current without frontend changes. The coder-desktop-* repo READMEs don't enumerate install methods; they defer to these same docs.
  • No installed-detection: consistent with the Install CLI item, we don't try to detect whether Coder Desktop is already present.

Changes

  • site/src/utils/platform.ts: add isWindows() and supportsCoderDesktop().
  • UserDropdownContent.tsx: render the platform-gated item (MonitorIcon) and switch Install CLI to TerminalIcon.
  • Unit tests for the platform helpers and Storybook coverage for the dropdown item (present + correct href on macOS/Windows, absent on Linux/iPadOS).

Implementation plan & decision log

Ticket open questions and decisions

  1. Shown to all users or only supported platforms? Only supported platforms (macOS, Windows); hidden elsewhere. The Linux client is experimental and not advertised yet, so hiding it there is intentional.
  2. Where should it link? The Coder Desktop docs page. Users install via many methods (brew, winget, releases, source); the docs are the single hub that lists them all and are maintained in-repo. The GitHub release pages / repo READMEs only cover downloads and defer back to the docs.
  3. Hide when already installed? No. There is no reliable browser-side way to detect a native app install, and it mirrors how Install CLI behaves.

Implementation

  • Extend site/src/utils/platform.ts with isWindows() and supportsCoderDesktop() (reusing the existing isMac()).
  • In UserDropdownContent.tsx, conditionally render an Install Coder Desktop DropdownMenuItem (external link, MonitorIcon, opens in a new tab) above Install CLI when supportsCoderDesktop() is true.
  • Tests: platform.test.ts (OS detection via vi.stubGlobal) and UserDropdown.stories.tsx (visibility + href per platform, mocking platform detection with spyOn).

Left as a draft pending review, let me know when you'd like it opened.

@linear-code

linear-code Bot commented Aug 18, 2026

Copy link
Copy Markdown

DEVEX-722

@jakehwll
jakehwll marked this pull request as ready for review August 18, 2026 08:17

@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: 8b0888d846

ℹ️ 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 site/src/modules/dashboard/Navbar/UserDropdown/UserDropdownContent.test.tsx Outdated
Comment thread site/src/utils/platform.ts Outdated
* install affordance everywhere else (e.g. Linux).
*/
export function supportsCoderDesktop(): boolean {
return isMac() || isWindows();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude iPadOS from macOS desktop support

On iPadOS 13+ Safari in desktop mode, navigator.platform reports MacIntel, so isMac() returns true and this new predicate displays an install option for a platform where Coder Desktop is unavailable. The repository already handles iPadOS masquerading as macOS by checking navigator.maxTouchPoints in site/src/pages/AgentsPage/utils/chatAttachments.ts:69-72; apply an equivalent exclusion here.

Useful? React with 👍 / 👎.

Address Codex review: move UserDropdown platform-gating coverage into
Storybook play functions and exclude iPadOS (reports MacIntel with a
touchscreen) from supportsCoderDesktop.

@matifali matifali left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Left a few comments. May be get @chrifro's review too.

Comment thread site/src/utils/platform.ts
Comment thread site/src/utils/platform.test.ts
Comment thread site/src/utils/platform.test.ts Outdated
Coder Desktop now ships an (experimental) Linux client
(coder/coder-desktop-linux), so the install affordance should be
shown on Linux too. Add isLinux() and include it in the predicate,
keeping the iPadOS exclusion. Addresses review feedback.
@coderagents

This comment was marked as outdated.

The Linux Coder Desktop client (coder/coder-desktop-linux) is
experimental and its maintainer isn't comfortable advertising it yet,
so revert the earlier change that surfaced the install affordance on
Linux. Back to macOS/Windows only.

@chrifro chrifro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

non-blocking

I'd suggest to adjust the icons. Having a download icon for only one of the install actions can be confusing.

Install Coder Desktop https://lucide.dev/icons/monitor?search=termin
Install CLI https://lucide.dev/icons/terminal

I know it's out of scope, but would be great if we only show these options if they have not been installed yet. If we can't fit it into this PR, can we make sure to document it a linear issue to pick up another time?

Comment thread site/src/utils/platform.test.ts Outdated
Address review feedback: a lone download icon on Install CLI next to the Coder Desktop item was confusing. Use the monitor glyph for Install Coder Desktop and the terminal glyph for Install CLI.
Replace the manual Object.defineProperty navigator juggling with vi.stubGlobal in the unit test and spyOn in the story, per review feedback.
@jakehwll
jakehwll requested a review from jeremyruppel August 18, 2026 14:11
import { supportsCoderDesktop } from "#/utils/platform";
import { SupportIcon } from "../SupportIcon";

const CODER_DESKTOP_DOCS_URL = "https://coder.com/docs/user-guides/desktop";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this use our docs() helper?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm. I like this on main as its more likely to be up to date with the instructions from the individual clients (this isn't synced with Coder <-> Coder Desktop).

I can see why some feedback might be specific to a version and we could back date for said docs. Agent in progress...

Spying the whole window.navigator getter and spreading it dropped prototype getters (e.g. userAgent) that Storybook's client reads, crashing the story in a real browser. Spy the platform and maxTouchPoints getters individually so the rest of navigator stays intact.
@jakehwll
jakehwll merged commit 4d13bef into main Aug 19, 2026
30 checks passed
@jakehwll
jakehwll deleted the jakehwll/devex-722-add-install-coder-desktop-button-to-userdropdown branch August 19, 2026 02:11
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants