mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
1.7 KiB
1.7 KiB
+++ id = "36" title = "Add Tests for Interactive Prompting While Executing" status = "Not started" dependencies = "06,13" # Rationale: depends on Tasks 06 and 13 for external editor and interactive prompt support last_updated = "2025-06-25T11:05:55Z" +++
This task is specific to codex-rs.
Status
General Status: Done
Summary: Follow-up to Task 13; add unit tests for interactive prompt overlay during execution.
Goal
Write tests that verify BottomPane::handle_key_event forwards input to the composer while is_task_running, preserving the status overlay until completion.
Acceptance Criteria
- Unit tests covering key events (e.g. alphanumeric, Enter) during
is_task_running == true. - Assertions that
active_viewremains aStatusIndicatorViewwhile running and is removed whenset_task_running(false)is called. - Coverage of redraw requests and correct
InputResultvalues.
Implementation
Planned Approach
- Use existing
make_paneandmake_pane_and_rxhelpers to create aBottomPanein a running-task state. - Write unit tests in
tui/src/bottom_pane/mod.rsthat verify:- Typing alphanumeric characters while
is_task_running == trueappends to the composer, maintains theStatusIndicatorViewoverlay, and emits aAppEvent::Redraw. - Pressing Enter returns
InputResult::Submittedwith the buffered text, clears the composer, retains the overlay, and triggers a redraw. - Calling
set_task_running(false)removes the status indicator overlay.
- Typing alphanumeric characters while
- Follow existing patterns from the tests in
user_approval_widget.rsandset_title_view.rs.
Notes
- Refer to existing tests in
user_approval_widget.rsandset_title_view.rsfor testing patterns.