fix(ui): cascade-remove extracted document attachments when parent is removed (#2432)

When a document (PPTX, DOCX, XLSX, ODP, ODT, ODS) is attached,
extracted slide images were left orphaned after removing the
parent text entry. This adds a sourceDocumentId field to
AttachedFile that links all entries from the same document
extraction, and cascades removal of all entries in the group
when any one is removed.

Fixes #2426

Co-authored-by: chiamsun <chiamsun@users.noreply.github.com>
This commit is contained in:
Chiam
2026-08-06 22:38:34 +03:00
committed by GitHub
co-authored by chiamsun
parent fe331c093b
commit 2c331e2f8b
3 changed files with 107 additions and 1 deletions
@@ -21,6 +21,9 @@ export interface AttachedFile {
serverPath?: string;
vscodePath?: string;
vscodeSource?: 'file' | 'selection';
/** Shared ID linking entries extracted from the same document (PPTX, DOCX, etc.).
* Removing any entry with this ID cascades to all entries in the group. */
sourceDocumentId?: string;
}
export type EditPermissionMode = 'allow' | 'ask' | 'deny' | 'full';