Skip to content

feat: add essentials_category to nodes and blueprints for Essentials tab#12573

Draft
christian-byrne wants to merge 1 commit intomasterfrom
toolkit/wire-essentials-categorization
Draft

feat: add essentials_category to nodes and blueprints for Essentials tab#12573
christian-byrne wants to merge 1 commit intomasterfrom
toolkit/wire-essentials-categorization

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Feb 22, 2026

Summary

Add essentials_category / ESSENTIALS_CATEGORY to 12 node classes and all 36 blueprint JSONs so the frontend Essentials tab can categorize and order them correctly.

Changes

Node classes (12 total):

  • nodes.py: LoadImage, SaveImage, PreviewImage, LoadImageMask
  • nodes_post_processing.py: ImageBlend, ImageCropV2, ImageScaleBy
  • nodes_video.py: Video Slice
  • nodes_audio.py: EmptyLatentAudio, SaveAudioMP3
  • nodes_images.py: ImageCompare (via nodes_image_compare.py)
  • nodes_recraft.py: RecraftVectorizeImageNode
  • nodes_kling.py: KlingOmniProEditVideoNode

Blueprints (36 JSONs):

  • Added essentials_category field to definitions.subgraphs[0] in every blueprint

Backend plumbing:

  • app/subgraph_manager.py: Added essentials_category to SubgraphEntry TypedDict and extraction logic in get_blueprint_subgraphs

Fixes COM-15221

API Node PR Checklist

Scope

  • Is API Node Change

Pricing & Billing

  • Need pricing update
  • No pricing update

If Need pricing update:

  • Metronome rate cards updated
  • Auto‑billing tests updated and passing

QA

  • QA done
  • QA not required

Comms

  • Informed Kosinkadink

Add ESSENTIALS_CATEGORY or essentials_category to 12 node classes and all
36 blueprint JSONs. Update SubgraphEntry TypedDict and subgraph_manager to
extract and pass through the field.

Fixes COM-15221

Amp-Thread-ID: https://ampcode.com/threads/T-019c83de-f7ab-7779-a451-0ba5940b56a9
@notion-workspace
Copy link

@coderabbitai
Copy link

coderabbitai bot commented Feb 22, 2026

📝 Walkthrough

Walkthrough

The PR introduces an optional essentials_category field to the SubgraphEntry TypedDict in the subgraph manager, with enhanced loading logic to populate this metadata from blueprint JSON definitions. Correspondingly, multiple blueprint files are updated to include essentials_category values such as "Image Tools", "Image Generation", "Video Generation", and "Text Generation" for categorization purposes. Several blueprint files also undergo minor updates including input field adjustments, version bumps, and widget value modifications. The majority of remaining blueprint file changes involve formatting-only modifications.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective: adding essentials_category metadata to nodes and blueprints for frontend Essentials tab categorization.
Description check ✅ Passed The description comprehensively covers the PR's scope, listing affected files, changes made, and backend modifications while remaining on-topic and detailed.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/subgraph_manager.py (1)

106-115: Avoid swallowing blueprint parse errors silently.
The blanket except Exception: pass makes JSON/IO issues hard to diagnose. Consider narrowing the exception and logging at least at debug level.

💡 Suggested tweak
+import logging
...
+logger = logging.getLogger(__name__)
-                except Exception:
-                    pass
+                except (OSError, json.JSONDecodeError) as exc:
+                    logger.debug("Failed to read essentials_category from %s: %s", file, exc)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/subgraph_manager.py` around lines 106 - 115, The try/except is currently
swallowing all errors when reading/parsing blueprint files; change the block
around opening/parsing the file (the with open(...) as f, json.load into
bp_data, subgraphs extraction and setting entry['essentials_category']) to catch
specific errors (json.JSONDecodeError and OSError) and log the exception at
debug or warning level (e.g., logger.debug or logger.warning) including the
filename and error details, while allowing truly unexpected exceptions to
propagate (or re-raise them) so they are not silently ignored.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/subgraph_manager.py`:
- Around line 106-115: The try/except is currently swallowing all errors when
reading/parsing blueprint files; change the block around opening/parsing the
file (the with open(...) as f, json.load into bp_data, subgraphs extraction and
setting entry['essentials_category']) to catch specific errors
(json.JSONDecodeError and OSError) and log the exception at debug or warning
level (e.g., logger.debug or logger.warning) including the filename and error
details, while allowing truly unexpected exceptions to propagate (or re-raise
them) so they are not silently ignored.

@christian-byrne christian-byrne marked this pull request as draft February 22, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant