From dc7e8e9c5bc1b58cd2e44035dd8cda4213dc5aea Mon Sep 17 00:00:00 2001 From: "Rai (Michael Pokorny)" Date: Tue, 24 Jun 2025 22:06:45 -0700 Subject: [PATCH] wip --- .../tasks/34-set-shell-title-followup.md | 41 +++++++++++++++++++ .../tasks/35-tui-inspect-env-integration.md | 38 +++++++++++++++++ .../36-tests-interactive-prompt-execution.md | 36 ++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 agentydragon/tasks/34-set-shell-title-followup.md create mode 100644 agentydragon/tasks/35-tui-inspect-env-integration.md create mode 100644 agentydragon/tasks/36-tests-interactive-prompt-execution.md diff --git a/agentydragon/tasks/34-set-shell-title-followup.md b/agentydragon/tasks/34-set-shell-title-followup.md new file mode 100644 index 0000000000..d3877d2b6d --- /dev/null +++ b/agentydragon/tasks/34-set-shell-title-followup.md @@ -0,0 +1,41 @@ ++++ +id = "34" +title = "Complete Set Shell Title to Reflect Session Status" +status = "Not started" +dependencies = "08" +last_updated = "2025-06-25T04:45:29Z" ++++ + +> *This task is specific to codex-rs.* + +## Status + +**General Status**: Not started +**Summary**: Follow-up to Task 08; implementation missing for core title persistence and ANSI updates. + +## Goal + +Implement the missing pieces from Task 08 to fully support dynamic and persistent shell title updates: +1. Define `SessionUpdatedTitleEvent` and add a `title` field in `SessionConfiguredEvent` (core protocol). +2. Introduce `Op::SetTitle(String)` variant and handle it in the core agent loop, persisting the title and emitting the update event. +3. Update TUI and exec clients to listen for title events and emit ANSI escape sequences (`\x1b]0;\x07`) for live terminal title changes. +4. Restore the persisted title on session resume via `SessionConfiguredEvent`. + +## Acceptance Criteria + +- New `SessionUpdatedTitleEvent` type in `codex_core::protocol` and `title` field in `SessionConfiguredEvent`. +- `Op::SetTitle(String)` variant in the protocol and core event handling persisted in session metadata. +- Clients broadcast ANSI title-setting sequences on title events and lifecycle state changes. +- Unit tests for protocol serialization and client reaction to title updates. + +## Implementation + +**How it was implemented** +*(Not implemented yet)* + +**How it works** +*(Not implemented yet)* + +## Notes + +- Use ANSI escape code `\x1b]0;<title>\x07` for setting terminal title. diff --git a/agentydragon/tasks/35-tui-inspect-env-integration.md b/agentydragon/tasks/35-tui-inspect-env-integration.md new file mode 100644 index 0000000000..a84d466a55 --- /dev/null +++ b/agentydragon/tasks/35-tui-inspect-env-integration.md @@ -0,0 +1,38 @@ ++++ +id = "35" +title = "TUI Integration for Inspect-Env Command" +status = "Not started" +dependencies = "10" +last_updated = "2025-06-25T04:45:29Z" ++++ + +> *This task is specific to codex-rs.* + +## Status + +**General Status**: Not started +**Summary**: Follow-up to Task 10; add slash-command and TUI bindings for `inspect-env`. + +## Goal + +Add an `/inspect-env` slash-command in the TUI that invokes the existing `codex inspect-env` logic to display sandbox state inline. + +## Acceptance Criteria + +- Extend `SlashCommand` enum to include `InspectEnv`. +- Dispatch `AppEvent::InlineInspectEnv` when `/inspect-env` is entered. +- Handle `InlineInspectEnv` in `app.rs` to run `inspect-env` logic and stream its output to the TUI log pane. +- Render mounts, permissions, and network status in a formatted table or tree view in the bottom pane. +- Unit/integration tests simulating slash-command invocation and verifying rendered output. + +## Implementation + +**How it was implemented** +*(Not implemented yet)* + +**How it works** +*(Not implemented yet)* + +## Notes + +- Reuse formatting code from `cli/src/inspect_env.rs` for consistency. diff --git a/agentydragon/tasks/36-tests-interactive-prompt-execution.md b/agentydragon/tasks/36-tests-interactive-prompt-execution.md new file mode 100644 index 0000000000..40eb40a6fa --- /dev/null +++ b/agentydragon/tasks/36-tests-interactive-prompt-execution.md @@ -0,0 +1,36 @@ ++++ +id = "36" +title = "Add Tests for Interactive Prompting While Executing" +status = "Not started" +dependencies = "13" +last_updated = "2025-06-25T04:45:29Z" ++++ + +> *This task is specific to codex-rs.* + +## Status + +**General Status**: Not started +**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_view` remains a `StatusIndicatorView` while running and is removed when `set_task_running(false)` is called. +- Coverage of redraw requests and correct `InputResult` values. + +## Implementation + +**How it was implemented** +*(Not implemented yet)* + +**How it works** +*(Not implemented yet)* + +## Notes + +- Refer to existing tests in `user_approval_widget.rs` and `set_title_view.rs` for testing patterns.