feat(fc2b): wire SuggestionsPanel + rename into TagPanel; reject-on-remove
TagPanel now renders SuggestionsPanel below the current-tags area and adds a per-chip kebab → Rename… (TagRenameDialog). modal store's removeTag now also POSTs suggestions/dismiss after the delete so removing an auto-applied tag records a per-image rejection and the allowlist maintenance sweep won't re-apply it (closes the remove→re-apply loop identified in the spec). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,13 @@ export const useModalStore = defineStore('modal', () => {
|
||||
const prev = current.value.tags
|
||||
current.value.tags = current.value.tags.filter(t => t.id !== tagId)
|
||||
try {
|
||||
// FC-2b: removal also records a per-image rejection (suggestions/dismiss
|
||||
// is the rejection-recording endpoint) so the allowlist maintenance
|
||||
// task won't re-apply this tag to this image.
|
||||
await api.delete(`/api/images/${currentImageId.value}/tags/${tagId}`)
|
||||
await api.post(`/api/images/${currentImageId.value}/suggestions/dismiss`, {
|
||||
body: { tag_id: tagId }
|
||||
})
|
||||
} catch (e) {
|
||||
current.value.tags = prev
|
||||
window.__fcToast?.({ text: `Failed to remove tag: ${e.message}`, type: 'error' })
|
||||
|
||||
Reference in New Issue
Block a user