fix(modal): accept-by-known-id keeps the raw suggestion row identity for the drop
Spreading canonical_tag_id onto a raw suggestion changed its _keyOf identity, so _dropEverywhere missed the actual list row and the panel kept showing an already-accepted suggestion. Pass the resolved id as an option instead; pinned with a raw-suggestion spec. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
This commit is contained in:
@@ -131,10 +131,7 @@ async function onPickExisting(hit) {
|
||||
// (operator-asked 2026-07-03).
|
||||
const pending = suggestions.findPending(hit.kind, hit.name, hit.id)
|
||||
if (pending) {
|
||||
await suggestions.accept({
|
||||
...pending,
|
||||
canonical_tag_id: pending.canonical_tag_id ?? hit.id,
|
||||
})
|
||||
await suggestions.accept(pending, { tagId: hit.id })
|
||||
await host.reloadTags()
|
||||
} else {
|
||||
await host.addExistingTag(hit.id)
|
||||
@@ -156,7 +153,7 @@ async function onPickNew(payload) {
|
||||
if (created && host.currentImageId === imageId) {
|
||||
const pending = suggestions.findPending(payload.kind, payload.name, created.id)
|
||||
if (pending) {
|
||||
await suggestions.accept({ ...pending, canonical_tag_id: created.id })
|
||||
await suggestions.accept(pending, { tagId: created.id })
|
||||
}
|
||||
}
|
||||
focusTagInput()
|
||||
|
||||
Reference in New Issue
Block a user