The previous attempt added document.from_ingestion_api to the SMB UI patch
to distinguish API-ingested SMB files from normal File uploads after we
switched the connector source from ingestion_api to file.
This caused a TypeScript build error because from_ingestion_api is not
exposed on the frontend document types (OnyxDocument / SearchDocWithContent).
Fix: rely on document.metadata?.smb_source instead.
- The connector injects metadata.smb_source on every SMB document (files
and index), so it is a reliable discriminator.
- Normal File uploads via the UI never carry this metadata key, so the
preview-suppression and clipboard-copy behavior remains scoped to SMB
docs only.
Updated in both locations of branding/smb/smb-ui.patch:
- SearchCard.tsx (licensed search view click handler)
- lib/search/utils.ts (chat citation openDocument helper)