Repository navigation
feat: pin the open async question above the chat input - #31312
ibetitsmike wants to merge 7 commits into
Conversation
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2496ad2206
ℹ️ 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".
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b017ded10c
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3c01a3e22
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ca2b90b00
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d124fe0cb
ℹ️ 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".
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 255b19bdcd
ℹ️ 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".
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e4c125085
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 825e318678
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
left a comment
There was a problem hiding this comment.
This review was performed by ai-review, an automated review bot.
3 inline findings and 1 below.
whole PR
SCOPE-1: This PR changes 1355 lines in 19 files (limit 1000). Split it into smaller PRs.
Remedy: split
Coverage
Coverage: 19 of 20 files reviewed, 1 unsupported; 35 rules.
Candidates: 259 found, 216 outside changed lines, 0 already discussed, 43 evaluated.
Findings: 4 (8 sites, 3 pre-existing sites), 0 over budget, 0 failed.
Model: deepseek/deepseek-v4.1-flash; 37 questions, 37 answered, 0 abstained, 0 cached; 0 uncalibrated findings held back; 36919 input and 9623 output tokens.
c455707 to
b3bb1af
Compare
There was a problem hiding this comment.
Documentation check for PR #31312 (updated head).
| @@ -264,7 +264,8 @@ Sub-agents do not have access to these tools and cannot create workspaces or spa | |||
| `spawn_agent` with `type=computer_use` additionally requires an Anthropic or OpenAI provider and the virtual desktop feature to be enabled by an administrator. | |||
| `read_skill` and `read_skill_file` are available when the workspace contains skills in its `.agents/skills/` directory. | |||
|
|
|||
| `propose_plan` and `ask_user_question` are only available while plan mode is active. | |||
| `propose_plan` is only available while plan mode is active. | |||
| In chats created through the API, `ask_user_question` is also only available while plan mode is active. | |||
There was a problem hiding this comment.
Blocking: This API caveat serves an API reader on a page whose reader is the dashboard user, and docs/reference/api/chats.md has no mention of ask_user_question at all (grep = 0), so the API reader gets this only out of place. (Reader Advocate)
Rule: docs/.style/style-guide/audience-and-scope.md#pick-one-audience-per-page (also #give-the-audience-only-what-it-needs). The gate is real: coderd/x/chatd/turn_environment.go:724-728 exposes the async tool only when chat.ClientType == database.ChatClientTypeUi, so API chats keep ask_user_question plan-mode-only. Move this clause to the API/chat reference, or drop it here and keep the page scoped to the dashboard reader.
There was a problem hiding this comment.
Xum posted this reply for Mike.
Not changing this. The doc check on #31310 flagged the old line here ("propose_plan and ask_user_question are only available while plan mode is active") as false, and the fix is this split, which now lands in #31310. Dropping the API clause would leave readers with no statement of where the tool is available. The API reference is generated from the Swagger annotations, so a note there needs a code change outside this stack. Leaving this open for a maintainer to decide.
The agent keeps working after an async question, so its transcript card scrolls away under new output. While the question is open, its answer form moves to a collapsible panel above the chat input, and sending an answer returns focus to the chat input. This is the net change of mike/codagt-1460-question-dock at c455707, collapsed into one commit to rebase it onto main without replaying the merges from the layer below. It includes the focus handling from the closed #31372.
… sees The tools table said dashboard questions never stop work, which is not true in plan mode. The section led with the tool name instead of what the reader sees, and repeated the API caveat that the tools section already states.
This page names ask_user_question in its tools table and in the plan mode section, so the section about the same tool outside plan mode names it too.
b3bb1af to
2ae5950
Compare
…agt-1460-question-dock # Conflicts: # site/src/pages/AgentsPage/components/ChatElements/tools/AskUserQuestionTool.tsx # site/src/pages/AgentsPage/components/ChatElements/tools/Tool.tsx
…pse controls Names the custom-answer field by what the reader sees, says the blocked-turn note comes from the tool's instructions, and says which chats count as dashboard chats.
…agt-1460-question-dock
There was a problem hiding this comment.
Blocking: This section now names the same concept two ways. Lines 237 and 299 call it "chats created from the Coder dashboard"; the line you added coins "dashboard chat" for the identical concept. The new term appears only in its own definition sentence and is never used again, so a reader meets two names for one thing. (Continuity Editor)
Evidence: docs/coder-agents/index.md:237 (built-in tools table) and :299 both say "chats created from the Coder dashboard"; the added :300 says "dashboard chat".
Rule: docs/.style/style-guide/word-choice.md#one-term-per-concept. Pick one name per concept and use it every time.
Fix: do not introduce a second name. Fold the Agents-page clarification into line 299 and drop line 300, e.g. "In chats you start on the Agents page in the Coder dashboard, the agent can also call ask_user_question outside plan mode."
| ## Questions outside plan mode | ||
|
|
||
| In chats created from the Coder dashboard, the agent can also call `ask_user_question` outside plan mode. | ||
| A chat you start on the **Agents** page in the Coder dashboard is a dashboard chat. |
There was a problem hiding this comment.
Blocking: This section now names the same concept two ways. Lines 237 and 299 call it "chats created from the Coder dashboard"; the line you added coins "dashboard chat" for the identical concept. The new term appears only in its own definition sentence and is never used again, so a reader meets two names for one thing. (Continuity Editor)
Rule: docs/.style/style-guide/word-choice.md#one-term-per-concept. Pick one name per concept and use it every time.
Fix: do not introduce a second name. Fold the Agents-page clarification into line 299 and drop line 300, e.g. "In chats you start on the Agents page in the Coder dashboard, the agent can also call ask_user_question outside plan mode."
…uestion-stack chore: merge upstream question stack (coder#31312)
|
|
||
| type SendChatMessage = SubmitChatTurnParams["sendMessage"]; | ||
|
|
||
| export const useComposerFocusAfterSend = ( |
There was a problem hiding this comment.
why are we adding this
Stack
This stack lets the agent in Coder Agents web UI chats ask a question with
ask_user_questionwithout ending its turn. Chats created through the API and plan mode keep the blocking tool.ask_user_questionwhose options are one-line answers, and sends a web push.Refs CODAGT-1460
Why
In #31294 an async question is answered in its transcript card. The agent keeps working after it asks, so the card scrolls away under new output and is easy to miss. This PR moves the answer form into a panel above the chat input while the question is open.
What changes (
site/src,docs)deriveAskUserQuestionStatealso returnsopenAsyncQuestion, the latest question while it is async and has no delivered answer.AskUserQuestionDockrenders it above the chat input in a section labelled "Open question" that follows the chat width setting, is capped at 60% of the viewport height, scrolls on its own and shrinks before the input does. Its action row sticks to the bottom of the panel.docs/ai-coder/agents/index.mdgets a "Questions outside plan mode" section: the agent keeps working, an answer sent while it runs joins the end of the queue, the panel, the read-only state during an edit, the number keys, and the push notification.Screenshots
Taken from Storybook on this branch. The full-page shots use the
AgentChatPagestory harness with a two-question transcript that is not committed.From the lower layers:
Validation
Vitest (
ChatPageContent.test.tsx,AgentChatPage.test.tsx,askUserQuestionState.test.ts,questionDraft.test.ts) and the Storybook tests for the touched stories pass, as do biome, oxlint,tsc, knip and the pre-commit hook. Earlier remote dogfood UAT rounds of the combined stack with a real model checked the panel on short and phone viewports, a queued answer hiding the panel and being delivered once, the panel coming back with its draft after the queued answer was removed, and the read-only panel during a history edit.Accepted limit
The panel reads the loaded transcript. The newest history page loads the whole active turn (#30524), except past 1,000 messages or after a failed fill request; then a question outside the page is docked once the user scrolls back to it.
Known follow-ups (not in this stack)