Skip to content

Conversation

@ethanndickson
Copy link
Member

Summary

Adds Coder as a dedicated runtime button in the UI (alongside Local, Worktree, SSH, Docker, Devcontainer), removing the old "Use Coder Workspace" checkbox from the SSH flow. No backend/IPC changes—Coder remains mapped internally to SSH mode with coder config.

Background

Users asked for Coder to be a first-class runtime choice rather than a hidden checkbox within SSH settings. This aligns Coder UX with devcontainer: the button only renders once CLI availability is confirmed (no flash), and is disabled in non-git projects.

Implementation

  • RuntimeChoice type: Union of RuntimeMode | "coder" for UI-only representation
  • resolveCoderAvailability helper: Centralizes CLI state logic (loading/outdated/unavailable/available); only available shows the button
  • Split CoderControls: New exports CoderAvailabilityMessage, CoderEnableToggle, CoderWorkspaceForm for flexible rendering
  • RuntimeButtonGroup: Coder button disabled when worktree unavailable (non-git); tooltip includes "Default for project" checkbox (maps to RuntimeMode.SSH)
  • Persistence: CODER_RUNTIME_PLACEHOLDER excluded from lastSshHost; Coder config persists separately

Files changed:

  • src/browser/utils/runtimeUi.ts — Coder UI metadata
  • src/browser/components/ChatInput/CoderControls.tsx — Split components + availability helper
  • src/browser/components/ChatInput/CreationControls.tsx — Coder button in RuntimeButtonGroup
  • src/browser/components/ChatInput/index.tsx — Coder config change handling
  • src/browser/hooks/useDraftWorkspaceSettings.ts — Placeholder exclusion
  • docs/runtime/coder.mdx — Updated instructions

Validation

  • Verified Coder button hidden until CLI available (no flash)
  • Verified Coder disabled in non-git projects with correct tooltip reason
  • Verified "Default for project" checkbox works and persists as SSH default
  • make typecheck and make lint pass

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high • Cost: $20.36

Copy link

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

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: d4148fe23e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- Add Coder runtime choice in UI (maps to SSH + coder config internally)
- Remove 'Use Coder Workspace' checkbox from SSH flow
- Coder button only renders when CLI is confirmed available (no flash)
- Disable Coder button in non-git projects (same as worktree)
- Add 'Default for project' checkbox to Coder tooltip (maps to SSH)
- Split CoderControls into reusable components (availability message, form)
- Add resolveCoderAvailability helper for consistent availability logic
- Avoid persisting CODER_RUNTIME_PLACEHOLDER as last SSH host
- Make Coder a first-class UI choice while keeping it SSH under the hood
- Fix default runtime checkbox to persist Coder config correctly
- Add SshRuntimeConfig helper to consolidate coderEnabled/coderConfig fields
- Simplify CreationControls runtime button state resolution
- Remove verbose RUNTIME_AVAILABILITY_KEY map in favor of inline ternary
@ethanndickson
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- Fix storybook tests to use new Coder button pattern (not SSH→checkbox)
- Extract RuntimeConfigInput component for SSH host/Docker image inputs
- Extract CredentialSharingCheckbox component for Docker/Devcontainer
- Extract hasTemplateDuplicateName helper to consolidate 3 duplicate checks
- Update story descriptions to match new UI behavior
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.

1 participant