Skip to content

Conversation

@kylecarbs
Copy link
Member

Overview

Comprehensive rename from cmux to mux across the entire codebase (113 files changed).

Core Changes

Directory Migration (~50 LoC)

Added ensureMuxMigration() to automatically migrate ~/.cmux → ~/.mux on first launch:

  • Creates backward-compatible symlink ~/.cmux → ~/.mux
  • Called early in app startup (main-desktop.ts)
  • Ensures seamless upgrade with no user intervention

Constants & Paths

  • Renamed all path functions: getCmuxHome() → getMuxHome(), etc.
  • Updated base directory: .cmux → .mux
  • Updated environment variables: MUX_TEST_ROOT, MUX_DEVSERVER_PORT, etc.

Configuration

  • appId: com.cmux.app → com.mux.app (clean break)
  • productName: cmux → mux
  • package.json: Updated description
  • Repository URLs: Kept as github.com/coder/cmux (will update when repo renamed)
  • Docs domain: Kept as cmux.io (unchanged for now)

Storage Keys (with migration)

  • mux_telemetry_enabled (auto-migrates from cmux_telemetry_enabled)
  • mux_first_launch_complete (auto-migrates from cmux_first_launch_complete)
  • Both check legacy keys and migrate on first access

Benchmarks

Renamed files using git mv to preserve history:

  • cmux_agent.py → mux_agent.py
  • cmux_agent_test.py → mux_agent_test.py
  • cmux_payload.py → mux_payload.py
  • cmux-run.sh → mux-run.sh
  • cmux_setup.sh.j2 → mux_setup.sh.j2

Updated Python classes: CmuxAgent → MuxAgent, CmuxPayload → MuxPayload

Documentation

  • Updated all markdown files in docs/
  • Updated book.toml title
  • GitHub Actions: setup-cmux → setup-mux
  • Updated workflow files

Source Code

  • Function calls, comments, strings in ~112 files
  • UI strings: "Generated with cmux" → "Generated with mux"
  • Log messages, error strings, test assertions

Migration Behavior

Upgrading users:

  1. ~/.cmux automatically moved to ~/.mux on first launch
  2. Symlink ~/.cmux → ~/.mux created for backward compatibility
  3. localStorage keys migrated automatically
  4. No data loss, no manual steps required

Fresh installs:

  • Creates ~/.mux directly (no migration needed)

What Stays Unchanged

  • GitHub repository URLs (github.com/coder/cmux) - will update when repo renamed
  • Documentation domain (cmux.io) - keeping for now
  • VS Code extension - excluded from this PR (separate update later)

Testing

make typecheck passes

  • Need to verify:
    • Integration tests pass
    • App builds and starts correctly
    • Migration works for existing users

Generated with mux

Comprehensive rename from cmux to mux across the entire codebase.

## Core Changes

### Directory Migration
- Added `ensureMuxMigration()` to automatically migrate ~/.cmux → ~/.mux
- Creates backward-compatible symlink ~/.cmux → ~/.mux
- Called early in app startup to ensure seamless upgrade

### Constants & Paths
- Renamed all path functions: getCmuxHome() → getMuxHome(), etc.
- Updated base directory: .cmux → .mux
- Updated environment variables: MUX_TEST_ROOT, MUX_DEVSERVER_PORT, etc.

### Configuration
- Changed appId: com.cmux.app → com.mux.app (clean break)
- Changed productName: cmux → mux
- Updated package.json description
- Kept repository URLs as github.com/coder/cmux (unchanged per plan)
- Kept docs domain as cmux.io (unchanged per plan)

### Storage Keys (with migration)
- mux_telemetry_enabled (migrates from cmux_telemetry_enabled)
- mux_first_launch_complete (migrates from cmux_first_launch_complete)
- Both keys check legacy values and migrate automatically

### Benchmarks
- Renamed files: cmux_agent.py → mux_agent.py, etc.
- Updated Python classes: CmuxAgent → MuxAgent, CmuxPayload → MuxPayload
- Updated shell scripts and Jinja2 templates

### Documentation
- Updated all markdown files in docs/
- Updated book.toml title
- Updated GitHub Actions: setup-cmux → setup-mux
- Updated workflow files to use new action name

### Source Code
- Updated ~112 files with function calls, comments, strings
- Updated UI strings: "Generated with cmux" → "Generated with mux"
- Updated log messages and error strings
- Updated test files and assertions

## Backward Compatibility

Users upgrading from previous versions will:
1. Have ~/.cmux automatically moved to ~/.mux on first launch
2. Get symlink ~/.cmux → ~/.mux for old tools/scripts
3. Have localStorage keys migrated automatically
4. Experience no data loss or manual intervention needed

## VS Code Extension

Excluded from this PR - will be updated in separate PR later.

## What Stays Unchanged

- GitHub repository URLs (github.com/coder/cmux) - will update when repo renamed
- Documentation domain (cmux.io) - keeping for now
- VS Code extension references - separate PR

_Generated with `mux`_
The repository is still at coder/cmux, so scripts should reference that.
Should be coder/cmux not coder/mux in the GraphQL query.
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

https://github.com/coder/cmux/blob/e80177fa2d9ffe238ef6f09f9957c18b68a95c11/benchmarks/terminal_bench/mux_agent.py#L24-L25
P0 Badge Update mux benchmark agent to reference renamed assets

The new Terminal‑Bench adapter still hardcodes cmux file names (_ARCHIVE_NAME = cmux-app.tar.gz, _RUNNER_NAME = cmux-run.sh). Those files were renamed to mux-app.tar.gz and mux-run.sh in this commit, so MuxAgent now raises RuntimeError during initialization because cmux-run.sh no longer exists and the staged tarball is copied under a name the setup script does not extract. The agent will fail before any benchmark runs. These constants should be updated to the new mux-* names (and the template path below) so the runner and archive can be located.


https://github.com/coder/cmux/blob/e80177fa2d9ffe238ef6f09f9957c18b68a95c11/benchmarks/terminal_bench/mux_agent.py#L52-L56
P1 Badge Align mux agent env names with mux-run.sh

The adapter still collects and defaults environment variables under the CMUX_* prefix (e.g. CMUX_MODEL, CMUX_TRUNK). However the new mux-run.sh script introduced in this change reads MUX_MODEL, MUX_TRUNK, etc. As a result, constructor arguments like model_name or any CMUX_* variables set by tests/users are not exposed to the runner and the script silently falls back to its defaults. This means configuration knobs such as model selection, project path or timeouts can no longer be overridden. The env keys generated here should be renamed to MUX_* to match the runner.

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

VS Code extension is excluded from this rename (separate PR later), so keep
references to cmux-*.vsix in workflows.
- Fixed splitAbbreviatedPath tests to use 'mux' instead of 'cmux'
- Updated systemMessage comments to reference ~/.mux not ~/.cmux
- Ran make fmt to fix formatting issues
- Resolved conflicts in paths.ts
- Updated MUX_TEST_ROOT → MUX_ROOT to match main branch changes
The globalDir in systemMessage tests was still using .cmux, which caused
the global mode section fallback test to fail.
- Changed .cmux/init → .mux/init in runtime code
- Fixed test to use cmuxMetadata instead of muxMetadata (field name preserved for backward compat)
The init hook path functions were still using .cmux instead of .mux,
causing init hooks to not be found during workspace creation.
- Renamed function for clarity
- Added migration call to main-server.ts startup
- Updated main-server.ts comments and command name
@kylecarbs kylecarbs merged commit c817e7d into main Nov 13, 2025
16 checks passed
@kylecarbs kylecarbs deleted the rename-to-mux branch November 13, 2025 17:27
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