Add CDP controls to settings#10
Conversation
Co-authored-by: Codex <noreply@openai.com>
|
thanks for the PR's! give me an hour to get back to the office and i'll review/merge them |
|
hey, good feature idea but a few things before i can merge:
|
What this does
Adds first-class Chrome DevTools Protocol controls to the Codex++ settings UI.
The new settings card shows:
/json/listand/json/versionendpoints when CDP is active9222, beta falls back to9223The main process now persists CDP settings, resolves startup CDP from argv/env/config, exposes status over IPC, and only opens local CDP URLs for
/json/listand/json/version.Why this is needed
CDP is central to live debugging Codex.app when in-window DevTools are disabled, but previously it was an env/launch-arg trick with no visible state. Stable and beta are commonly run together, so the UI needs to make ports, launch commands, and restart/session state explicit.
How this was proven
Branch-local checks:
npm run buildpassed in/Users/af/codex-plusplus-prs/cdp-settings.npx tsc -p packages/runtime/tsconfig.json --noEmitpassed after SDK build.npm testpassed in/Users/af/codex-plusplus-prs/cdp-settings: 80 tests passed.Integrated installed-app smoke after rebuilding and repairing both apps:
/Applications/Codex.appand/Applications/Codex (Beta).appwithnode packages/installer/dist/cli.js repair --force --quiet.--remote-debugging-port=9222;http://127.0.0.1:9222/json/versionreturned Electron/Chrome version metadata.--remote-debugging-port=9223;http://127.0.0.1:9223/json/versionreturned Electron/Chrome version metadata.Developer / CDP,Active on 127.0.0.1:9222 from launch arg, endpointhttp://127.0.0.1:9222/json/list, and no restart note.Developer / CDP,Active on 127.0.0.1:9223 from launch arg, endpointhttp://127.0.0.1:9223/json/list, and a secondary restart note for its saved-port mismatch.Screenshots / Visual Proof
Local proof artifact captured during the installed-app smoke:
/tmp/codexpp-cdp-settings-qa.png- stable Codex++ settings showing the Developer / CDP card active on9222.Risk / Rollout
This touches startup command-line handling and settings IPC. Existing env behavior still works via
CODEXPP_REMOTE_DEBUG=1; explicit--remote-debugging-portremains authoritative. Saved settings only affect future launches because Chromium requires the switch before app ready.