Skip to content

Fix Codex backend switching on plan approval - #18

Merged
figassis merged 1 commit into
mainfrom
fix/codex-plan-yolo-backend
Oct 4, 2026
Merged

figassis merged 1 commit into
mainfrom
fix/codex-plan-yolo-backend

Conversation

@figassis

@figassis figassis commented Oct 3, 2026 •

Copy link
Copy Markdown

Summary

  • preserve the active backend for persisted and streaming plan approvals
  • capture the backend with the approved session so session switches cannot change the pending send
  • add a regression covering a Codex YOLO approval with a dynamic model while the active backend changes during persistence

Verification

  • bunx vitest run src/components/chat/hooks/useMessageHandlers.test.tsx
  • bun run typecheck
  • bun run lint
  • bunx vitest run --testTimeout=10000 (413 files, 2,877 tests)
  • make docker-build (jean:dev)
  • agent-browser smoke test of the built image at 1440×1000

Summary by CodeRabbit

  • Bug Fixes
    • Plan-approval messages now use the selected backend for both build and yolo execution, even if the selection changes while approval is being saved.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a746a29-24fa-4d28-afeb-c25d6f5dd512
📥 Commits

Reviewing files that changed from the base of the PR and between e31c0fe and e9dd98f.

📒 Files selected for processing (3)
  • .ai/todo.md
  • src/components/chat/hooks/useMessageHandlers.test.tsx
  • src/components/chat/hooks/useMessageHandlers.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

Plan-approval messages now pass the selected session backend through persisted and streaming build and yolo paths. A regression test checks the backend passed to a yolo-mode send after the selected backend changes during persistence.

Changes

Plan approval backend

Layer / File(s) Summary
Pass backend through approval messages
src/components/chat/hooks/useMessageHandlers.ts
Persisted and streaming build and yolo plan-approval messages now pass the selected session backend.
Test backend selection during approval
src/components/chat/hooks/useMessageHandlers.test.tsx, .ai/todo.md
The regression test delays persistence, changes the selected backend from Codex to Claude, and checks that the send call uses the Codex backend. The notes record validation and review results.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: andrasbacsai

Merge Risk: ⚪ Minimal · up to e9dd9

The tested approval flow preserves the backend across a session switch; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: preserving the Codex backend when a plan is approved.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

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.

@figassis
figassis merged commit c76d580 into main Oct 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant