Skip to content

Annotation editors can discard failed drafts and overwrite concurrent field updates #44823

Closed

Description

@lyzno1

Problem

The annotation detail editor catches a failed save without propagating failure to the field editor. The field then exits edit mode even though the annotation was not saved. Both question and answer can also be submitted concurrently, with each request containing the other field's older value.

The chat and annotation-list editors separately own overlapping draft, mutation, and modal lifecycle logic. Hit history is fetched by multiple effects and failures appear as empty results.

Reproduction

  1. Open an annotation from the annotation list and edit its question.
  2. Make the annotation update request fail, then save.
  3. Observe that the field leaves edit mode despite the failed request.
  4. With delayed successful requests, edit both fields and save them before the first request completes. Each request can carry stale data for the other field.

Expected behavior

Failed saves preserve the editable draft and show a retryable error. Saves use the latest successfully stored question/answer and prevent conflicting submissions. Editing and deletion should have consistent modal, keyboard, focus, and pending behavior across the list and chat surfaces. Hit history should load on demand with explicit error and retry states.

Activity

  1. dosubot commented on Oct 26, 2026

    @dosubot

    Related: #44809 tracks failed-save draft loss in Add Annotation, including continuous creation and dismissal while a request is pending. Its proposed scope also includes Dialog primitives, shared cache invalidation, and retry/pending-interaction tests, so there is overlap worth coordinating while keeping creation and existing-annotation editing as separate regression cases. [1]

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about dify with Dosu

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions