Payload editor reuses a canceled draft after reopening
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
- Open the payload editor for a point whose payload is
{"status":"original"}. - Change the editor contents to
{"status":"discarded"}and click Cancel. - Reopen the payload editor for the same point. It displays
{"status":"original"}. - Without editing anything, click Save.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qdrant/qdrant-web-ui
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
qdrant/qdrant-web-ui#483 ·
-
[Bug] Collections page: search filter is lost on refresh, and page numbers don't work on search resultsPossibly taken @vincent-626 claimed this 33 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
qdrant/qdrant-web-ui#478 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
qdrant/qdrant-web-ui#418 · 1 comment ·
-
Bug: read-only editor tooltip is cut ofPossibly taken @srimon12 claimed this 201 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 52/100
qdrant/qdrant-web-ui#379 · 1 comment ·
-
Colorblind-friendly optimization progressMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
qdrant/qdrant-web-ui#357 · 1 comment ·
All issues in qdrant/qdrant-web-ui
Similar issues
-
bug confirmed issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100
open-webui/open-webui#35507 · 2 comments ·
Maintainers usually reply within 1 day
-
beginner-friendly category:tests community enhancement first-timers-only good first issue help wanted low hanging fruit micro-contribution type: task up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Berserk-hub150/skillhawk#300 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Fei2411/DeepSeek-Bot#2896 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
area:ui P2 status:blocked
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
sunososobro-hub/cloudball#1234 ·
Maintainers usually reply within 1 day