Workflow Node Canvas Summary Rendering#
When a workflow node is collapsed on the canvas, each node type renders a compact summary of its configured parameters via a dedicated node.tsx component. These components live at web/app/components/workflow/nodes/<node-type>/node.tsx and are rendered inside the node card. They are read-only displays β configuration happens in the panel, not on the card.
All summary components follow the same shell convention:
- Return
nullwhen the node has no meaningful configuration to display - Wrap content in
<div className="relative mb-1 px-3 py-1"> - Use
bg-workflow-block-parma-bgas the row background for parameter chips - Apply
w-0 grow truncate text-righton the value side for responsive overflow
Parameter Type Rendering Reference#
Model selectors#
The LLM and Parameter Extractor nodes render the ModelSelector component from web/app/components/header/account-setting/model-provider-page/model-selector in disabled mode, which shows the provider icon and model name as a compact badge.
import { ModelSelector } from '@/app/components/model-selector'
<ModelSelector value={{ provider, model: modelId }} models={textGenerationModelList} size="small" disabled />
The Tool node handles model-selector-typed configuration entries separately β it inspects tool_configurations[key]?.type === FormTypeEnum.modelSelector and displays only the .model field as a plain text string (not a full ModelSelector widget).
File / variable references#
File variables and other variable references are rendered via VariableLabelInNode β a memoized wrapper around the base VariableLabel with node-specific styling (w-full bg-workflow-block-parma-bg px-1 shadow-none). It renders a badge containing:
- VariableNodeLabel β source node icon + title
- VariableIcon β semantic icon for the variable type
- VariableName β variable path, optionally abbreviated when depth > 2
The Document Extractor node uses this directly for its variable_selector field . Variable color-coding is applied by useVarColor() in hooks.ts: exception variables β warning, loop β cyan, environment β violet, conversation β teal, global β orange, default β text-accent.
Special variable categories (env, conversation, global, RAG, system) are detected by helpers in variable/utils.ts and skip the source-node label in the badge.
Arrays / multi-select values#
In the Tool node, array-typed configuration values are detected with Array.isArray() and joined into a comma-separated string :
{tool_configurations[key].value.join(', ')}
String and number constants#
The Tool node dispatches on typeof at render time :
stringβ rendered directly (masked as'********'ifFormTypeEnum.secretInput)numberβ rendered as-is;NaNis shown as empty string
Inline variable references in text (template syntax)#
Nodes that display mixed text + variable content (e.g., HTTP url, Answer text) use ReadonlyInputWithSelectVar. It parses {{#variable.path#}} patterns, splits the string around them, and renders each variable segment as a VariableLabelInText badge inline. If the variable path has more than two segments, notShowFullPath=true truncates the display .
Dataset lists#
The Knowledge Retrieval node renders a list of dataset chips with AppIcon + name . Each chip uses the standard bg-workflow-block-parma-bg row style with w-0 grow truncate for the dataset name.
Condition groups#
The If-Else node renders each condition branch using a ConditionValue component, with AND/OR logical operator labels between conditions . Unset conditions show a placeholder row with "condition not set up."
Shared Base Components#
| Component | Path | Used for |
|---|---|---|
VariableLabelInNode | variable-label/variable-label-in-node.tsx | File/variable reference chips in node summaries |
VariableLabelInText | variable-label/variable-label-in-text.tsx | Inline variable badges inside ReadonlyInputWithSelectVar |
ReadonlyInputWithSelectVar | _base/components/readonly-input-with-select-var.tsx | Template strings with embedded variable references |
SettingItem | _base/components/setting-item.tsx | Generic label + value row with optional status dot |
InfoPanel | _base/components/info-panel.tsx | Title + multi-line content block |
Group / GroupLabel | _base/components/group.tsx | Grouped sections (e.g., agent models and tools) |
Adding a New Node Summary#
To add a canvas summary to a new node type:
- Create
web/app/components/workflow/nodes/<type>/node.tsxexporting a memoizedFC<NodeProps<YourNodeType>>. - Return
nullif the node has no configured data worth showing. - Wrap content in
<div className="relative mb-1 px-3 py-1">. - Reuse the shared base components above for consistency β avoid one-off layout or color choices.
- Register the component in the node registry (look for how existing nodes wire
node.tsxinto the card renderer, typically through the block definitions inweb/app/components/workflow/nodes/_base).