Skip to content

migration/phase 1 rename#607

Open
STIFLEUR390 wants to merge 5 commits into
Dimillian:mainfrom
STIFLEUR390:migration/phase-1-rename
Open

migration/phase 1 rename#607
STIFLEUR390 wants to merge 5 commits into
Dimillian:mainfrom
STIFLEUR390:migration/phase-1-rename

Conversation

@STIFLEUR390
Copy link
Copy Markdown

  • docs: add migration-plan and reference files for Codex-to-OpenCode migration
  • refactor(project): rename codex to opencode across the entire codebase

…gration

Create 11-file migration plan in migration-plan/ covering architecture comparison, rename patterns, Rust backend, frontend, config adaptation, daemon RPC, docs/scripts/CI, optimizations, testing strategy, and execution order. Add opencode_ai_llms.txt and developers_openai_codex_llms.txt as reference context files.
Rename all files, modules, types, functions, JSON-RPC methods,
environment variables, and package identifiers from 'codex' to
'opencode' to reflect the rebranding from Codex to OpenCode.
Copy link
Copy Markdown

@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: 2739ed7923

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

Comment thread src-tauri/src/lib.rs Outdated
Comment on lines +194 to +195
codex::opencode_doctor,
codex::opencode_update,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Point the invoke handlers at the renamed module

After this rename the crate declares mod opencode instead of mod codex, but the invoke handler still registers commands through codex::... here and throughout the same list. In any Rust/Tauri build this resolves to a missing module before the app can start; these handlers need to reference the renamed opencode module.

Useful? React with 👍 / 👎.

Comment thread src-tauri/src/backend/app_server.rs Outdated
Comment on lines 760 to 764
let mut command = build_codex_command_with_bin(
codex_bin,
codex_args.as_deref(),
opencode_bin,
opencode_args.as_deref(),
vec!["app-server".to_string()],
)?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not launch OpenCode with Codex's app-server subcommand

With the default binary changed to opencode, every workspace connection now spawns opencode app-server. I checked the OpenCode CLI docs included in opencode_ai_llms.txt:221-229, which documents the headless/API command as opencode serve, not app-server; for users without a custom Codex binary override this child process exits immediately and no workspace can connect.

Useful? React with 👍 / 👎.

Comment on lines 83 to 85
pub(crate) fn config_toml_path() -> Option<PathBuf> {
resolve_default_codex_home().map(|home| home.join("config.toml"))
resolve_default_opencode_home().map(|home| home.join("config.toml"))
}
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 Use OpenCode's config file instead of config.toml

This renamed settings path still opens config.toml under the resolved home, but the migration map added in this commit says ~/.codex/config.toml becomes ~/.config/opencode/opencode.json (migration-plan/03-rename-patterns.md:35-37). In normal OpenCode setups the Settings editor and feature-flag reads/writes will therefore create or modify the old Codex TOML file instead of the active OpenCode JSON config.

Useful? React with 👍 / 👎.

Phase 1 of the Codex-to-OpenCode migration. All lexical references to
"codex" in source code, error messages, config paths, test data, and
file names are renamed to "opencode". The default home directory changes
from `~/.codex/` to `~/.config/opencode/`. The daemon RPC module is
renamed from `rpc/codex.rs` to `rpc/opencode.rs`.

This is a surface-level rename only — the actual protocol, binary
spawning, and config format remain unchanged (Phases 2-3).
Copy link
Copy Markdown

@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

} else if npm_has_package("@openai/codex").await? {
let (ok, output) = run_npm_install_latest("@openai/codex").await?;

P2 Badge Upgrade the OpenCode npm package

When OpenCode was installed via npm, this branch checks for and upgrades @openai/codex, so a normal npm install of OpenCode either falls through to unknown or updates the wrong CLI. The bundled OpenCode docs in opencode_ai_llms.txt list the global npm install as npm install -g opencode-ai, so the updater should detect and install that package instead.

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

const DEFAULT_LISTEN_ADDR: &str = "0.0.0.0:4732";
const REMOTE_TOKEN_PLACEHOLDER: &str = "<remote-backend-token>";
const APP_IDENTIFIER: &str = "com.dimillian.codexmonitor";
const APP_IDENTIFIER: &str = "com.dimillian.opencode-monitor";
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 Align daemonctl with the Tauri app data identifier

When opencode-monitor-daemonctl is run without --data-dir, default_app_data_dir() uses this identifier to find settings.json and workspaces.json. This new value has a hyphen, while the Tauri app identifier is com.dimillian.opencodemonitor in src-tauri/tauri.conf.json, so the standalone daemonctl points at a sibling empty app-data directory and misses the configured remote token/host/workspaces.

Useful? React with 👍 / 👎.

Rename all remaining CodexMonitor, codex_monitor, CODEX_HOME
references across Rust backend, TypeScript frontend, docs, CI,
and scripts. Update default agent model to opencode-go/deepseek-v4-flash,
rename storage keys (STORAGE_KEY_THREAD_CODEX_PARAMS), fix test data,
and update documentation files.

44 files changed, 278 insertions(+), 306 deletions(-)
Copy link
Copy Markdown

@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: 33e24926ee

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

@@ -64,37 +64,25 @@ jobs:
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" "$KEYCHAIN"

- name: Configure notarytool credentials
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore notary credential setup

In the build_macos workflow, this step was reduced to a name-only no-op, but the later notarization step still runs xcrun notarytool submit ... --keychain-profile "$NOTARY_PROFILE_NAME". On a clean GitHub runner that profile is only created by the removed notarytool store-credentials command, so macOS releases will fail at notarization before any artifacts are uploaded.

Useful? React with 👍 / 👎.

Comment thread src-tauri/tauri.conf.json
"productName": "OpenCode Monitor",
"version": "0.7.68",
"identifier": "com.dimillian.codexmonitor",
"identifier": "com.dimillian.opencodemonitor",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Migrate the old app data directory before changing identifiers

Changing the Tauri identifier moves app.path().app_data_dir() to a new per-app directory, while AppState::load still reads workspaces.json and settings.json only from that directory. Existing Codex Monitor users upgrading in place will therefore start with empty workspaces/settings because nothing copies data from com.dimillian.codexmonitor before switching to com.dimillian.opencodemonitor.

Useful? React with 👍 / 👎.


git checkout -b "chore/bump-version-${NEXT_VERSION}"
git add package.json package-lock.json src-tauri/Cargo.toml src-tauri/Cargo.lock src-tauri/tauri.conf.json src-tauri/gen/apple/codex-monitor_iOS/Info.plist
git add package.json package-lock.json src-tauri/Cargo.toml src-tauri/Cargo.lock src-tauri/tauri.conf.json src-tauri/gen/apple/opencode-monitor_iOS/Info.plist
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 Close the Python heredoc before running git commands

In the Bump version and open PR step, the python3 - <<PY block above this line is never terminated before the shell commands resume, so git add ... is fed to Python and the workflow fails with a syntax error instead of creating the version-bump PR.

Useful? React with 👍 / 👎.

git add package.json package-lock.json src-tauri/Cargo.toml src-tauri/Cargo.lock src-tauri/tauri.conf.json src-tauri/gen/apple/codex-monitor_iOS/Info.plist
git add package.json package-lock.json src-tauri/Cargo.toml src-tauri/Cargo.lock src-tauri/tauri.conf.json src-tauri/gen/apple/opencode-monitor_iOS/Info.plist
git commit -m "chore: bump version to ${NEXT_VERSION}"
git push origin "chore/bump-version-${NEXT_VERSION}"
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 Recreate the bump branch before pushing it

This push names chore/bump-version-${NEXT_VERSION} as the source ref, but the commit was made on the checkout branch because the preceding git checkout -b ... was removed. After the heredoc issue is fixed, this still fails with a missing local ref instead of pushing the bump branch for the PR.

Useful? React with 👍 / 👎.

…upport files

Rename Xcode project directory, iOS target, entitlements, Info.plist,
and scheme files from codex-monitor to opencode-monitor. Update
project.yml, flake.nix package names, environment name, and
developers reference doc. All remaining legacy references migrated.
Copy link
Copy Markdown

@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: 2686e343eb

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

Comment thread src-tauri/src/types.rs
Comment on lines +380 to +383
#[serde(default, rename = "opencodeBin")]
pub(crate) opencode_bin: Option<String>,
#[serde(default, rename = "opencodeArgs")]
pub(crate) opencode_args: Option<String>,
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 Add aliases for migrated Codex settings

When an existing settings.json is migrated into the new app data directory, it will still contain the old codexBin/codexArgs keys, but these fields now deserialize only opencodeBin/opencodeArgs. In that upgrade path users who configured a custom CLI path or default args silently fall back to the default opencode command with no args; add serde aliases or an explicit migration before dropping the old names.

Useful? React with 👍 / 👎.

Comment on lines +3 to +7
const STORAGE_KEY_THREAD_ACTIVITY = "opencodemonitor.threadLastUserActivity";
export const STORAGE_KEY_PINNED_THREADS = "opencodemonitor.pinnedThreads";
export const STORAGE_KEY_CUSTOM_NAMES = "opencodemonitor.threadCustomNames";
export const STORAGE_KEY_THREAD_OPENCODE_PARAMS = "opencodemonitor.threadOpenCodeParams";
export const STORAGE_KEY_DETACHED_REVIEW_LINKS = "opencodemonitor.detachedReviewLinks";
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 Migrate existing thread storage keys

For users whose webview storage is carried forward during the rename, these new localStorage keys make all existing codexmonitor.* thread state unreadable, so pins, custom names, last activity, detached review links, and per-thread parameter overrides disappear on first launch. Add a fallback/migration from the old keys (and the old codexArgsOverride payload field for params) before saving only the new names.

Useful? React with 👍 / 👎.

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