Skip to content

Add auto-generated descriptions for all node types#313

Merged
Edwardvaneechoud merged 4 commits intomainfrom
claude/add-node-descriptions-Ehe2r
Feb 6, 2026
Merged

Add auto-generated descriptions for all node types#313
Edwardvaneechoud merged 4 commits intomainfrom
claude/add-node-descriptions-Ehe2r

Conversation

@Edwardvaneechoud
Copy link
Copy Markdown
Owner

Summary

This PR adds automatic description generation for all node schema classes by implementing a get_default_description() method. These descriptions provide human-readable summaries of node configurations and are used as fallbacks when users haven't provided custom descriptions.

Key Changes

  • Base method in NodeBase: Added get_default_description() to the base class that returns an empty string by default, allowing subclasses to override with meaningful descriptions.

  • Node-specific implementations: Implemented get_default_description() for 25+ node types:

    • Transform nodes: NodeSelect, NodeFilter, NodeSort, NodeFormula, NodeGroupBy, NodePivot, NodeUnpivot, NodeUnique, NodeGraphSolver, NodeRecordId, NodeTextToRows, NodeSample, NodePolarsCode
    • Join nodes: NodeJoin, NodeFuzzyMatch, NodeCrossJoin
    • I/O nodes: NodeRead, NodeOutput, NodeManualInput, NodeDatabaseReader, NodeDatabaseWriter, NodeCloudStorageReader, NodeCloudStorageWriter
    • Other nodes: NodeUnion, NodeExternalSource
  • Smart truncation: Long expressions (filters, formulas, queries) are truncated to 60-80 characters with "..." suffix for readability.

  • Contextual formatting: Each node type generates descriptions appropriate to its function:

    • Filters show the condition (e.g., "age > 30")
    • Joins show the join type and key columns (e.g., "inner join on id = user_id")
    • Aggregations show grouping and operations (e.g., "By category: sum(amount), count(id)")
    • File operations show file names and types (e.g., "users.csv (csv)")
  • Flow node integration: Updated FlowNode.set_node_information() to use the new method as a fallback when user-provided descriptions are empty.

  • Comprehensive test suite: Added 635 lines of tests covering all node types with various configurations, ensuring descriptions are accurate and handle edge cases.

Implementation Details

  • User-provided descriptions take priority over auto-generated ones
  • Descriptions gracefully handle missing or incomplete configurations
  • Multiple items are shown with truncation indicators (e.g., "+2 more") when there are more than 3
  • The implementation is backward compatible—existing code continues to work unchanged

Add get_default_description() method to NodeBase and all subclasses that
generates human-readable descriptions from node configuration content.
When a user hasn't set a custom description, the auto-generated one is
used as a fallback in flow_node.py.

Each node type produces a contextual description, for example:
- Filter: "age > 30" or "status = active"
- Join: "inner join on id = user_id"
- Formula: "total = col('price') * col('quantity')"
- GroupBy: "By category: sum(amount), count(id)"
- Read: "users.csv (csv)"
- Sort: "Sort by name asc, date desc"

https://claude.ai/code/session_01KbLSxbk1ki1NEAhHnwZ9jm
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 6, 2026

Deploy Preview for flowfile-wasm canceled.

Name Link
🔨 Latest commit dcafa12
🔍 Latest deploy log https://app.netlify.com/projects/flowfile-wasm/deploys/6985e36bcbbcd000084a019c

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 6, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.88889% with 23 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...lowfile_core/flowfile_core/schemas/input_schema.py 91.57% 16 Missing ⚠️
flowfile_core/flowfile_core/routes/routes.py 12.50% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

The GET /node/description endpoint was returning setting_input.description
directly, which is always empty unless the user explicitly sets one.
Now it falls back to get_default_description() when no user description
is set, matching the logic already in set_node_information().

https://claude.ai/code/session_01KbLSxbk1ki1NEAhHnwZ9jm
The description endpoint now returns {description, is_auto_generated}
so the frontend knows whether to refresh after settings updates.

Backend:
- Add NodeDescriptionResponse model with is_auto_generated flag
- Update GET /node/description to return structured response

Frontend:
- Update NodeDescriptionEntry type to include is_auto_generated
- Add separate NodeReferenceDictionary type for node references
- After any settings update (updateSettingsDirectly, updateSettings,
  updateUserDefinedSettings), auto-refresh descriptions that were
  system-generated while leaving user-provided ones untouched
- Add refreshAutoGeneratedDescription() store action
- Update results.vue to read from the new entry structure

https://claude.ai/code/session_01KbLSxbk1ki1NEAhHnwZ9jm
@Edwardvaneechoud Edwardvaneechoud merged commit e1756eb into main Feb 6, 2026
21 checks passed
@Edwardvaneechoud Edwardvaneechoud deleted the claude/add-node-descriptions-Ehe2r branch February 6, 2026 13:37
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.

3 participants