Skip to content

fix(desktop): clear message edits when conversations change - #252

Closed
Afloat16 wants to merge 2 commits into
Edge0-AI:mainfrom
Afloat16:fix/conversation-edit-state-20261116
Closed

Afloat16 wants to merge 2 commits into
Edge0-AI:mainfrom
Afloat16:fix/conversation-edit-state-20261116

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What & why

The desktop chat component keeps its editing index and draft text when the selected conversation changes. If the destination also has a user message at that index, it opens an editor containing the previous conversation's text. Switching through an empty conversation can also resurrect the old edit when its first message arrives, allowing the wrong prompt to be resent.

Clear the local editing state when conversation.id changes. Updates within the same conversation keep the active edit intact.

Area

  • Chat app examples (edge0-infer/examples/)

How was it tested?

Independent Node 24.15.0 and 26.3.1 validation: each runtime reproduced 2 failures with 1 passing same-conversation control on upstream, then passed all 217 frontend tests and npm run build with the fix.

The regressions mount the actual Chat component with ReactDOM, click its edit/send controls, and rerender it with another conversation. They check direct switching, switching through an empty chat, the resent prompt and message index, and preserving an edit during updates to the same conversation. The component regression harness is retained on the validation branch. It uses happy-dom; because adding an App dependency requires maintainer approval, this PR leaves the upstream dependency set unchanged and contains only the one-line production fix.

Local Node 24.22 also passed these three regressions, the frontend suite, and the production build. The independent validation branch contains only this change; no native Tauri integration or model-inference result is claimed.

Checklist

  • Retained reproducible component regressions and a same-conversation control on the linked validation branch.
  • Ran npm test and npm run build on both documented Node versions.
  • Kept the production change scoped to the chat edit lifecycle.

@shuk777

shuk777 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Closing as part of clearing this pre-hygiene queue; see #298 (comment) for the note on the updated review process. Thank you again.

@shuk777 shuk777 closed this Nov 19, 2026
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