Skip to content

feat(codex): activate WebSocket transport via provider settings - #1967

Draft
WebMad wants to merge 1 commit into
Zoo-Code-Org:mainfrom
WebMad:experiment/codex-websocket-activation
Draft

WebMad wants to merge 1 commit into
Zoo-Code-Org:mainfrom
WebMad:experiment/codex-websocket-activation

Conversation

@WebMad

@WebMad WebMad commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Related GitHub Issue

Related to #1963. UI follow-up #1965 closes the feature issue once all parts are merged.

Dependencies and merge order

Depends on transport #1964 and reasoning-history fix #1966. Those two PRs can be reviewed and merged independently. Merge both first, then update this branch from the main branch before merging this PR. UI #1965 follows this activation PR.

This PR is a draft while the dependencies are outstanding. It intentionally contains only the activation changes, not copies of either prerequisite. Standalone type/build/test checks can fail until the transport dependency is present on the base branch.

Description

The provider-activation portion extracted from the original #1964: 9 files, 216 added / 9 removed lines.

  • Define the optional per-profile WebSocket preference and shared off-by-default constant in packages/types, including both schema exports and validation tests.
  • Add profile persistence/import/export coverage in ProviderSettingsManager.spec.ts.
  • Add storage-to-extension/webview round-trip coverage in ClineProvider.spec.ts.
  • Activate the dedicated transport lazily from openai-codex.ts only when the saved preference is enabled.
  • Reset continuation when previous-response reuse is suppressed; pass authenticated headers, cancellation, and deadlines to the transport.
  • Preserve HTTP streaming when the preference is off or unset. Permit HTTP fallback only for a failed WebSocket upgrade; do not replay a request after an ambiguous send failure.
  • Include focused provider routing/fallback regression tests and the associated reduction in existing ESLint suppression counts.

There are no transport implementation, transport dependency, reasoning-history, or UI changes here. The nine files are byte-for-byte identical to their original unsplit versions. All three backend PRs and UI #1965 together reproduce the original Git tree exactly.

Test Procedure

Because this PR requires its prerequisites, validation was run against the verified combined backend state:

  • 176 transport/provider/native tool-call tests passed across 12 suites.
  • 88 provider-setting schema tests passed.
  • 306 persistence, extension-state, context, and reasoning-history tests passed across four suites.
  • Shared-types and extension type checks passed.
  • Focused activation and schema ESLint checks passed with no suppression-count increases.

Total combined backend validation: 570 tests passed. The separate transport-only state also passed 170 API tests and the repository-wide unused-code gate; the isolated reasoning fix passed nine tests.

With UI #1965 present, its 18 focused tests and webview type check also passed. Standalone CI for this draft is not claimed until both prerequisites merge and this branch is updated.

Manual verification after the UI is also applied:

  1. Sign in to OpenAI Codex with a ChatGPT subscription, enable Use WebSocket, and click Save.
  2. Verify WebSocket streaming, follow-up continuation, and normal text/reasoning/tool/usage handling.
  3. Cancel a request or edit/compact history and verify safe full-context handling.
  4. Disable the preference and Save; verify existing HTTP streaming.
  5. Switch/export/import provider profiles and verify that the saved preference survives.

Local validation used Node 24.7.0 / pnpm 10.8.1; the repository requests Node 22.23.1.

Pre-Submission Checklist

  • Scope: Shared setting, persistence contract, and provider activation only.
  • Self-Review: Exact preservation and nonoverlapping scope verified.
  • Testing: Focused regression validation passed with prerequisites present.
  • Visual Snapshot: Not applicable; UI changes and baselines are in feat(codex): add WebSocket settings UI #1965.
  • Documentation Impact: Provider documentation should describe the opt-in setting when the full feature is released; documentation files remain outside these PRs.

No changeset or changelog entry is included.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review-active

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 61f487f6-18c8-4e57-b029-6046a012e7a1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Review status

Thanks for contributing. This comment tracks the review sequence and the next action.

Current step: Fix the failing required CI checks; awaiting-maintainer requires CI and automated review completion.

Review-state labels are managed by this workflow; do not edit them manually. community-approved is managed the same way — do not add or remove it manually. It signals a fresh community code approval for the current head as an advisory priority only; maintainer review is still required.

This branch has not been deployed

No deployments
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