Repository navigation
feat: hold every steer message while one is under edit - #31748
ethanndickson merged 2 commits into
Conversation
b1289b3 to
91d7898
Compare
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: 91d7898512
ℹ️ 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".
91d7898 to
a622aec
Compare
|
@codex review re: Preserve paused chats with legacy steer edits Not reachable from a release. The steer busy behavior is new in this stack: migration 000640 (#31156) adds |
|
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". |
a622aec to
3d574f3
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
3d574f3 to
94a90e7
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94a90e7211
ℹ️ 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. Keep it up! 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. Keep it up! 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: 239fe2fd87
ℹ️ 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 re: Keep Send now for ready steer rows in errored chats Intentional, so I'm keeping it as an accepted known limitation. Send now now shows only on After turn rows. Next step rows already go to the agent as soon as possible, so the button has no job there in the normal case. A ready Next step row survives into an errored chat only when it arrives during the last step (for example, a long tool call), and the turn then fails with an error that can't be retried, or after the retries run out. Retryable errors keep the chat running, and the held Next step rows go in before the retried model call. In the remaining case the row is not lost: the next message the user sends delivers it first. One rule (Send now only on After turn rows) is easier to understand than a rule that depends on chat status and edit state. |
|
Codex Review: Didn't find any major issues. Swish! 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". |
Steer messages can be edited again. While one is under edit, every steer message waits, and a turn that ends during the edit pauses the chat. GetChatQueuedMessageHead returns a steer message under edit first, so the paused check finds it. Queue messages keep the old rule: an edit holds the message and the messages behind it.
Send now on a Next step message did nothing while another Next step message was under edit in a paused or errored chat, and while the turn runs a Next step message already goes in before the next model call. Next step rows no longer offer Send now, and Enter on an empty composer no longer sends a Next step message.
239fe2f to
0a17f5a
Compare
| SELECT * FROM chat_queued_messages | ||
| WHERE chat_id = @chat_id::uuid | ||
| ORDER BY CASE busy_behavior WHEN 'steer' THEN 0 ELSE 1 END, position ASC, id ASC | ||
| ORDER BY (busy_behavior = 'steer' AND editing_since IS NOT NULL) DESC, CASE busy_behavior WHEN 'steer' THEN 0 ELSE 1 END, position ASC, id ASC |
There was a problem hiding this comment.
Does this run the risk of re-positioning an item in the queue? I guess not, since editing_since would have to become NULL first and then this query would return them in the previous order.
…ex migration to 000641 (#31997) #31766 and #31748 both added a `000640` migration and both merged, so main currently has two migrations with the same number. Migrations fail to load with `duplicate migration file: 000640_workspace_app_stats_session_ended_at_idx.down.sql`, which breaks every test that sets up a database. This moves the `workspace_app_stats` index to `000641`. It's a rename only and `dump.sql` regenerates unchanged. `go test ./coderd/database/migrations/...` and the insights and dbrollup tests pass with it. Part of [CORE-439](https://linear.app/codercom/issue/CORE-439).
Whilst a steer message is under edit, every steer message now waits, not just the one under edit and the ones behind it.
Say Next step holds A, B and C, and you edit B. Before this, A went to the agent at the next model call whilst B and C waited. Now nothing goes out until the edit ends, then A, B and C go in together. If the turn ends whilst a steer message is under edit, the chat pauses, the same as it already does for a queue message.
GetChatQueuedMessageHeadnow returns a steer message under edit first, so the paused check still finds it when it isn't the first row.Queue messages are unchanged: editing one holds it and the messages behind it.
On the site, every other row shows "Waiting" whilst a steer message is under edit, and Enter on an empty composer won't send the first held message whilst it's waiting on an edit. The docs are updated to match.
The first version of this PR refused edits on steer messages instead, following Mathias's review of #30074. Mathias has since suggested holding the whole steer lane, so the agent never starts working on part of what you sent.
Part of CODAGT-1140