Skip to content

fix(tui): answer with Alt-A/Alt-D only a call whose session is on screen, never an ask_user hold - #555

Merged
lg2m merged 1 commit into
mainfrom
fix/eng-1107-alt-a-on-screen
Nov 3, 2026
Merged

lg2m merged 1 commit into
mainfrom
fix/eng-1107-alt-a-on-screen

Conversation

@lg2m

@lg2m lg2m commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Change

Alt-A / Alt-D approved or denied the oldest waiting call in another session without checking that you could see it:

  • Below 90 columns, or with the sessions column hidden, nothing on screen named the session or its command, yet the call was approved.
  • On an ask_user hold, Alt-A sent ApproveOnce. The tool then refused with "ask_user was not put to the user", so the agent's question was lost.

docs/plans/0.1.11.md lists both as hard requirements ("Answers go to the call shown"). The code is unchanged since v0.1.10, but the redesign made the sessions column optional and removed the inspector, so the target is often off screen.

Now Alt-A / Alt-D answer only when the session's row was drawn in the last frame: a sessions-column row, or an agent lane in the visible part of the transcript. Otherwise, and always for an ask_user hold, they focus that session, where y / n or the question panel take over.

The pre-release code review found this. It blocks v0.1.11; the bump (#554) is paused until this lands.

Verification

  • New tests:
    • alt_a_and_alt_d_focus_a_session_whose_name_is_not_on_screen_instead_of_answering (80 × 24, no sessions column): fails on main, passes here.
    • alt_a_never_answers_an_ask_user_hold_even_when_its_row_is_on_screen: fails on main, passes here.
    • alt_a_approves_another_sessions_call_only_while_its_row_is_on_screen (120 × 40): passes on both, so the visible case still answers in place.
  • a_background_approval_is_answered_in_place_without_moving_focus now draws a frame first. It used to press Alt-A before anything was on screen, which is the case this PR refuses.
  • cargo xtask check: passed.
  • Docs: docs/guide/tui.md, docs/guide/permissions.md and the website sessions section say when Alt-A answers and when it focuses instead.

Known impact

At Compact width, Alt-A now takes two keys (focus, then y) instead of one. That is the intended trade.

@lg2m lg2m added the ci:full label Nov 3, 2026
@lg2m

lg2m commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T07:36:31.589924Z 62fd186 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 62fd18662d

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

@lg2m
lg2m merged commit a588731 into main Nov 3, 2026
23 of 29 checks passed
@lg2m
lg2m deleted the fix/eng-1107-alt-a-on-screen branch November 3, 2026 07:38
@lg2m lg2m mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant