mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-25 20:15:37 +02:00
fix(editor): decouple description uploads from attachment records
Description editor uploads no longer pass issueId to the upload API. This avoids stale attachment records when users delete images from the editor — the URL already lives in the markdown content. Comment/reply uploads continue linking to the issue for agent discovery. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -336,9 +336,11 @@ export function IssueDetail({ issueId, onDelete, defaultSidebarOpen = true, layo
|
||||
);
|
||||
|
||||
const descEditorRef = useRef<ContentEditorRef>(null);
|
||||
// Description uploads don't pass issueId — the URL lives in the markdown.
|
||||
// This avoids stale attachment records when users delete images from the editor.
|
||||
const handleDescriptionUpload = useCallback(
|
||||
(file: File) => uploadWithToast(file, { issueId: id }),
|
||||
[uploadWithToast, id],
|
||||
(file: File) => uploadWithToast(file),
|
||||
[uploadWithToast],
|
||||
);
|
||||
|
||||
const deleteIssueMutation = useDeleteIssue();
|
||||
|
||||
Reference in New Issue
Block a user