Payload editor reuses a canceled draft after reopening

Open
#481 1 comment 0 reactions 0 assignees View on GitHub

@vinsymoyya is already working on this.

Since Nov 5, 2026.

  • #482 by @vinsymoyya — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Read src/components/Points/PayloadEditor.jsx and trace how PointPayload supplies the editor value and stores its draft across close and reopen. The issue reports regression tests for canceled drafts and updated point payloads; use those cases to verify the fix. Done means each opening starts from the current payload and displayed text, confirmation diff, and submitted payload agree; saving unchanged content closes without confirmation or a write.

Written by the indexing model from the issue text.

Description

Bug

Canceling a payload edit does not discard the draft held by PayloadEditor. When the same dialog is reopened, it displays the stored payload, but Save still reads the canceled draft. Confirming the resulting diff can overwrite the payload with an edit that was previously canceled.

Affected source: src/components/Points/PayloadEditor.jsx on master at 90a83dd67bb9e3f84cf62daed14a9489ae1e7fdd (web UI 0.2.20).

Reproduction

  1. Open the payload editor for a point whose payload is {"status":"original"}.
  2. Change the editor contents to {"status":"discarded"} and click Cancel.
  3. Reopen the payload editor for the same point. It displays {"status":"original"}.
  4. Without editing anything, click Save.
  5. The confirmation dialog proposes {"status":"discarded"}. Clicking Confirm submits that canceled draft.

The same mismatch occurs if the point supplied to the mounted editor changes while it is closed: the visible editor receives the latest point payload, while Save uses the payload from an earlier render.

Expected behavior

Each opening should begin with the current point payload. Saving without changes should close the editor without a confirmation or write. The displayed text, confirmation diff, and submitted payload should use the same draft.

Cause and verification

PointPayload keeps PayloadEditor mounted when it closes. Its payload state is initialized only once, whereas the editor's value prop is derived directly from point.payload.

I reproduced both stale-state cases with component regression tests against the unchanged source: the canceled-draft and updated-point tests fail, while a fresh edit-and-save control passes. The editor widget, UI widgets, and network client are mocked in these tests; they exercise the component's state transitions and submitted arguments without a running Qdrant server.

Dominant language
JavaScript
Stars
441
Forks
153
Avg merge
43m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qdrant/qdrant-web-ui

All issues in qdrant/qdrant-web-ui

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.