Skip to content

perf(site/src): optimistically edit chat messages#23976

Draft
ethanndickson wants to merge 1 commit intomainfrom
message-editing-3vzp
Draft

perf(site/src): optimistically edit chat messages#23976
ethanndickson wants to merge 1 commit intomainfrom
message-editing-3vzp

Conversation

@ethanndickson
Copy link
Copy Markdown
Member

@ethanndickson ethanndickson commented Apr 2, 2026

Previously, editing a past user message in Agents chat waited for the PATCH round-trip and follow-up refetch before the transcript tail visibly changed. Even after the initial optimistic update, the edited bubble could still flicker away while the UI reconciled from the old user-message ID to the new server-assigned replacement ID.

Keep message editing optimistic end-to-end: update the edited user bubble and truncate the tail immediately, carry that state through the authoritative replacement message until the cache catches up, and roll back the visible draft cleanly on failure. This also centralizes edited-submission request/render preparation and adds focused regression coverage around the chat store bridge, rollback behavior, and attachment/draft restoration.

@ethanndickson ethanndickson force-pushed the message-editing-3vzp branch from 67c57ea to c82ceb4 Compare April 2, 2026 15:57
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.

1 participant