Skip to content

Conversation

@arjansingh
Copy link
Contributor

@arjansingh arjansingh commented Nov 5, 2025

Summary

  1. Add a getOptionLabel option to ComboWidget so users of it can map of custom labels to widget values. (e.g., "My Photo" -> "my_photo_1235.png").
  2. Utilize this ability in Cloud environment to map user uploaded filenames to their corresponding input asset.
  3. Copious unit tests to make sure I didn't (AFAIK) break anything during the refactoring portion of development.
  4. Bonus: Scope model browser to only show in cloud distributions until it's released elsewhere; should prevent some undesired UI behavior if a user accidentally enables the assetAPI.

Review Focus

Widget code: please double check the work there.

Screenshots (if applicable)

mapped-inputs-2025-11-04.mov

┆Issue is synchronized with this Notion page by Unito

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 11/05/2025, 04:02:01 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 11/05/2025, 04:19:16 AM UTC

📈 Summary

  • Total Tests: 498
  • Passed: 464 ✅
  • Failed: 0
  • Flaky: 4 ⚠️
  • Skipped: 30 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 455 / ❌ 0 / ⚠️ 4 / ⏭️ 30
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Bundle Size Report

Summary

  • Raw size: 12.2 MB baseline 12.2 MB — 🟢 -716 B
  • Gzip: 2.49 MB baseline 2.49 MB — 🟢 -312 B
  • Brotli: 1.96 MB baseline 1.96 MB — 🔴 +424 B
  • Bundles: 58 current • 58 baseline • 17 added / 17 removed

Category Glance
App Entry Points 🟢 -63.1 kB (3.24 MB) · Graph Workspace 🔴 +62.4 kB (791 kB) · Data & Services 🟢 -1 B (10.4 kB) · Vendor & Third-Party ⚪ 0 B (5.32 MB) · Other ⚪ 0 B (2.55 MB) · Panels & Settings ⚪ 0 B (293 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.24 MB (baseline 3.31 MB) • 🟢 -63.1 kB

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-zUwM8XLC.js (removed) 2.92 MB 🟢 -2.92 MB 🟢 -605 kB 🟢 -457 kB
assets/index-DsVqZtvD.js (new) 2.86 MB 🔴 +2.86 MB 🔴 +593 kB 🔴 +449 kB
assets/index-Dv04s-Ig.js (removed) 382 kB 🟢 -382 kB 🟢 -76.6 kB 🟢 -62.1 kB
assets/index-LABbT8Si.js (new) 382 kB 🔴 +382 kB 🔴 +76.6 kB 🔴 +62.1 kB
assets/index-D8yOdqwm.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +575 B 🔴 +487 B
assets/index-DTXds8Ct.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -576 B 🟢 -483 B

Status: 3 added / 3 removed

Graph Workspace — 791 kB (baseline 729 kB) • 🔴 +62.4 kB

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-DJI0ENJ4.js (new) 791 kB 🔴 +791 kB 🔴 +154 kB 🔴 +119 kB
assets/GraphView-Dyy-XWDh.js (removed) 729 kB 🟢 -729 kB 🟢 -142 kB 🟢 -110 kB

Status: 1 added / 1 removed

Views & Navigation — 8.18 kB (baseline 8.18 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-C9DKR6mg.js (removed) 8.18 kB 🟢 -8.18 kB 🟢 -2.48 kB 🟢 -2.17 kB
assets/UserSelectView-CnBerBDD.js (new) 8.18 kB 🔴 +8.18 kB 🔴 +2.47 kB 🔴 +2.17 kB

Status: 1 added / 1 removed

Panels & Settings — 293 kB (baseline 293 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CreditsPanel-CMwT6wSm.js (removed) 22.9 kB 🟢 -22.9 kB 🟢 -5.45 kB 🟢 -4.77 kB
assets/CreditsPanel-wcYt4oPM.js (new) 22.9 kB 🔴 +22.9 kB 🔴 +5.45 kB 🔴 +4.75 kB
assets/KeybindingPanel-2qbK87QK.js (removed) 15.3 kB 🟢 -15.3 kB 🟢 -3.78 kB 🟢 -3.32 kB
assets/KeybindingPanel-CNaWizUE.js (new) 15.3 kB 🔴 +15.3 kB 🔴 +3.78 kB 🔴 +3.33 kB
assets/ExtensionPanel-C9dzxBtl.js (new) 12.1 kB 🔴 +12.1 kB 🔴 +2.83 kB 🔴 +2.49 kB
assets/ExtensionPanel-CMZsUbOf.js (removed) 12.1 kB 🟢 -12.1 kB 🟢 -2.84 kB 🟢 -2.48 kB
assets/AboutPanel-BM4HpRbG.js (removed) 10.3 kB 🟢 -10.3 kB 🟢 -2.68 kB 🟢 -2.34 kB
assets/AboutPanel-Dd0Cx4qF.js (new) 10.3 kB 🔴 +10.3 kB 🔴 +2.67 kB 🔴 +2.34 kB
assets/ServerConfigPanel-Ba-9WSME.js (new) 8.23 kB 🔴 +8.23 kB 🔴 +2.17 kB 🔴 +1.91 kB
assets/ServerConfigPanel-pN2hcMW7.js (removed) 8.23 kB 🟢 -8.23 kB 🟢 -2.18 kB 🟢 -1.91 kB
assets/UserPanel-C2A-f0Pg.js (new) 7.94 kB 🔴 +7.94 kB 🔴 +2.07 kB 🔴 +1.8 kB
assets/UserPanel-C3fnz9w3.js (removed) 7.94 kB 🟢 -7.94 kB 🟢 -2.07 kB 🟢 -1.81 kB
assets/settings-0O6mq5to.js 24.3 kB 24.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BYaBy7dC.js 20.4 kB 20.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C3vygQN4.js 25.7 kB 25.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CbKYXyH0.js 22.7 kB 22.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCholIsI.js 25 kB 25 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DFX7vRkK.js 19.8 kB 19.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-INJLrcmT.js 31.3 kB 31.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-iR6BKRXe.js 23.7 kB 23.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-YjQmudNE.js 23.5 kB 23.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 12.6 kB (baseline 12.6 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyQueueButton-CeQ4v08g.js (new) 11.3 kB 🔴 +11.3 kB 🔴 +2.82 kB 🔴 +2.5 kB
assets/ComfyQueueButton-d1L9pL9N.js (removed) 11.3 kB 🟢 -11.3 kB 🟢 -2.83 kB 🟢 -2.49 kB
assets/UserAvatar.vue_vue_type_script_setup_true_lang-CY-Afo9h.js 1.29 kB 1.29 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

Data & Services — 10.4 kB (baseline 10.4 kB) • 🟢 -1 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-DfBQoB60.js (removed) 7.6 kB 🟢 -7.6 kB 🟢 -1.85 kB 🟢 -1.59 kB
assets/keybindingService-m2kfIA-1.js (new) 7.6 kB 🔴 +7.6 kB 🔴 +1.84 kB 🔴 +1.59 kB
assets/serverConfigStore-C6-plV2F.js (new) 2.79 kB 🔴 +2.79 kB 🔴 +891 B 🔴 +781 B
assets/serverConfigStore-Drx1xdev.js (removed) 2.79 kB 🟢 -2.79 kB 🟢 -888 B 🟢 -772 B

Status: 2 added / 2 removed

Utilities & Hooks — 1.07 kB (baseline 1.07 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Vendor & Third-Party — 5.32 MB (baseline 5.32 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-other-CI2CU2ff.js (new) 3.22 MB 🔴 +3.22 MB 🔴 +685 kB 🔴 +549 kB
assets/vendor-other-DTJaZ2wB.js (removed) 3.22 MB 🟢 -3.22 MB 🟢 -685 kB 🟢 -549 kB
assets/vendor-tiptap-BgnRckdA.js (new) 232 kB 🔴 +232 kB 🔴 +45.7 kB 🔴 +37.7 kB
assets/vendor-tiptap-BovKm-bo.js (removed) 232 kB 🟢 -232 kB 🟢 -45.7 kB 🟢 -37.7 kB
assets/vendor-vue-C1cscJ7w.js (new) 92.6 kB 🔴 +92.6 kB 🔴 +23.9 kB 🔴 +20.8 kB
assets/vendor-vue-D0cJmhlH.js (removed) 92.6 kB 🟢 -92.6 kB 🟢 -23.9 kB 🟢 -20.8 kB
assets/vendor-primevue-PESgPnbc.js 517 B 517 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-JDoAqkQm.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 3 added / 3 removed

Other — 2.55 MB (baseline 2.55 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/commands-B2KZRBmX.js 15.1 kB 15.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-Bw-ckyga.js 13.9 kB 13.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-C_NmM85I.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CuozCW4W.js 14 kB 14 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DGfVUJCR.js 16.2 kB 16.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-dOJNDogK.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiE551e.js 14.7 kB 14.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-Fw7mvqSy.js 13.1 kB 13.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-FXnO1W4Q.js 13.2 kB 13.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B2H4r1yK.js 70.7 kB 70.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BfrcYvru.js 59.4 kB 59.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BhRi1J0e.js 68.4 kB 68.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BUG9wuyt.js 80.3 kB 80.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C0hL5eRA.js 76.4 kB 76.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CkKZCT7r.js 58.7 kB 58.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D1RQ0Vb_.js 66.3 kB 66.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DdyfZOXg.js 67.6 kB 67.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DPE2NqRw.js 92.9 kB 92.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-3I1vPgv4.js 181 kB 181 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-B2huPGKQ.js 190 kB 190 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BWugyUzd.js 215 kB 215 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-bXqu6Stq.js 194 kB 194 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CtB2M3sY.js 229 kB 229 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D-rCrn-T.js 200 kB 200 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D38DSnl1.js 179 kB 179 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DAsU52ON.js 192 kB 192 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DnGONaA_.js 196 kB 196 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

@arjansingh arjansingh force-pushed the feat/input-mapping branch 2 times, most recently from 8c04ed9 to c440f6e Compare November 5, 2025 01:00
@arjansingh arjansingh changed the title Feat/input mapping feat(ComboWidget): add ability to have mapped inputs Nov 5, 2025
for (const value of values_list) {
try {
const label = this.options.getOptionLabel(String(value))
menu.addItem(label, value, menuOptions)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: one of the downsides of this approach is we don't get the fuzzy search filter because that requires setting the array directly.

Talked it over with @AustinMroz and we do think this is the easiest way to map duplicate labels to the correct value

{
limit = DEFAULT_LIMIT,
offset = 0
}: { limit?: number; offset?: number } = {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not using pagination yet but, at least we're setup to start doing it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrmmmm...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know yagni... but i think sooner is sooner than we think 😂

if you really want it removed, i can remove it.

@arjansingh arjansingh marked this pull request as ready for review November 5, 2025 04:02
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Nov 5, 2025
async function fetchInputFilesFromCloud(): Promise<AssetItem[]> {
return await assetService.getAssetsByTag('input', false)
return await assetService.getAssetsByTag('input', false, {
limit: INPUT_LIMIT
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@viva-jinyi I don't think reducing the limit from 500 to 100 should impact your Assets work, but let me know if it does and we can adjust.

Comment on lines +39 to +50
const NODE_MEDIA_TYPE_MAP: Record<string, 'image' | 'video' | 'audio'> = {
LoadImage: 'image',
LoadVideo: 'video',
LoadAudio: 'audio'
}

// Map node types to placeholder i18n keys
const NODE_PLACEHOLDER_MAP: Record<string, string> = {
LoadImage: 'widgets.uploadSelect.placeholderImage',
LoadVideo: 'widgets.uploadSelect.placeholderVideo',
LoadAudio: 'widgets.uploadSelect.placeholderAudio'
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option:

Suggested change
const NODE_MEDIA_TYPE_MAP: Record<string, 'image' | 'video' | 'audio'> = {
LoadImage: 'image',
LoadVideo: 'video',
LoadAudio: 'audio'
}
// Map node types to placeholder i18n keys
const NODE_PLACEHOLDER_MAP: Record<string, string> = {
LoadImage: 'widgets.uploadSelect.placeholderImage',
LoadVideo: 'widgets.uploadSelect.placeholderVideo',
LoadAudio: 'widgets.uploadSelect.placeholderAudio'
}
const NODE_MEDIA_TYPE_MAP = {
LoadImage: 'image',
LoadVideo: 'video',
LoadAudio: 'audio'
} as const
// Map node types to placeholder i18n keys
const NODE_PLACEHOLDER_MAP = {
LoadImage: 'widgets.uploadSelect.placeholderImage',
LoadVideo: 'widgets.uploadSelect.placeholderVideo',
LoadAudio: 'widgets.uploadSelect.placeholderAudio'
} as const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try this again but it cause some typecheck failure fun for me when i did it locally

]

const unknownHash =
'fffffffffffffffffffffffffffuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.png'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants