Skip to content

[Bug] Editing and resending a modified user message does not trigger a new AI response #3

@elcruzo

Description

@elcruzo

Description

When a user edits a previously sent message and submits the edited version, the AI does not generate a new response. The edited message appears to update in the chat, but no new stream is initiated, the conversation just stalls.

Steps to Reproduce

  1. Open the Trace chat panel (schematic)
  2. Send a message and wait for the AI to finish responding
  3. Click the edit button on the user message
  4. Modify the message content
  5. Submit the edited message

Expected Behavior

The AI assistant's previous response should be removed (or replaced), and a new streaming response should begin using the edited message content - effectively "resending" with the updated prompt.

Actual Behavior

The user message updates visually, but no new AI response is generated. The conversation appears stuck with the old assistant response still visible.

Environment

  • Trace Version: 1.2.0
  • OS: macOS Sequoia 15.6.1 (24G90)
  • Editor: Schematic

Additional Context

The edit flow is handled by SetEditMessageCallback in ai_chat_panel_base.cpp (line ~556) which calls SetEditMessageId on the backend client, then the message is resent via StreamChat. The React side dispatches edit_message from MessageBubble.tsx. The issue may be in how the edited message ID is propagated to the backend, or in the version rollback step that precedes the resend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions