Skip to content

feat: send a message after the current turn from the chat input - #31774

Merged
ethanndickson merged 6 commits into
ethanndickson/chat-steer-refuse-editfrom
ethanndickson/chat-queue-send-shortcut
Nov 9, 2026
Merged

ethanndickson merged 6 commits into
ethanndickson/chat-steer-refuse-editfrom
ethanndickson/chat-queue-send-shortcut

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Since #31174 made steer the default, there's been no way to send a queue message from the site, i.e. one that waits for the current turn to end. This adds that back in two ways.

Whilst the agent is working, Cmd/Ctrl+Enter now sends the message under "After turn" (busy_behavior: "queue"), and Enter still steers. If you've turned on "Require Cmd/Ctrl+Enter to send agent messages", or you're on a touch device where Enter is a newline, Cmd/Ctrl+Enter already sends, so Option/Alt+Enter sends after the turn instead. The send button tooltip lists both shortcuts, as "Send during turn" and "Send after turn".

A shortcut isn't very discoverable, and there isn't one on a phone, so right-clicking the send button, or long pressing it on a touch screen, opens a small menu with "Send during turn" and "Send after turn". The menu only opens whilst the agent is busy and there's something to send, as otherwise there's no turn to wait for. Editing a sent message doesn't get the option either, since an edit has no lane to pick.

The docs now describe both.

Part of CODAGT-1140

@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

CODAGT-1140

@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-queue-send-shortcut branch from 84017fe to a30e3b1 Compare November 5, 2026 08:38
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-05T13:21:10.636348Z 05e57a6 Draft marked ready
ℹ️ 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. Keep them coming!

Reviewed commit: a30e3b1837

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

@ethanndickson
ethanndickson marked this pull request as ready for review November 5, 2026 09:00
@ethanndickson
ethanndickson requested a review from a team as a code owner November 5, 2026 09:00

@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: a30e3b1837

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

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

re: Respect after-turn scheduling for built-in commands

Valid, but this already happens on main: a plain send of /compact or /clear to a busy chat runs the command at once and gets the same 409. This PR only adds a second way to reach it. Making /compact follow steer and after-turn delivery needs server work: chatd has to hold the compaction and run it before the next model call or when the turn ends. We track that as a follow-up in CODAGT-1536. /clear stays rejected while the chat is busy. Accepted as a known limitation for this PR.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: a30e3b1837

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

@ethanndickson
ethanndickson marked this pull request as draft November 5, 2026 11:26
@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-queue-send-shortcut branch from 2cf6bd7 to 291c567 Compare November 5, 2026 11:31
@ethanndickson

Copy link
Copy Markdown
Member 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: 291c567e5a

ℹ️ 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 thread docs/coder-agents/index.md Resolved
@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-queue-send-shortcut branch from 291c567 to d16f7c8 Compare November 5, 2026 12:05
@ethanndickson

Copy link
Copy Markdown
Member 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: d16f7c82c4

ℹ️ 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 thread docs/coder-agents/index.md Resolved
@ethanndickson

Copy link
Copy Markdown
Member 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: a588ff6d94

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

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 05e57a63c4

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

@ethanndickson
ethanndickson marked this pull request as ready for review November 5, 2026 13:18
The busy send tooltip showed only "Send" and "After turn". It now shows
"Send during turn" and "Send after turn", so it says that a plain send
reaches the agent during the current turn and the shortcut holds the
message until the turn ends. The send menu uses the same labels.
AgentChatInput.tsx was over 2000 lines, and AgentChatSendMenu.tsx only
exported the send button, so the button and its menu now live in
AgentChatSendButton.tsx. The single-use shortcut hint helper is inlined,
and canSendAfterTurn becomes offersSendAfterTurn because it stays true
with an empty draft.

A new test checks that Escape closes the send menu and returns focus to
Send. The stories wire the modifier preference inline, and comments that
restated the code are trimmed.
While the agent works, the send button's tooltip says "Send during turn",
but screen readers read the button as "Send". The screen-reader text now
uses the tooltip label, so both say "Send during turn" while the agent
works and "Send" otherwise.
@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-queue-send-shortcut branch from 05e57a6 to 5152307 Compare November 6, 2026 06:03

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change looks reasonable to me, I'd still recommend having someone from the FE team look through this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seemed like a lot of added code with not much contrasting deleted code, but I guess the send button wasn't that complex before.

asChild
disabled
type={undefined}
// biome-ignore lint/a11y/useValidAriaValues: undefined removes the Radix default.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd question this lint ignore, agent's love to add them but often the approach is wrong. Not too familiar with this to make a more informed comment on it though.

@ethanndickson
ethanndickson merged commit 99fb0da into main Nov 9, 2026
55 of 78 checks passed
@ethanndickson
ethanndickson deleted the ethanndickson/chat-queue-send-shortcut branch November 9, 2026 04:55
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.

2 participants