Conversation
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes unstable conversation state after manual generation cancellation. Pending user and assistant messages are now finalized by run ID when a generation is canceled, so old turns no longer reappear as loading when the user sends a new message.
Also tightens frontend reconciliation so server-side
pendingmessages are only treated as live streaming messages when their run is actively running or being resumed. This prevents invalid branch state, stale loading indicators, and disappearing interrupted/error branches. Static frontend asset cache headers were also improved for exported Next.js resources.Change type
Affected areas
Verification
cd backend && go test ./internal/application/conversation/... ./internal/infra/persistence/postgres/conversation/...cd backend && go test ./internal/transport/http/conversation/...cd backend && go test ./internal/transport/http/...cd frontend && pnpm lintcd frontend && pnpm buildScreenshots, API examples, or logs
No screenshots required. This change fixes runtime state handling and cache headers.
Configuration, migration, and compatibility notes
No database migration is required.
No API contract changes are introduced. The cancel flow now marks pending generation messages as terminal after cancellation. Frontend static asset cache headers were adjusted for Next.js exported resources and immutable build assets.
Documentation
Security and privacy
Checklist
.pycfiles,.envfiles, and local storage data are not committed.