Skip to content

fix: repair Windows portable launch and manager activation#1482

Open
chrichuang218 wants to merge 1 commit into
BigPizzaV3:mainfrom
chrichuang218:codex/fix-windows-portable-launch
Open

fix: repair Windows portable launch and manager activation#1482
chrichuang218 wants to merge 1 commit into
BigPizzaV3:mainfrom
chrichuang218:codex/fix-windows-portable-launch

Conversation

@chrichuang218

Copy link
Copy Markdown

Summary

  • prefer ChatGPT.exe over the Codex.exe shim in standalone/portable Windows bundles
  • detect portable Codex versions from numeric version directories, resolved current links, and version files
  • restore and focus the existing manager window when the management shortcut is launched again
  • rank the Tauri main window above tray, Tao, and IME helper windows during Windows activation

Root cause

Recent portable Codex desktop bundles can contain both Codex.exe and ChatGPT.exe. The former behaves as a shim and does not preserve the Chromium remote-debugging arguments required by Codex++, so the helper starts while CDP remains unavailable.

The manager also returned immediately on a single-instance guard conflict without activating the existing window. When hidden to the tray, generic window enumeration could target helper or IME windows instead of the Tauri main window.

Impact

Portable Windows installations launch the actual Codex desktop process with CDP enabled, report a meaningful version, and allow users to reopen a hidden manager through the desktop shortcut.

Validation

  • cargo fmt --check
  • cargo test --all-features
  • cargo test -p codex-plus-core windows_integration::tests::application_window_outranks_titled_ime_and_tool_windows -- --exact
  • cargo test -p codex-plus-core --test launcher app_paths (22 passed)
  • cargo test -p codex-plus-manager --test windows_subsystem (22 passed)
  • runtime differential: Codex.exe did not expose CDP; ChatGPT.exe did
  • runtime manager check: hidden window restored through the desktop shortcut while retaining one manager process

cargo clippy --all-targets --all-features -- -D warnings still reports 96 pre-existing warnings across the upstream baseline; no unrelated Clippy cleanup is included here.

Fixes #1481
Fixes #1187

Prefer the real ChatGPT desktop entrypoint for portable bundles, improve portable version detection, and restore the existing manager window when its shortcut is launched again.\n\nAdds regression coverage for portable paths and Windows main-window selection.\n\nRefs BigPizzaV3#1481 and BigPizzaV3#1187.
@chrichuang218 chrichuang218 marked this pull request as ready for review July 14, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants