* refactor: extract shared asset URL helpers and add preview classification utils
- Extract getWorkspaceAssetInlineSrc and getWorkspaceAssetDownloadSrc
into @plane/utils/file so editor and attachment preview share the
same asset URL resolution
- Refactor editor/common to consume the shared helpers
- Add TAttachmentPreviewKind, TAttachmentPreviewItem types
- Add getAttachmentPreviewKind (extension-based classification),
isInlinePreviewSupported, canPreviewTextFile utilities
- Add unit vitest project to @plane/blocks for pure helper tests
- Cover all classification paths with 47 unit tests
* feat: add attachment preview components in @plane/blocks
Fullscreen Google Drive-style preview overlay with dark blurred
backdrop, top bar (filename + download + close), and type-specific
renderers:
- Image: centered with zoom in/out/reset controls
- Video: @plane/propel VideoPlayer
- Audio: native <audio controls>
- PDF: sandboxed iframe with fallback on load failure
- Text/Code: lazy-fetched with 5 MiB cap and auth credentials
- Unsupported: fallback panel with download action
Includes left/right arrow navigation (keys + buttons), backdrop
click-to-close, Escape to close, and Storybook stories with play
assertions for all 6 renderer variants.
* feat: add work item attachment preview controller
- toAttachmentPreviewItem mapper: TIssueAttachment -> TAttachmentPreviewItem
with full URL resolution via getFileURL
- useIssueAttachmentPreview hook: local open/close/navigation state with
memoized selectedItem and left/right traversal over attachment IDs
- IssueAttachmentPreviewDialog wrapper connecting @plane/blocks to web app
* feat: wire attachment preview into work item attachment lists
- attachment-list-item: replace window.open with onPreview callback
- attachment-item-list: own preview state, render preview dialog with
left/right navigation for collapsible widget list
- attachment-detail: replace Link with button + onPreview callback
- attachments-list: own preview state for card/grid view
- root: pass workspaceSlug and projectId to attachments-list
- Delete action remains unchanged in existing kebab menu
* chore: code refactoring
* fix: use asset_url directly for attachment preview to resolve 404
* chore: code refactoring
* chore: code refactoring