Repository navigation
Wait for Codex's live composer before pasting linked issue drafts - #25779
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe change adds a shared terminal escape scanner and uses it to detect Codex composer readiness from terminal output. Captured Codex transcripts and tests cover readiness signals and chunked input. Codex draft-paste flows now stop on readiness timeout without sending the draft, while other agents retain the process-ownership fallback. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Codex draft delivery no longer appears vulnerable to the previously reported control-string false-readiness path. The reviewed change is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change reduces unexpected draft delivery by waiting for the live composer and stopping on timeout. Remaining uncertainty concerns terminal-output ownership and reconnect behavior, rather than a demonstrated expansion of privileges. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
21f5973f-b4b8-46ba-a4ce-1dd572d52d47
📒 Files selected for processing (16)
src/main/runtime/__fixtures__/codex-fullscreen-custom-footer.meta.jsonsrc/main/runtime/__fixtures__/codex-fullscreen-custom-footer.txtsrc/main/runtime/__fixtures__/codex-fullscreen-early-input.meta.jsonsrc/main/runtime/__fixtures__/codex-fullscreen-early-input.txtsrc/main/runtime/__fixtures__/codex-fullscreen-startup.meta.jsonsrc/main/runtime/__fixtures__/codex-fullscreen-startup.txtsrc/main/runtime/codex-startup-paste-transcripts.test.tssrc/renderer/src/components/terminal-pane/pty-connection/pane-serializer-settle.tssrc/renderer/src/lib/agent-paste-draft.test.tssrc/renderer/src/lib/agent-paste-draft.tssrc/renderer/src/lib/startup-draft-input-kind.test.tssrc/shared/codex-composer-ready-scanner.test.tssrc/shared/codex-composer-ready-scanner.tssrc/shared/draft-paste-ready-scanner.tssrc/shared/opencode-agent-row-scanner.tssrc/shared/terminal-escape-scanner.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
b98cdaf to
f48b9e3
Compare
ELI5
When you launch Codex from a linked issue, Orca now waits until its input is ready before inserting the issue context. The draft stays editable, including when you start typing during startup.
What Changed
Previously, Orca treated Codex's first
›as ready, although the fullscreen loading screen already paints that prompt. It could also paste blindly after a timeout. The shared detector now waits for the reserved live footer row and visible input cursor after a completed render frame; punctuation in multiline input cannot impersonate that footer. Codex timeouts show the existing manual-paste notice and stop delivery, so a later redraw cannot unexpectedly insert the draft.Older inline Codex keeps its prompt detection. The terminal escape reader is reused from the OpenCode detector; terminal title payloads cannot impersonate painted input.
Why
The live composer is a stronger signal than a prompt glyph or a fixed delay. Codex 0.160.1 has no native draft-prefill flag, and its positional prompt submits immediately. This preserves editable issue context without adding polling or another process.
Linked Issue
Maintainer-requested fix; no pre-existing issue.
Visual Proof
The transcript tests compare the previous readiness point (prompt visible, footer absent) with the new point (live footer visible, completed frame). This screenshot pair shows those startup stages in a hidden Orca renderer running the final code; it does not claim to reproduce the intermittent previous input loss.
At the previous detector's readiness point, the prompt is present but the footer is absent. The new detector holds the issue draft while early typing remains visible:
After the live footer appears, the multiline context is inserted exactly once and remains editable alongside the early note:
Multiline Linear context remains editable in a git worktree with a single-item custom footer:
Testing
pnpm tc, the changed-file code-quality gate, andpnpm run build:electron-vite. Full CI passed before merge, including all five unit-test jobs, all four SSH/end-to-end jobs, typecheck/static analysis, packaging, native smoke tests, persistence, and Linux compatibility checks.Review
Self-review checked success, timeout, disposal, duplicate delivery, legacy Codex, and OpenCode parsing. Addressed CodeRabbit's control-string finding: OSC, DCS, SOS, PM, and APC payloads are ignored, including long payloads split across individual characters. Fixed two edge cases: disposal must not release a timed-out launch's delivery claim, and moving above multiline input must not let its punctuation impersonate the footer. Regression tests cover both; the disposal test was confirmed to fail with its fix removed, and a fresh real Codex capture reproduced the multiline false positive before its fix. No blocking findings remain.
The detector reads execution-host terminal output through the existing transport; it adds no local execution fallback, RPC fields, or stream opcodes. Other agents retain their existing timeout fallback. There are no platform-specific paths, shortcuts, shell commands, or git-provider assumptions. Memory is bounded; no new polling, subprocesses, or network requests. The existing notice is reused, and recorded transcripts were scanned for private identifiers. Pullfrog reviews are currently paused by the repository's
PULLFROG_PAUSEDsetting.Agent skill upstream boundary
Notes
Compared the new recordings against the base
b58f8197dc36serializer; the same cell-attribute differences occur in both builds, with no byte differences or new regressions. These recordings now participate in the existing serializer baseline checks.Rebased onto current
main. Also corrected one outdated file-explorer test assertion from the recently merged linked-directory reconciliation change: it now checks exactly two batch-wide cache scans (one index, one purge). The failure reproduced before this correction, and no file-explorer runtime code changes are included.Context can append after text already typed; this does not provide native prefill or guarantee context comes first. An unrecognized future fullscreen layout can time out and require manual paste instead of a blind late write. Older paired hosts keep their own existing detector until updated; no wire change is required.
Checklist