diff --git a/frontend/src/desktop/DesktopWorkspace.tsx b/frontend/src/desktop/DesktopWorkspace.tsx index 345638e..85b7968 100644 --- a/frontend/src/desktop/DesktopWorkspace.tsx +++ b/frontend/src/desktop/DesktopWorkspace.tsx @@ -19,6 +19,7 @@ import { PointerTrackingProvider, usePointerTracking } from './PointerTrackingCo import type { Identifier } from '../types/identifiers'; import type { DocumentsListEntry, Document } from '../types/documents'; import { usePreviewContext } from '../preview/PreviewContext'; +import { useAppState } from '../app/appState'; type TagLike = { id?: Identifier | null; label?: string; color?: string | null } | null; type OverlaySource = { url: string; alt?: string | null; mimeType?: string | null; }; @@ -51,7 +52,6 @@ export interface DesktopWorkspaceProps { onSelectionChange?: (selectedIds: Identifier[]) => void; onDocumentTagAttach?: (docId: Identifier, tagId: Identifier) => void; onDocumentTagDetach?: (docId: Identifier, tagId: Identifier) => void; - tenantId?: Identifier | null; viewId?: string | null; defaultCardSize?: number; } @@ -87,11 +87,12 @@ const DesktopWorkspaceContent: React.FC = ({ onSelectionChange, onDocumentTagAttach, onDocumentTagDetach, - tenantId, viewId, defaultCardSize = 200, }) => { const { openPreview } = usePreviewContext(); + const { tenant } = useAppState(); + const tenantId = tenant?.id as Identifier; const { addPointer, removePointer } = usePointerTracking(); const containerRef = useRef(null); const [isLayoutReady, setIsLayoutReady] = useState(false); diff --git a/frontend/src/documents/hooks/useDocumentsPanelProps.ts b/frontend/src/documents/hooks/useDocumentsPanelProps.ts index 2ea39d8..4bee8c6 100644 --- a/frontend/src/documents/hooks/useDocumentsPanelProps.ts +++ b/frontend/src/documents/hooks/useDocumentsPanelProps.ts @@ -64,7 +64,6 @@ export interface UseDocumentsPanelPropsArgs { folderOptions?: unknown[]; moveDocumentsToFolder?: (...args: unknown[]) => void; selectionValue: WorkspaceSelectionValue; - currentTenantId?: Identifier | null; } export type DocumentsPanelProps = ReturnType; @@ -118,7 +117,6 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => { folderOptions, moveDocumentsToFolder, selectionValue, - currentTenantId, } = props; return useMemo( @@ -173,7 +171,6 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => { folderOptions, onMoveDocumentsToFolder: moveDocumentsToFolder, selectionValue, - currentTenantId, }), [ activeCorrespondentFilters, @@ -223,7 +220,6 @@ const useDocumentsPanelProps = (props: UseDocumentsPanelPropsArgs) => { getDocumentAsset, folderOptions, selectionValue, - currentTenantId, ], ); }; diff --git a/frontend/src/documents/panel/DocumentsPanel.tsx b/frontend/src/documents/panel/DocumentsPanel.tsx index a681a5b..d6325dd 100644 --- a/frontend/src/documents/panel/DocumentsPanel.tsx +++ b/frontend/src/documents/panel/DocumentsPanel.tsx @@ -81,7 +81,6 @@ export interface DocumentsViewProps { activeCorrespondentIdSet?: Set | null; scrollRef?: RefObject; // Desk specific (optional for now or handled via intersection) - tenantId?: Identifier | null; viewId?: string | null; activeTagFilters?: Array; } @@ -137,7 +136,6 @@ const DocumentsPanelInner: React.FC = ({ selectedFolder = null, onDocumentTagAttach, onDocumentTagDetach, - currentTenantId, }): ReactNode => { const { setFocusedEntryKey, @@ -464,7 +462,6 @@ const DocumentsPanelInner: React.FC = ({ scrollRef, activeCorrespondentIdSet: activeCorrespondentIdSet, onCorrespondentClick: toggleCorrespondentFilter, - tenantId: currentTenantId, viewId, onEntryPointer, }; diff --git a/frontend/src/hooks/documents/useDocumentsWorkspace.ts b/frontend/src/hooks/documents/useDocumentsWorkspace.ts index 8cf5721..84b12cc 100644 --- a/frontend/src/hooks/documents/useDocumentsWorkspace.ts +++ b/frontend/src/hooks/documents/useDocumentsWorkspace.ts @@ -1191,7 +1191,6 @@ const useDocumentsWorkspace = ({ moveDocumentsToFolder, selectFolder, selectionValue: selection, - currentTenantId, }); const documentsTableProps = useMemo( () => ({