Skip to content

feat(interaction): configure question and approval deadlines - #839

Merged
hakula139 merged 8 commits into
mainfrom
feat/interaction-timeouts
Nov 7, 2026
Merged

hakula139 merged 8 commits into
mainfrom
feat/interaction-timeouts

Conversation

@hakula139

@hakula139 hakula139 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Let user configuration limit how long TUI questions and permission approvals wait. Deadlines remain disabled until configured and measure total time from publication of the request.

  • Questions: Use the recommended choice on timeout, or skip when none exists. Users can configure every question to skip. Automatic answers retain their timeout source and do not become user instructions.
  • Approvals: Deny on timeout by default, with an explicit user setting to allow the pending call. Timeout approval never grants session-wide permission or overrides a deny rule.
  • Lifecycle: The engine resolves each wait and closes its matching modal. Late replies cannot resolve another request. Headless questions abort immediately, and unavailable approvals retain their unattended behavior.

The user-only [interaction.questions] and [interaction.approvals] tables accept positive timeout_seconds and an on_timeout action. /config shows their resolved values and sources.

Closes #832.

Test plan

  • cargo fmt --check, cargo build --locked, both Clippy modes, and cargo doc --locked --no-deps.
  • cargo llvm-cov --locked: 3,356 tests passed, five live tests ignored, and 99.20% line coverage.
  • Independent deadline, cancellation, provenance, and modal lifecycle regressions. Eleven compiling behavior mutations were caught and the source restored.
  • Configuration validation and display regressions, including both affected snapshots.
  • pnpm format, pnpm lint, and pnpm spellcheck.
  • Independent review. The fixed question footer keeps its timeout policy visible while scrolling or entering a freeform answer. The 30x12 regression failed before the fix and passed afterward.

After the review fixes, the focused question, approval, modal lifecycle, and dispatch tests passed, along with both Clippy modes and formatting. The shared engine test fixture boxes construction so its callers stay within the future-size lint on Windows. Its 19 login tests and both local Clippy modes passed. The full verification block above ran before these layout and message fixes.

Real model tests were not run.

@hakula139 hakula139 added this to the v0.1.0-alpha.11 milestone Nov 7, 2026
@hakula139 hakula139 added enhancement New capability area: config Touches config loading, layering, or credential discovery area: permission Touches permission rules, modes, or the approval gate area: tui Touches terminal UI rendering, input, or theming area: engine Touches the engine, its protocol, or the drivers that run it labels Nov 7, 2026
@hakula139 hakula139 self-assigned this Nov 7, 2026
@hakula139
hakula139 force-pushed the feat/interaction-timeouts branch from e3a5a90 to 5682bd4 Compare November 7, 2026 15:56
@hakula139
hakula139 force-pushed the feat/interaction-timeouts branch from 5682bd4 to 7d6a8a7 Compare November 7, 2026 16:14
@hakula139
hakula139 force-pushed the feat/interaction-timeouts branch from 7d6a8a7 to 7b4738d Compare November 7, 2026 16:32
Base automatically changed from feat/ask-tool to main November 7, 2026 16:42
@hakula139
hakula139 force-pushed the feat/interaction-timeouts branch from 7b4738d to 7ece592 Compare November 7, 2026 16:44
@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.16273% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ox-tui/src/app/events.rs 45.45% 12 Missing ⚠️
crates/ox-core/src/engine.rs 66.66% 1 Missing ⚠️
crates/ox-tui/src/modal/question.rs 98.80% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@hakula139
hakula139 marked this pull request as ready for review November 7, 2026 16:58
@hakula139
hakula139 merged commit 2c6ce20 into main Nov 7, 2026
9 checks passed
@hakula139
hakula139 deleted the feat/interaction-timeouts branch November 7, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: config Touches config loading, layering, or credential discovery area: engine Touches the engine, its protocol, or the drivers that run it area: permission Touches permission rules, modes, or the approval gate area: tui Touches terminal UI rendering, input, or theming enhancement New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure timeouts for questions and permission approvals

1 participant