Skip to content

feat(site/src/pages/AgentsPage): show async question answers without their call line - #31315

Open
ibetitsmike wants to merge 6 commits into
mike/codagt-1460-question-optionsfrom
mike/codagt-1460-async-answer-messages
Open

ibetitsmike wants to merge 6 commits into
mike/codagt-1460-question-optionsfrom
mike/codagt-1460-async-answer-messages

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 Xum opened this PR for Mike.

Stack

This stack lets the agent in Coder Agents web UI chats ask a question with ask_user_question without ending its turn. Chats created through the API and plan mode keep the blocking tool.

  1. feat: let web UI chats ask questions without ending the turn #31310: chatd gives web UI chats an async ask_user_question whose options are one-line answers, and sends a web push.
  2. feat(site/src/pages/AgentsPage): show ask_user_question options as numbered one-line answers #31555: the question form shows options as numbered one-line answers that number keys pick, and keeps unsent answers per call.
  3. feat(site/src/pages/AgentsPage): show async question answers without their call line #31315 (this PR): async answers show without their call line in the bubble, the queue, Copy, Edit and the prompt history.
  4. feat(site/src): answer async agent questions in the timeline while the agent works #31294: an async question card stays answerable while the agent works, and closes when a newer question replaces it.
  5. feat: pin the open async question above the chat input #31312: the open async question is pinned above the chat input, plus docs.

Refs CODAGT-1460

Why

An async answer is an ordinary user message. Its first line, Answer to ask_user_question call <id>:, tells the model which question it answers. That line is for the model, so this PR keeps it out of what the user reads, copies and edits.

What changes (site/src/pages/AgentsPage)

  • asyncAnswer.ts builds and parses the prefix line. A message is an answer only when its first text part starts with the exact line, and the call ID is the rest of that line, so provider IDs with spaces or colons work. The server trims each text part, so when a skill chip follows the prefix line, the line ends its part; the bubble, the queue row, Copy and Edit read the answer from the parts, so the chip never ends up in the call ID.
  • The user bubble shows "Answer" above the body, and the queue row shows "Answer:" before its first line. Copy copies only the body, and an answer with no text after its prefix line has no Copy button.
  • Edit puts only the body in the composer and adds the prefix line back on send, ahead of a leading chip, so an edited answer still answers its question. A second edit opened while the first one sends is no longer changed when the first one finishes or fails.
  • The composer's ArrowUp prompt history skips answers. A recalled answer would show its call line, and sending it again would answer the old question again.

Messages without the prefix line render, copy and edit as before.

Validation

Vitest (asyncAnswer.test.ts, messageHelpers.test.ts, useConversationEditingState.test.ts, ChatMessageInput.test.tsx, ConversationTimeline.test.tsx, AgentChatPage.test.tsx, ChatPageContent.test.tsx) and the Storybook tests for the touched stories pass, as do biome, oxlint, tsc, knip and the pre-commit hook. The AgentChatPage test edits an answer that starts with a skill chip and checks that the request keeps the call line. Earlier remote dogfood UAT of the combined stack checked that an edited answer keeps exactly one prefix line with a chip first, in the middle or at the end, and that ArrowUp never recalls a delivered answer.

@linear-code

linear-code Bot commented Oct 27, 2026

Copy link
Copy Markdown

CODAGT-1460

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-10-31T00:34:11.568129Z 7518ffb 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 chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c343301d1b

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c5fee0b50

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 9aaaec8d1c

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 6a01823eee

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

1 similar comment
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58a7915af7

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 406ec346e4

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c4bebcbac

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6023c9175

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6549b1c785

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06b50e4470

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Xum posted this comment for Mike.

@codex review

@ibetitsmike
ibetitsmike marked this pull request as ready for review October 30, 2026 22:22
@ibetitsmike
ibetitsmike requested a review from a team as a code owner October 30, 2026 22:22

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8cb264a92

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66a1c52382

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3103cc3d23

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27e888dec0

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 7518ffbde9

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

@DanielleMaywood DanielleMaywood left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This review was performed by ai-review, an automated review bot.

2 inline findings.

Coverage
Coverage: 18 of 18 files reviewed; 35 rules.
Candidates: 265 found, 239 outside changed lines, 2 already discussed, 24 evaluated.
Findings: 2 (3 sites, 1 pre-existing sites), 0 over budget, 0 failed.
Model: deepseek/deepseek-v4.1-flash; 21 questions, 20 answered, 1 abstained (unsure 1), 0 cached; 0 uncalibrated findings held back; 21080 input and 7534 output tokens.
Experiments: 2 run, 0 passed, 2 vetoed, 0 unverified, 0 skipped for time.
  vetoed: TYPE-1 site/src/pages/AgentsPage/components/ChatConversation/messageParsing.ts:411: 2 new type errors, first src/pages/AgentsPage/components/ChatConversation/messageParsing.ts: TS2345 Argument of type 'ChatMessagePart[] 
  vetoed: TYPE-1 site/src/pages/AgentsPage/components/ChatConversation/messageParsing.ts:444: 2 new type errors, first src/pages/AgentsPage/components/ChatConversation/messageHelpers.ts: TS2345 Argument of type 'readonly ChatMessagePart[] 

@mafredri
mafredri force-pushed the mike/codagt-1460-async-answer-messages branch from 7518ffb to 65ee0de Compare November 3, 2026 20:24
ibetitsmike and others added 2 commits November 6, 2026 19:09
…their call line

An async answer's first line names the ask_user_question call for the
model. The bubble, the queue row, Copy, Edit and the prompt history now
leave that line out, and an edit adds it back on send so the answer
still answers its question.

This is the net change of mike/codagt-1460-async-answer-messages at
7518ffb, rebased onto queued-message editing (#29555). The editing
hook now loads history and queued targets through one path, so the
call line is split off where a target loads and kept on the loaded
target. Queued edits therefore hide and restore it too, and the guard
that keeps an edit opened during an earlier send uses the hook's
existing load counter.
@mafredri
mafredri force-pushed the mike/codagt-1460-async-answer-messages branch from 65ee0de to f573cbb Compare November 6, 2026 19:25
Comment on lines +7 to +11
const asyncAnswerPattern = new RegExp(`^${asyncAnswerLead}([^\\n]+):(?:\\n|$)`);

const asyncAnswerPromptPattern = new RegExp(
`^${asyncAnswerLead}[^\\n]+:(?:\\n|$|\\S)`,
);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

uhhhh, what?? why do we need regexs for these questions?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants