feat: wire essentials_category for Essentials tab display#9091
feat: wire essentials_category for Essentials tab display#9091christian-byrne wants to merge 2 commits intomainfrom
Conversation
- Add essentialsNodes.ts as single source of truth for node categorization and ordering, consolidating three separate lists - Pass essentials_category through subgraphStore from blueprints and global subgraph data to node definitions - Add essentials_category to SubgraphDefinitionBase schema - Refactor toolkitNodes.ts, nodeSource.ts, nodeOrganizationService.ts to import from the centralized constants - Add tests for constants integrity and subgraph passthrough Fixes COM-15221 Amp-Thread-ID: https://ampcode.com/threads/T-019c83de-f7ab-7779-a451-0ba5940b56a9
🎨 Storybook: ✅ Built — View Storybook |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis pull request consolidates node categorization into a new centralized constants module, establishing node categories, category mappings, and toolkit-specific node sets. It refactors existing code to use these constants, adds essentials_category field propagation through subgraph definitions, and validates the configuration with comprehensive tests. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🎭 Playwright: ✅ 531 passed, 0 failed · 2 flaky📊 Browser Reports
|
📦 Bundle: 4.37 MB gzip 🟢 -141 BDetailsSummary
Category Glance App Entry Points — 17.9 kB (baseline 17.9 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 916 kB (baseline 916 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 — 47 kB (baseline 47 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 2.51 MB (baseline 2.51 MB) • 🔴 +196 BStores, services, APIs, and repositories
Status: 13 added / 13 removed Utilities & Hooks — 58.3 kB (baseline 58.3 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 12 added / 12 removed Vendor & Third-Party — 8.83 MB (baseline 8.83 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 7.62 MB (baseline 7.62 MB) • ⚪ 0 BBundles that do not match a named category
Status: 48 added / 48 removed |
|
Updating Playwright Expectations |
|
Sorry about the late review, taking a look now |
benceruleanlu
left a comment
There was a problem hiding this comment.
- indexOf is case sensitive, the backend PR adds title cased categories, while the frontend expects lowercased, this will cause mismatches
- I don't know if snapshot changes are expected
Summary
Wire
essentials_categorythrough from backend to the Essentials tab UI. Creates a single source of truth for node categorization and ordering.Changes
New file —
src/constants/essentialsNodes.ts:ESSENTIALS_NODES(ordered nodes per category),ESSENTIALS_CATEGORIES(folder display order),ESSENTIALS_CATEGORY_MAP(flat lookup),TOOLKIT_NOVEL_NODE_NAMES(telemetry),TOOLKIT_BLUEPRINT_MODULESRefactored files:
src/types/nodeSource.ts: Removed inlineESSENTIALS_CATEGORY_MOCK, importsESSENTIALS_CATEGORY_MAPfrom centralized constantssrc/services/nodeOrganizationService.ts: Removed inlineNODE_ORDER_BY_FOLDER, importsESSENTIALS_NODESandESSENTIALS_CATEGORIESsrc/constants/toolkitNodes.ts: Re-exports fromessentialsNodes.tsinstead of maintaining a separate listSubgraph passthrough:
src/stores/subgraphStore.ts: Passesessentials_categoryfromGlobalSubgraphDataand extracts it fromdefinitions.subgraphs[0]as fallbacksrc/platform/workflow/validation/schemas/workflowSchema.ts: Addedessentials_categorytoSubgraphDefinitionBaseandzSubgraphDefinitionTests:
src/constants/essentialsNodes.test.ts: 6 tests validating no duplicates, complete coverage, basics exclusionsrc/stores/subgraphStore.test.ts: 2 tests for essentials_category passthroughAll 43 relevant tests pass. Typecheck, lint, format clean.
Depends on: Comfy-Org/ComfyUI#12573
Fixes COM-15221
┆Issue is synchronized with this Notion page by Unito