feat(app): support additional agent approval dialogs - #68
Conversation
Prevent supported command and question menus from stalling opted-in agent sessions. Confirm the selected one-time approval or recommended answer with Enter, and rescan static prompts after input cooldowns. Validate with workspace tests, workspace build, formatting checks, and synthetic terminal-grid fixtures. Live CLI acceptance remains unverified.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ac9c6400c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let remember = remember.join(" "); | ||
| remember.is_empty() | ||
| || (remember.starts_with("2. Yes, and don't ask again for commands that start with ") | ||
| && remember.ends_with("(p)")) |
There was a problem hiding this comment.
Preserve hard-wrapped remember-option text
When the optional remember choice hard-wraps in the middle of the fixed label—for example, in a 49- or 50-column pane—join(" ") inserts a space inside start, producing s tart; the subsequent starts_with check then rejects an otherwise complete Codex dialog, so auto-approve never fires. Reconstruct these physical-row fragments without assuming that every wrap occurred at whitespace, as the rejection-label fold already does.
Useful? React with 👍 / 👎.
Auto-approve now recognizes Codex command dialogs and agy workflow questions, confirming the selected first choice with Enter even when the terminal cursor is hidden or parked below the menu. Known prompts that become static during the input cooldown are rescanned after the cooldown expires.
(esc)shortcut in 48-column panes, with and without the optional remember choice. Incomplete or altered labels still hold approval.docs/specs/auto-approve-mode.md.Validation
cargo test --workspace --quiet— passed; noa-app had 1,198 passing tests and 6 ignored tests.cargo test -p noa-app auto_approve::tests::— 19 passed, including VT/grid regressions for split cost redraws and wrapped rejection labels.cargo build --workspace --locked— passed.cargo fmt --all -- --checkandgit diff --check— passed.Both reported regressions failed before their fixes and passed afterward. Coverage also checks changed questions, redisplayed dialogs, incomplete menus, hidden cursors, split UTF-8 input, and cooldown recovery.
Actual CLI acceptance and an interactive macOS recording remain unverified; the terminal tests use synthetic dialog layouts.
Review notes
Auto-approve remains disabled by default. Enabling it opts into execution of commands in the recognized Codex dialog without a command allowlist, and into selecting agy's first recommended workflow answer. The persistent remember choice is never selected. This extends the existing opt-in mode without adding configuration keys or changing persisted formats.