Skip to content

fix(chat): support nonblocking Codex questions - #231

Merged
badcuban merged 6 commits into
mainfrom
threadlines/verify-nonblocking-agent-questions
Sep 5, 2026
Merged

fix(chat): support nonblocking Codex questions#231
badcuban merged 6 commits into
mainfrom
threadlines/verify-nonblocking-agent-questions

Conversation

@badcuban

@badcuban badcuban commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

What Changed

Codex questions that let the agent keep working now appear as an answer panel. The panel has its own answer field and explicit submission, so answering does not replace the user's message draft. Blocking questions keep Stop visible and preserve the disabled composer draft. While the agent is running, typing in the main composer switches its single action from Stop to Steer; typing in the answer field does not.

Question state survives reconnects and long conversations. Answers steer an active turn or start a follow-up after the turn ends. Stopping clears pending questions, and duplicate or invalid answers do not send extra messages. The sidebar only shows a waiting state for blocking questions. Existing blocking provider questions remain supported.

Why

The pinned Codex protocol schema dropped async question metadata, leaving only ordinary transcript text. Updating the generated schema from Codex 0.150.1 to 0.153.4 preserves that metadata. Most of the diff is the regenerated protocol file. Migration 050 tracks blocking questions separately from all pending questions.

UI Changes

These are screenshots of browser-test fixtures using synthetic conversation data.

The free-text answer is one more row in the option list. It starts as a single line, grows as you type, and carries the Previous and Submit buttons at its end, so the panel has no separate button row. Enter submits the answer. Blocking questions show no waiting hint, since the transcript already says the turn is waiting.

While a blocking question is open, the message box and toolbar collapse to one thin row: the saved draft (or a placeholder) on the left and Stop on the right. The full message box returns, draft intact, once the question resolves or the run is stopped.

State Desktop Phone
Before Screenshot Screenshot
Async question Screenshot Screenshot
Blocking question with Stop Screenshot Screenshot

Answer entry and Stop-to-Steer recording (browser fixture, slowed to one-third speed).

Validation

  • pnpm exec vp fmt, pnpm exec vp lint, and pnpm exec vp run typecheck passed. Lint reports warnings.
  • Focused protocol, adapter, runtime, answer routing, persistence, migration, sidebar, and client-state tests passed.
  • Full browser suite on the committed code: 547/547 passed across 48 files, including desktop/phone async questions, blocking questions, and the Stop-to-Steer switch.
  • After the panel redesign: fmt, lint, and typecheck pass; the question panel browser tests (3/3) and the full ChatView browser file (130/130) pass.
  • Full unit run on Windows: 5,476 passed, 19 failed. Two timing failures in ProviderRuntimeIngestion and ProviderRegistry passed when rerun alone. The remaining failures are outside the question flow: Windows path, shell and symlink fixtures, local skill discovery, Claude mock CLI tests, and a VcsStatusBroadcaster timeout. The full unit suite is not green on this machine.

Checklist

  • This PR is focused on agent question handling; generated protocol changes account for most of its size
  • I explained what changed and why
  • I included before/after screenshots for UI changes
  • I included a video for interaction changes

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Sep 5, 2026 9:54am UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 5, 2026
The answer panel stacked a full text box and a large submit button above the
message box, so two inputs and two primary buttons sat on screen at once.
While a blocking question was open the disabled composer still rendered at
full height with its toolbar.

The free-text answer is now one more row in the option list, growing as you
type, with Previous and Submit at its end. Blocking questions drop the
redundant waiting hint. While a blocking question is open the composer
collapses to one row showing the saved draft and the Stop button.
The pencil icon and submit button hugged the bottom line of a wrapped
answer on phone widths. The row now centers its children vertically like
the option rows do.
The mono Draft tag added chrome to a row that only exists to keep Stop
reachable. A saved draft now shows as dimmed text, and the empty case shows
the placeholder. Screenshots show the empty composer, the common case.
Both sides added migration 50. Main's transcript event sequence keeps 50 and
the blocking user input backfill moves to 51. Activity projection keeps
main's event sequence stamping together with open-request retention, and
pending question counting sorts by transcript order before counting.
The Stop-to-Steer check cleared the editor with an empty Playwright fill,
which presses Delete over a select-all and does not reliably empty the
draft, so the Stop button never returned. And expect.element polls for the
rest of the test budget by default, so every failure read as a bare
30-second timeout instead of naming the step.

Clear the draft through the store, wait on the draft text and the buttons
with bounded helpers, and give the remaining Playwright actions and element
expectations short explicit timeouts.
@badcuban
badcuban added this pull request to the merge queue Sep 5, 2026
Merged via the queue into main with commit 43065b8 Sep 5, 2026
16 checks passed
@badcuban
badcuban deleted the threadlines/verify-nonblocking-agent-questions branch September 5, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant