feat: add getAssetFilename util with fallback chain#8309
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019bf2bd-5679-72ea-9089-215b9152710d Co-authored-by: Amp <amp@ampcode.com>
📝 WalkthroughWalkthroughAdds a new exported utility Changes
Possibly related PRs
Suggested reviewers
✨ Finishing touches
Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/25/2026, 01:40:41 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Tests:
|
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 22.8 kB (baseline 22.8 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 957 kB (baseline 957 kB) • 🟢 -14 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 462 kB (baseline 462 kB) • 🟢 -8 BConfiguration panels, inspectors, and settings screens
Status: 12 added / 12 removed User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.83 kB (baseline 2.83 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 33.7 kB (baseline 33.7 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 3.18 MB (baseline 3.18 MB) • 🔴 +175 BStores, services, APIs, and repositories
Status: 8 added / 8 removed Utilities & Hooks — 25.2 kB (baseline 25.2 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 7 added / 7 removed Vendor & Third-Party — 10.7 MB (baseline 10.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 6.43 MB (baseline 6.43 MB) • 🟢 -192 BBundles that do not match a named category
Status: 34 added / 34 removed |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/platform/assets/utils/createModelNodeFromAsset.ts (1)
73-86: Error messages are misleading.The error message on line 76 references
user_metadata.filenamespecifically, butgetAssetFilename()may have resolved the value frommetadata.filenameorasset.nameinstead. Additionally,typeof filenamewill always be'string'sincegetAssetFilename()guarantees a string return type.🛠️ Suggested fix for clearer error messages
if (filename.length === 0) { console.error( - `Asset ${validAsset.id} has invalid user_metadata.filename (expected non-empty string, got ${typeof filename})` + `Asset ${validAsset.id} has empty filename (resolved from user_metadata, metadata, or asset.name)` ) return { success: false, error: { code: 'INVALID_ASSET', - message: `Invalid filename (expected non-empty string, got ${typeof filename})`, + message: 'Asset filename is empty', assetId: validAsset.id } } }
c97136b
## Summary ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8309-feat-add-getAssetFilename-util-with-fallback-chain-2f36d73d36508141be81ecc52c0a2858) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp <amp@ampcode.com>
Summary
┆Issue is synchronized with this Notion page by Unito