Repository navigation
fix: default dynamic combo migration options to an empty array - #18035
claude[bot] wants to merge 1 commit into
Conversation
transformInputSpecV1ToV2 drops the options key when a COMFY_DYNAMICCOMBO_V3 V1 tuple has no options object at all (e.g. ['COMFY_DYNAMICCOMBO_V3', undefined]), which is exactly what subgraphStore.ts's registerNodeDef produces for promoted dynamic-combo boundary inputs. Downstream, flattenInputSpecs asserts on the missing options array (Sentry CLOUD-FRONTEND-STAGING-4KQ). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DqXqWkUXB8eNLEET45fpmo
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 2033 passed, 0 failed · 4 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 9.92 MB gzip ⚪ 0 BDetailsSummary
Category Glance App Entry Points — 3.77 kB (baseline 3.77 kB) • ⚪ 0 BMain entry bundles and manifests Status: 1 unchanged Graph Workspace — 1.45 MB (baseline 1.45 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 3 unchanged Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 18 unchanged Panels & Settings — 637 kB (baseline 637 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 27 unchanged User & Accounts — 37.9 kB (baseline 37.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 11 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 8 unchanged UI Components — 124 kB (baseline 124 kB) • ⚪ 0 BReusable component library chunks Status: 16 unchanged Data & Services — 3.85 MB (baseline 3.85 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 16 unchanged Utilities & Hooks — 565 kB (baseline 565 kB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 38 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 17.7 MB (baseline 17.7 MB) • ⚪ 0 BBundles that do not match a named category Status: 297 unchanged ⚡ Performance
|
|
Superseded by #18037 (same change, commits rewritten without AI co-author trailers). |
Requested via Slack thread
Before / After
Before: A subgraph-blueprint synthetic nodedef (built in
subgraphStore.ts) that promotes aCOMFY_DYNAMICCOMBO_V3boundary input produces a V1 tuple of['COMFY_DYNAMICCOMBO_V3', undefined].transformInputSpecV1ToV2turned this into a V2 spec with nooptionskey at all, soflattenInputSpecshit its "expected an options array on dynamic combo" assertion and reported it to Sentry. Visibly, this dropped the nested option rows from the node's preview/help tab for these subgraph blueprints — cosmetic, not a crash.After: the same input now gets
options: [], so the assertion is never tripped and the preview/help tab renders normally (with no nested options, matching reality, instead of silently failing).Why
Fixes Sentry issue CLOUD-FRONTEND-STAGING-4KQ (
[Assertion failed]: flattenInputSpecs: expected an options array on dynamic combo).transformInputSpecV1ToV2(src/schemas/nodeDef/migration.ts) now special-casesCOMFY_DYNAMICCOMBO_V3the same way it already special-casesCHART: when the V1 tuple supplies no options object at all (inputSpecV1[1] === undefined), it defaultsoptionsto[]so the resulting V2 spec always satisfiesflattenInputSpecs's expectation of an options array. This only covers the "no options object at all" case produced bysubgraphStore.ts'sregisterNodeDef; a dynamic combo whose options object is present but missing itsoptionskey still throws as before (see the existing "skips a dynamic combo whose options field is not an array" test), so a genuinely malformed nodedef is still surfaced.Red-Green Verification
test: add failing test for dynamic combo migration missing optionsmigration.ts)fix: default dynamic combo migration options to an empty arraymigration.test.tsandinputSpecUtil.test.tsunaffectedTest Plan
src/schemas/nodeDef/migration.test.ts, confirmed failing locally against pre-fix codemigration.test.ts(23 → 24 tests) andinputSpecUtil.test.ts(5 tests) suites pass, including the existing "skips a dynamic combo whose options field is not an array" regression testpnpm typecheckclean🤖 Generated with Claude Code
https://claude.ai/code/session_01DqXqWkUXB8eNLEET45fpmo
Generated by Claude Code