fix(tui-e2e): Make E2E snapshot tests more resilient to scroll timing#64
Merged
Conversation
Implements the minimal-footprint approval bridging between ACP permission requests and Codex approval system: - Add ApprovalRequest type bundling translated event with response channel - Translate ACP RequestPermissionRequest to Codex ExecApprovalRequestEvent - Translate Codex ReviewDecision back to ACP RequestPermissionOutcome - Expose approval receiver via AcpConnection::take_approval_receiver() - Fall back to auto-approve if channel closed, deny if response dropped - Add placeholder comments for future: history persistence, export, resume This enables the TUI to receive approval requests and respond to them without modifying codex-core.
The TUI E2E tests were flaky due to terminal viewport scroll timing causing the startup header to sometimes be present and sometimes not in snapshots. This made tests non-deterministic. Changes: - Add normalize_for_input_snapshot() function that strips the startup header block (both boxed and plain text forms) for consistent snapshots - Update all E2E tests to use the new normalization function - Regenerate all snapshots without header content for determinism - Keep original normalize_for_snapshot() for cases where header content needs to be tested explicitly The header is detected by looking for box characters, To get started, or Welcome to Codex, then stripping everything up to and including the /review command line.
e721d3d to
cb54732
Compare
Remove ACP-specific types and event handling from protocol and UI layers as part of the ongoing effort to rebuild ACP integration without tight coupling to codex-core's HTTP model handling. Changes: - Remove WireApi::Acp variant (only Chat and Responses remain) - Remove AcpEventMsg, AcpToolCallEventMsg, and related types from protocol - Remove ACP event handling from TUI, exec, and MCP server - Remove codex-acp dependency from codex-core - Update docs.md files to reflect the decoupled architecture 🤖 Generated with [Nori](https://nori.ai) Co-Authored-By: Nori <contact@tilework.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
normalize_for_input_snapshot()function that strips the startup header block for consistent snapshots regardless of terminal scroll stateProblem
The TUI E2E tests were flaky due to terminal viewport scroll timing causing the startup header to sometimes be present and sometimes not in snapshots. This made tests non-deterministic and caused intermittent CI failures.
Solution
The header can appear in two forms:
╭──borderThe new
normalize_for_input_snapshot()function detects either form and strips everything up to and including the/reviewcommand line. The originalnormalize_for_snapshot()is kept for cases where header content needs to be tested explicitly.Test plan