fix: disable inspect for non-previewable assets#8989
Conversation
Co-authored-by: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com>
Co-authored-by: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com>
This stack of pull requests is managed by Graphite. Learn more about stacking. |
…bar-tab-scaffold # Conflicts: # src/components/queue/QueueOverlayHeader.vue # src/components/sidebar/tabs/AssetsSidebarTab.vue # src/components/ui/Popover.vue
## Summary Fix 3D inspect dialog rendering by wrapping `Load3dViewerContent` with `defineAsyncComponent` before passing it to `dialogStore.showDialog`. ## Changes - Update `AssetsSidebarTab` to lazy-load `Load3dViewerContent` via `defineAsyncComponent(() => import(...))`. ## Why Passing a raw `() => import(...)` loader to the dialog store can render `[object Promise]` instead of the component in this path. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8990-fix-load-3D-dialog-content-with-defineAsyncComponent-30c6d73d365081e7ba82cc8282943756) by [Unito](https://www.unito.io)
98e2789 to
f961291
Compare
085aedb to
50698de
Compare
Merge activity
|
The base branch was changed.
…nspect-guard # Conflicts: # packages/shared-frontend-utils/src/formatUtil.ts # src/components/sidebar/tabs/AssetsSidebarTab.vue # src/platform/assets/components/MediaAssetCard.vue # src/platform/assets/components/MediaAssetFilterBar.vue # src/platform/assets/components/MediaVideoTop.test.ts
📦 Bundle: 4.37 MB gzip 🔴 +156 BDetailsSummary
Category Glance App Entry Points — 21.5 kB (baseline 21.5 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 942 kB (baseline 942 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 68.8 kB (baseline 68.8 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 436 kB (baseline 436 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed User & Accounts — 16 kB (baseline 16 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed Editors & Dialogs — 738 B (baseline 738 B) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 1 added / 1 removed UI Components — 43.2 kB (baseline 43.2 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 2.51 MB (baseline 2.51 MB) • 🔴 +614 BStores, services, APIs, and repositories
Status: 13 added / 13 removed Utilities & Hooks — 57.7 kB (baseline 57.7 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 12 added / 12 removed Vendor & Third-Party — 8.86 MB (baseline 8.86 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 7.61 MB (baseline 7.61 MB) • ⚪ 0 BBundles that do not match a named category
Status: 47 added / 47 removed |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/shared-frontend-utils/src/formatUtil.test.ts (1)
201-213: Prefer function reference over string literal indescribeTest coverage is complete (all 6
MediaTypevalues exercised). Minor: the repo convention isdescribe(isPreviewableMediaType, ...)over a string literal, matching thevitest/prefer-describe-function-titlerule applied across the codebase.♻️ Suggested refactor
- describe('isPreviewableMediaType', () => { + describe(isPreviewableMediaType, () => {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/shared-frontend-utils/src/formatUtil.test.ts` around lines 201 - 213, Replace the string title in the test describe block with a direct reference to the function under test: change describe('isPreviewableMediaType', ...) to describe(isPreviewableMediaType, ...) so the test suite follows the vitest/prefer-describe-function-title convention; update only the describe call surrounding the existing it blocks referencing isPreviewableMediaType.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/shared-frontend-utils/src/formatUtil.test.ts`:
- Around line 201-213: Replace the string title in the test describe block with
a direct reference to the function under test: change
describe('isPreviewableMediaType', ...) to describe(isPreviewableMediaType, ...)
so the test suite follows the vitest/prefer-describe-function-title convention;
update only the describe call surrounding the existing it blocks referencing
isPreviewableMediaType.

Summary
Prevent text/other assets from opening a blank fullscreen viewer by restricting inspect/zoom to previewable media kinds.
Changes
isPreviewableMediaTypehelper in sharedformatUtil.AssetsSidebarTab,MediaAssetCard, andMediaAssetContextMenuusing an allowlist (image,video,audio,3D).isPreviewableMediaType.Why
ResultGalleryonly renders image/video/audio; text/other assets could previously enter fullscreen with no renderable content.Review Focus
┆Issue is synchronized with this Notion page by Unito