fix: chatd refactor - #26270
Merged
Merged
Conversation
PR 1 of the chatd refactor. It serves 2 purposes: 1. it implements the chat state machine; and 2. it contains all the database changes in the chatd refactor PR stack. I kept the database changes in a single PR to make rebasing easier. However, because of it, this PR doesn't compile and it doesn't pass tests - that's intentional. Only the tip of the stack will pass all tests.
Docs preview📖 View docs preview for |
PR 2 of the chatd refactor. Reimplements the chatd http endpoints to use the state machine from #25908. Adds a new `/chats/$id/reconcile-invalid` endpoint to allow admins to recover chats that end up in an invalid state from the perspective of the state machine. Removes many chatd tests because the state machine PR introduced tests that replace them. The CI doesn't pass on purpose. Only the tip of the chatd refactor PR stack will pass CI.
PR 3 of the chatd refactor. Refactors the chatd worker to use the chatd state machine. The CI doesn't pass on purpose. Only the tip of the chatd refactor PR stack will pass CI. Previous PR in the stack: #25923
PR 4 of the chatd refactor. Implements the `/chats/$id/stream` and `/chats/$id/stream/parts` endpoints. The CI doesn't pass on purpose. Only the tip of the chatd refactor PR stack will pass CI. Previous PR in the stack: #26109
PR 5 of the chatd refactor. Adapts the frontend to work with the refactored `/chats/$id/stream` endpoint. Previous PR in the stack: #26110
…26112) PR 6 of the chatd refactor. Originally not included in the RFC - I wasn't aware that `workspaceAgentAddChatContext` existed. It seems to be an internal endpoint that the workspace agent can call to inject additional context into the chat. I don't think it's used in production today, but I refactored it either way. Previous PR in the stack: #26111
hugodutka
force-pushed
the
hugodutka/chatd-refactor
branch
from
June 11, 2026 18:31
d408d6d to
daebff7
Compare
hugodutka
force-pushed
the
hugodutka/chatd-refactor
branch
from
June 11, 2026 21:05
daebff7 to
3ae86d2
Compare
Contributor
Author
|
It looks like the flake check is failing because the refactor touched so many tests that, with the aggressive flake hunting settings the check runs with (among others |
Member
|
main is on schema version 518 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the chatd stabilization RFC.
Combines: