Skip to content

[Bug]: Escape after starting message edit clears the draft and leaves an empty transcript #1372

Description

@YuchuanTian

OpenSquilla version or commit

17ad42d

Area

Desktop app

Reproduction steps

  1. Start a new conversation and complete one user/assistant turn.
  2. Click 编辑 (Edit) under the first user message.
  3. Observe that the original text is placed in the composer while the transcript changes to 暂无消息。 (No messages).
  4. Press Escape, a conventional way to cancel an edit.

Expected behavior

At least one safe cancellation path should exist:

  • Escape cancels the edit and restores the original conversation; or
  • a visible Cancel edit action restores it; or
  • the existing transcript remains visible until the edited message is submitted.

Actual behavior

  1. Entering edit mode immediately removes the selected message and all following messages from the in-memory transcript, so editing the first message makes the conversation appear empty.
  2. There is no visible cancel-edit control.
  3. Pressing Escape clears the composer draft but does not restore the removed transcript. The page remains on 暂无消息。 with an empty composer.
  4. Reloading the page or navigating away and back restores the durable history, so the underlying session is not deleted, but the current UI is stranded in a destructive-looking empty state.

This also makes an accidental click followed by Escape look like the entire conversation was lost.

Environment

Windows 11

Diagnostic bundle and error reference

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas-linked-prAn open pull request is linked to this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions