Skip to content

Add request user input auto-resolution timer#28235

Merged
shijie-oai merged 3 commits into
mainfrom
shijie/request-user-input-tui-auto-resolution
Jun 15, 2026
Merged

Add request user input auto-resolution timer#28235
shijie-oai merged 3 commits into
mainfrom
shijie/request-user-input-tui-auto-resolution

Conversation

@shijie-oai

@shijie-oai shijie-oai commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add TUI auto-resolution handling for request_user_input prompts when autoResolutionMs is present.
  • Use a 60s hidden grace period followed by a 60s visible countdown, then submit an empty answer response if the user does not interact.
  • Snooze auto-resolution on key or paste interaction and add snapshot/test coverage for the countdown UI.

Notes

  • The TUI currently treats autoResolutionMs as an enable signal and intentionally does not use the provided duration value for the countdown policy.

Auto resolution

Screen.Recording.2026-06-14.at.5.25.53.PM.mov

Snooze after interaction

Screen.Recording.2026-06-14.at.5.27.24.PM.mov

@avinashkamat48 avinashkamat48 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto_resolution_ms is currently treated only as an enable flag, while the actual timeout is hard-coded to 60s hidden grace plus 60s visible countdown. That means a request asking for a shorter or longer auto-resolution window will still resolve after 120s. Since the protocol field is a duration, the TUI should either honor the provided value when computing the due time/countdown, or the field should be renamed/documented as a boolean before clients start depending on the millisecond value.

@shijie-oai shijie-oai requested a review from fcoury-oai June 15, 2026 15:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9b58d56aa

ℹ️ 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".

Comment on lines +281 to +284
fn auto_resolution_timing_at(&self, now: Instant) -> AutoResolutionTiming {
// The TUI currently treats autoResolutionMs as an enable signal. The
// model-provided duration value is reserved for future runtime policy.
if self.request.auto_resolution_ms.is_none() || self.auto_resolution_snoozed {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor the supplied autoResolutionMs value

When callers pass autoResolutionMs=60000 or 240000, this ignores the advertised timeout and always waits 60s hidden + 60s visible, so 60s prompts resolve a minute late and 240s prompts resolve two minutes early. Please base the due time on the supplied value. guidance

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional right now to introduce consistency.

let needs_redraw = view.pre_draw_tick(now);
let view_complete = view.is_complete();
if view_complete {
self.view_stack.clear();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve lower views when the top view auto-completes

When a request_user_input prompt auto-resolves while stacked above an unresolved modal such as ApprovalOverlay, clear() drops the lower modal and on_active_view_complete() re-enables the composer even though that request never completed. Key-driven completion already pops only the active view; this tick path should do the same so pending lower modals are preserved.

Useful? React with 👍 / 👎.

@shijie-oai shijie-oai requested a review from aibrahim-oai June 15, 2026 17:25

@fcoury-oai fcoury-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing this, it will be very helpful and finally allow us to ask questions in default mode.

The only remark would be changing the autoResolutionMs from Option to a bool to better reflect what it's being used for: either wait 120s or wait forever.

Code looks good, approved 👍

@shijie-oai shijie-oai merged commit 1b81365 into main Jun 15, 2026
31 checks passed
@shijie-oai shijie-oai deleted the shijie/request-user-input-tui-auto-resolution branch June 15, 2026 18:49
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants