Remove asset/document hydration pipeline and introduce client-side cache updates for correspondents, tags, and search results

This commit is contained in:
2025-11-20 02:18:33 +01:00
parent b76f1df27f
commit 0eb4c0a294
14 changed files with 316 additions and 329 deletions
@@ -61,7 +61,6 @@ interface DocumentViewerPanelProps extends DocumentSummarySectionProps {
contentType?: string | null;
filename?: string | null;
} | null;
hydrateDocument?: (doc: DocumentLike | null) => DocumentLike | null;
ensureAssetUrl?: (docId: string | number, asset: AssetLike, options?: { start?: number; limit?: number }) => Promise<unknown>;
getDocumentAsset?: (doc: DocumentLike | null, type: string) => AssetLike | null;
ensurePreviewData?: (docId: string | number, options?: { signal?: AbortSignal }) => Promise<DocumentLike | null>;
@@ -124,7 +123,6 @@ export const createDocumentViewerHeaderActions = ({
const DocumentViewerPanel: React.FC<DocumentViewerPanelProps> = ({
document,
documentLink,
hydrateDocument,
tagLookupById,
tagOptions,
onTagAdd,
@@ -291,12 +289,6 @@ const DocumentViewerPanel: React.FC<DocumentViewerPanelProps> = ({
setZoomOverlayOpen(false);
}, [effectiveDocumentLink?.url, document?.id]);
useEffect(() => {
if (hydrateDocument && document?.id) {
hydrateDocument(document.id);
}
}, [hydrateDocument, document?.id]);
const panelRef = useRef<HTMLDivElement | HTMLFormElement | HTMLElement | null>(null);
const isStackedLayout = useViewerLayoutMode(panelRef, document?.id);