-
Notifications
You must be signed in to change notification settings - Fork 6.6k
refactor: improve output selection logic and edge updating in Generic… #8254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #8254 will degrade performances by 36.43%Comparing Summary
Benchmarks breakdown
|
… NodeOutputs component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small requests but otherwise looks good
const hasGroupOutputs = outputs?.some?.((output) => output.group_outputs); | ||
const isConditionalRouter = nodeType === "ConditionalRouter"; // Keep as fallback | ||
const shouldShowDropdown = | ||
outputs.length > 1 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the above are condition so should this one
const outputWithSelection = data.node?.outputs?.find( | ||
(output) => output.selected, | ||
); | ||
return outputWithSelection || null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just return outputWithSelection?
WalkthroughThe changes introduce a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend
participant Backend
User->>Frontend: Interact with node outputs
Frontend->>Backend: Fetch node/output metadata (includes group_outputs)
Backend-->>Frontend: Return outputs with group_outputs property
alt group_outputs is true or allows_loop or node is ConditionalRouter
Frontend->>Frontend: Render all outputs directly (no dropdown)
else
Frontend->>Frontend: Render dropdown for output selection
User->>Frontend: Select output from dropdown
Frontend->>Frontend: Render selected output
end
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (2)
src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (1)
1-4351
: 💡 Verification agent🧩 Analysis chain
Verify completeness of
group_outputs
across all outputs definitions
To avoid omissions, run a check to ensure everyoutputs
object in the JSON has agroup_outputs
field:
🏁 Script executed:
#!/bin/bash # Identify any outputs missing the group_outputs property jq -r ' .data.nodes[] .data.node.outputs[] | select(has("group_outputs") | not) | .name ' src/backend/base/langflow/initial_setup/starter_projects/Sequential\ Tasks\ Agents.jsonLength of output: 324
🏁 Script executed:
#!/bin/bash # List all outputs missing the `group_outputs` property, along with their node IDs jq -r ' .data.nodes[] | .data as $d | ($d.node.outputs? // []) | .[] | select(has("group_outputs") | not) | "\($d.id): \(.name)" ' 'src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json'Length of output: 367
Add missing
group_outputs
to tool outputsThe
component_as_tool
outputs in these nodes lack agroup_outputs
field. Please update each output definition to include"group_outputs": false
(ortrue
if grouping is intended):• YfinanceComponent-Adjq6:
component_as_tool
• CalculatorComponent-9O7Ap:component_as_tool
• TavilySearchComponent-6ezaX:component_as_tool
This ensures consistency with other outputs and prevents rendering issues.
src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json (1)
1651-1662
: 🛠️ Refactor suggestion
⚠️ Potential issueMissing
group_outputs
flag on Parser output
All other component outputs explicitly set"group_outputs": false
. To keep behavior consistent and ensure the Parser’s output isn’t grouped in the frontend, please add the flag here.{ "allows_loop": false, "cache": true, "display_name": "Parsed Text", + "group_outputs": false, "method": "parse_combined_text", "name": "parsed_text", "selected": "Message", "tool_mode": true, "types": [ "Message" ], "value": "__UNDEFINED__" }
🧹 Nitpick comments (3)
src/backend/base/langflow/template/field/base.py (1)
211-213
: Addgroup_outputs
to Output model – ensure docs and tests.The new
group_outputs: bool = False
field correctly defaults to the existing non-grouped behavior and will be included in the serialized output. To maintain code quality and prevent regressions, please:
- Update any relevant documentation or README to describe the purpose and default of
group_outputs
.- Add unit tests that confirm:
- The default serialization includes
"group_outputs": false
.- Toggling
group_outputs
totrue
is properly honored in the serialized model.src/frontend/src/CustomNodes/GenericNode/index.tsx (2)
55-63
: UI/UX: button hit-area might be too smallThe hidden-outputs toggle was shrunk from 1.75 rem → 1.25 rem (
h-7 w-7 → h-5 w-5
equivalent). On dense graphs this can hinder accessibility on touch devices and violates the recommended 44 × 44 px hit-target (WCAG 2.5.5). Consider keeping ≥1.75 rem or adding extra padding:-className="group flex h-[1.25rem] w-[1.25rem] ... +className="group flex h-7 w-7 sm:h-5 sm:w-5 ...
592-603
: Rendering outputs twice may cause unnecessary re-renders
MemoizedNodeOutputs
is rendered once forshownOutputs
(keyPrefix="shown"
) and again for the same list earlier whenshowNode
is false. Ensure there aren’t duplicate handles in the DOM:– Confirm that the first render (inside collapsed header) is not executed when
showNode
is true.
– If duplication is accidental, wrap the earlier call with!showNode
or remove it.Minor, but duplicate ReactFlow handles can introduce edge-connection glitches.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
src/frontend/package-lock.json
is excluded by!**/package-lock.json
📒 Files selected for processing (40)
src/backend/base/langflow/base/vectorstores/vector_store_connection_decorator.py
(1 hunks)src/backend/base/langflow/components/logic/conditional_router.py
(1 hunks)src/backend/base/langflow/components/logic/loop.py
(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json
(11 hunks)src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json
(5 hunks)src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json
(5 hunks)src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json
(8 hunks)src/backend/base/langflow/initial_setup/starter_projects/Diet Analysis.json
(5 hunks)src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json
(42 hunks)src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json
(6 hunks)src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json
(6 hunks)src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json
(2 hunks)src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json
(11 hunks)src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json
(7 hunks)src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json
(11 hunks)src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json
(3 hunks)src/backend/base/langflow/initial_setup/starter_projects/Market Research.json
(7 hunks)src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json
(15 hunks)src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json
(8 hunks)src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json
(4 hunks)src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json
(2 hunks)src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json
(57 hunks)src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json
(3 hunks)src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json
(11 hunks)src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json
(10 hunks)src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json
(5 hunks)src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json
(3 hunks)src/backend/base/langflow/initial_setup/starter_projects/Search agent.json
(2 hunks)src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json
(8 hunks)src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json
(2 hunks)src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json
(2 hunks)src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json
(56 hunks)src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json
(2 hunks)src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json
(11 hunks)src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json
(92 hunks)src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json
(10 hunks)src/backend/base/langflow/template/field/base.py
(1 hunks)src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/NodeOutputs.tsx
(2 hunks)src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx
(3 hunks)src/frontend/src/CustomNodes/GenericNode/index.tsx
(3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
src/backend/base/langflow/components/logic/conditional_router.py (1)
src/backend/base/langflow/template/field/base.py (1)
Output
(181-258)
src/backend/base/langflow/components/logic/loop.py (1)
src/backend/base/langflow/template/field/base.py (1)
Output
(181-258)
src/frontend/src/CustomNodes/GenericNode/index.tsx (3)
src/frontend/src/components/common/genericIconComponent/index.tsx (1)
ForwardedIconComponent
(9-135)src/frontend/src/types/api/index.ts (1)
OutputFieldType
(103-113)src/frontend/src/utils/reactflowUtils.ts (1)
scapedJSONStringfy
(967-969)
⏰ Context from checks skipped due to timeout of 90000ms (12)
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 1
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 5
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 4
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 3
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 2
- GitHub Check: Lint Backend / Run Mypy (3.10)
- GitHub Check: Run Backend Tests / Test CLI - Python 3.10
- GitHub Check: Lint Backend / Run Mypy (3.12)
- GitHub Check: Lint Backend / Run Mypy (3.11)
- GitHub Check: Lint Backend / Run Mypy (3.13)
- GitHub Check: Run Backend Tests / Integration Tests - Python 3.10
- GitHub Check: Run Frontend Tests / Determine Test Suites and Shard Distribution
🔇 Additional comments (190)
src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json (3)
12-14
: Formatting Consistency: Multi-line Arrays and Objects
The arrays for keys likeoutput_types
,inputTypes
,base_classes
,field_order
,types
, andtags
have been expanded into multi-line format, improving readability. These are purely stylistic updates with no functional impact.Also applies to: 19-21, 40-42, 68-70, 103-106, 125-127, 210-212, 221-223, 242-244, 2497-2499
234-238
: Ensuregroup_outputs
Integration
Thegroup_outputs
flag (false
) is now present in multiple output definitions to control frontend grouping behavior. Verify that the UI logic respects this property and that default grouping is correctly applied across all starter projects.Also applies to: 359-362, 375-379
232-238
: AI summary mismatch:group_outputs
added
The AI-generated summary claims nogroup_outputs
property was added, but lines 237–238 introducegroup_outputs: false
for the TextInput output. Please update the summary to reflect this addition.Likely an incorrect or invalid review comment.
src/backend/base/langflow/components/logic/conditional_router.py (2)
68-69
: Enable explicit grouping of ConditionalRouter outputs
Addinggroup_outputs=True
for both"true_result"
and"false_result"
outputs correctly uses the new field to instruct the frontend to show all outputs directly without dropdowns, aligning with the intended UI behavior.
71-71
: Helpful clarifying comment
The inline comment clearly explains the purpose ofgroup_outputs=True
for frontend behavior, aiding future maintainers.src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json (2)
235-235
: Explicitly disable grouping for Chat Input outputs
The addition of"group_outputs": false
to the Chat Input node’smessage
output is correct and aligns with the intention to display outputs individually in the frontend.
532-532
: Explicitly disable grouping for Chat Output outputs
Similarly, adding"group_outputs": false
to the Chat Output node’smessage
output is consistent and ensures messages are shown without a dropdown.src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json (2)
605-605
: Explicitly disable output grouping for ChatInput “Message” output
Adding"group_outputs": false
here correctly ensures that the ChatInput node’s message output is rendered individually (no dropdown) in the frontend, matching the intended starter-project behavior.
919-919
: Explicitly disable output grouping for ChatOutput “Message” output
Including"group_outputs": false
on the ChatOutput node’s message output aligns with the new grouping logic and guarantees the output is displayed directly rather than within a select widget.src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json (2)
645-645
: Addgroup_outputs
flag to ChatInput output
The new"group_outputs": false
property is correctly inserted into the ChatInput node’s output definition, ensuring the frontend will render this output individually rather than in a dropdown. This aligns with the PR objective to standardize output grouping metadata across starter projects.
956-956
: Addgroup_outputs
flag to ChatOutput output
The new"group_outputs": false
property is correctly inserted into the ChatOutput node’s output definition, ensuring the frontend will render this output individually rather than in a dropdown. This is consistent with the other starter project updates.src/backend/base/langflow/base/vectorstores/vector_store_connection_decorator.py (1)
37-37
: LGTM! Systematic addition of output grouping property.The addition of
group_outputs=False
to the Output constructor maintains consistency with the broader codebase changes. Even though this is a hidden output, explicitly setting this property ensures all Output instances have consistent metadata and aligns with the systematic approach taken across the PR.src/backend/base/langflow/initial_setup/starter_projects/Search agent.json (1)
346-346
: LGTM! Metadata addition is consistent with PR objectives.The addition of
"group_outputs": false
to both ChatInput and ChatOutput message outputs properly configures the output grouping behavior. This aligns with the standardization effort across starter projects mentioned in the PR objectives.Also applies to: 656-656
src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx (4)
9-9
: Good addition for accessing flow state.The import of
useFlowStore
is necessary for the new node type retrieval functionality.
27-30
: Proper implementation of node type retrieval.The use of
useFlowStore
with a selector function efficiently retrieves the node type while providing a fallback mechanism for existing components.
56-69
: Well-implemented dropdown visibility logic.The enhanced logic correctly handles multiple conditions for suppressing the dropdown:
- Maintains backward compatibility with the original single output check
- Adds support for the new
group_outputs
flag- Includes
allows_loop
handling for loop components- Provides ConditionalRouter fallback for existing components
The logic is well-commented and uses safe optional chaining for robust operation.
73-73
: Correct usage of the new dropdown visibility condition.The replacement of the simple length check with
shouldShowDropdown
properly implements the enhanced output grouping behavior.src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json (6)
168-168
: Explicitly disable output grouping for OpenAIModel’s Message output
Adding"group_outputs": false
to thetext_output
(“Message”) output aligns with the new flag and ensures it will render without a dropdown.
184-184
: Explicitly disable output grouping for OpenAIModel’s Language Model output
Adding"group_outputs": false
to themodel_output
(“Language Model”) output is consistent with the grouping logic and will show both outputs directly.
552-552
: Explicitly disable output grouping for ChatOutput’s Message output
Setting"group_outputs": false
on themessage
output ensures it won’t be hidden behind a dropdown, matching the new UI behavior.
864-864
: Explicitly disable output grouping for ChatInput’s Message output
Adding"group_outputs": false
to themessage
output guarantees ungrouped display in the playground.
1225-1225
: Explicitly disable output grouping for StructuredOutput’s Structured Output output
Inserting"group_outputs": false
for thestructured_output
output maintains consistency with the grouped-outputs flag and shows the result directly.
1239-1239
: Explicitly disable output grouping for StructuredOutput’s DataFrame output
Applying"group_outputs": false
to thestructured_output_dataframe
output follows the new pattern and prevents dropdown grouping.src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json (8)
373-374
: Finance Agent: Explicitly disable grouping of outputs
The addition of"group_outputs": false
for the Finance Agent’s Response output ensures it appears individually rather than in a dropdown—this aligns with the new flag semantics.
996-997
: Analysis & Editor Agent: Explicitly disable grouping of outputs
The"group_outputs": false
property is correctly added to the Analysis & Editor Agent’s Response output to match the intended individual display behavior.
1602-1603
: Prompt (Prompt-f7d7X): Explicitly disable grouping of outputs
The Prompt Message output now includes"group_outputs": false
, enforcing individual output presentation in the UI. Good consistency.
1736-1737
: Prompt (Prompt-d1yBl): Explicitly disable grouping of outputs
Adding"group_outputs": false
to this prompt’s output aligns with the new flag requirements.
1870-1873
: Prompt (Prompt-WNOHC): Explicitly disable grouping of outputs
Correctly set"group_outputs": false
for the final prompt in the chain, maintaining consistent behavior.
2050-2052
: Chat Input: Explicitly disable grouping of outputs
The"group_outputs": false
addition ensures the chat input’s Message output is shown individually, as intended.
2442-2446
: Researcher Agent: Explicitly disable grouping of outputs
The Response output for the Researcher Agent now has"group_outputs": false
, matching other agent configurations.
4070-4074
: Chat Output: Explicitly disable grouping of outputs
Adding"group_outputs": false
ensures the playground’s Chat Output displays messages individually rather than in a dropdown.src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (14)
320-320
: Explicitly disable grouping for transcription result output
The new"group_outputs": false
flag on thetranscription_result
output ensures it’s displayed individually as intended by the PR objectives.
482-482
: Ensure OpenAIModel text_output is displayed individually
Adding"group_outputs": false
for thetext_output
output aligns with the new flag semantics and maintains consistency.
497-497
: Ensure OpenAIModel model_output is displayed individually
Themodel_output
port now explicitly opts out of grouping, matching the PR’s intent.
865-865
: Explicitly disable grouping for Prompt output
ThePrompt
node’sprompt
output includes"group_outputs": false
to make its output visible without a dropdown.
1016-1016
: Ensure ChatOutput is displayed individually
Adding"group_outputs": false
toChatOutput-g8PGI
confirms that messages won’t be nested under a dropdown.
1318-1318
: Ensure hidden ChatOutput variant is also non-grouped
TheChatOutput-AZKHq
node mirrors the grouping behavior by setting"group_outputs": false
.
1630-1630
: Ensure non-grouped display for second OpenAIModel text_output
Consistently apply"group_outputs": false
on thetext_output
of the second OpenAIModel instance.
1645-1645
: Ensure non-grouped display for second OpenAIModel model_output
Themodel_output
port on the second OpenAIModel also disables grouping as expected.
2316-2316
: Explicitly disable grouping for second Prompt node
ThePrompt-7sDZ1
node’sprompt
output now includes"group_outputs": false
, ensuring uniform behavior.
2487-2487
: Ensure MemoryComponent messages output is non-grouped
Setting"group_outputs": false
for themessages
output aligns with the new grouping configuration.
2502-2502
: Ensure MemoryComponent messages_text output is non-grouped
Themessages_text
output now explicitly disables grouping, matching adjacent outputs.
2516-2516
: Ensure MemoryComponent dataframe output is non-grouped
Adding"group_outputs": false
for thedataframe
output completes the MemoryComponent’s output configuration.
2757-2757
: Ensure ChatInput message output is non-grouped
TheChatInput-2fdX6
node’smessage
output now explicitly opts out of grouping.
3171-3171
: Ensure AssemblyAITranscriptionJobCreator transcript_id output is non-grouped
Thetranscript_id
output flag is correctly set to"group_outputs": false
for consistent UI behavior.src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json (2)
800-801
: Explicitly disable grouping for ChatInput message output
Adding"group_outputs": false
here ensures that theChatInput
node’smessage
output is rendered individually (no dropdown) in starter projects, matching the PR’s intent for ungrouped outputs.
1113-1114
: Explicitly disable grouping for ChatOutput message output
The"group_outputs": false
flag on theChatOutput
node’smessage
output aligns with other starter project configurations and guarantees consistent ungrouped display behavior.src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json (3)
186-186
: Correctly addedgroup_outputs
to the Prompt node’s output
The"group_outputs": false
property on the Prompt node’sprompt
output ensures it is rendered without a dropdown, matching the starter‐project convention.
315-315
: Correctly addedgroup_outputs
to the ChatOutput node’s output
The"group_outputs": false
property on the ChatOutput node’smessage
output disables grouping, improving visibility as intended.
879-879
: Correctly addedgroup_outputs
to the ChatInput node’s output
The"group_outputs": false
property on the ChatInput node’smessage
output aligns with the PR’s consistency requirements for starter configurations.src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json (1)
299-299
: LGTM! Consistent metadata addition for output grouping control.The addition of
"group_outputs": false
to all output definitions is consistent and well-executed. This metadata will properly control the frontend display behavior, ensuring that outputs in this starter project are not grouped and maintain individual dropdown menus for output selection.The systematic application across all node types (ChatInput, TextInput, ChatOutput, Prompt, and OpenAIModel) demonstrates good attention to consistency and will provide a uniform user experience.
Also applies to: 586-586, 701-701, 995-995, 1100-1100, 1205-1205, 1310-1310, 1415-1415, 1568-1568, 1850-1850, 1865-1865
src/backend/base/langflow/components/logic/loop.py (1)
24-27
: LGTM! Appropriate use of output grouping for logic components.The addition of
group_outputs=True
to both the "Item" and "Done" outputs is well-reasoned for a logic component likeLoopComponent
. Unlike starter projects which usegroup_outputs=false
to maintain individual dropdown menus, logic components benefit from having all outputs visible simultaneously without dropdowns, improving the user experience when working with control flow components.The explanatory comment is helpful for future maintainers to understand the purpose of this flag.
src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json (3)
158-160
: Approvegroup_outputs
flag for Chat Input output
The addition of"group_outputs": false
under the ChatInput node’smessage
output is consistent with the PR goal and matches other starter project configurations.
470-472
: Approvegroup_outputs
flag for Chat Output output
Adding"group_outputs": false
to the ChatOutput node’smessage
output aligns with the new metadata standard and ensures uniform frontend behavior.
1657-1659
: Approvegroup_outputs
flag for Agent output
The"group_outputs": false
flag on the Agent node’sresponse
output correctly follows the update pattern and will disable dropdown grouping as intended.src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json (3)
126-126
: Disable grouping for Prompt output
The addition of"group_outputs": false
to the Prompt node’s output metadata explicitly ensures that this output is presented individually in the UI, matching the new flag semantics.
375-375
: Disable grouping for Chat Output
Adding"group_outputs": false
here correctly instructs the frontend to render the ChatOutput node’s message output without grouping, keeping consistent behavior across starter projects.
731-731
: Disable grouping for Agent output
Thegroup_outputs: false
flag on the Agent node’s response output is properly applied, ensuring individual display of agent responses as intended.src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (5)
121-121
: Add explicitgroup_outputs
to Chat Input output
Including"group_outputs": false
here ensures that the Chat Input node’s output is rendered individually (no dropdown) in the frontend, aligning with the new metadata approach.
405-405
: Add explicitgroup_outputs
to Prompt output
The Prompt node’s output now has"group_outputs": false
, which matches the intended behavior of displaying the prompt message directly without grouping.
609-609
: Add explicitgroup_outputs
to Chat Output
Setting"group_outputs": false
on the Chat Output node’s output ensures messages appear inline rather than in a dropdown.
923-923
: Add explicitgroup_outputs
to OpenAIModel text output
The first output of the OpenAIModel component now includes"group_outputs": false
, which forces the text response to render individually.
938-938
: Add explicitgroup_outputs
to OpenAIModel model output
Adding"group_outputs": false
here ensures the Language Model output is also shown without dropdown grouping.src/backend/base/langflow/initial_setup/starter_projects/Diet Analysis.json (5)
129-129
: Add explicitgroup_outputs
to Chat Input output
Including"group_outputs": false
for the ChatInput node guarantees its output is rendered directly, consistent with the new frontend grouping flag.
440-440
: Add explicitgroup_outputs
to Prompt output
The Prompt node’s output now explicitly disables grouping by setting"group_outputs": false
, matching the starter-project convention.
579-579
: Add explicitgroup_outputs
to NovitaModel text output
Adding"group_outputs": false
ensures the NovitaModel’s text response is displayed individually in the UI.
594-594
: Add explicitgroup_outputs
to NovitaModel model output
The model output for NovitaModel now has"group_outputs": false
to prevent dropdown grouping for language model instances.
946-946
: Add explicitgroup_outputs
to Chat Output
Including"group_outputs": false
for the ChatOutput node ensures its message output appears inline, consistent with other starter flows.src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json (11)
12-15
: Formatting-only change: expanded array foroutput_types
.Converted the
output_types
from a single-line to a multi-line array for improved readability. No functional impact.
268-275
: Approvegroup_outputs
on File componentdata
output.The new
"group_outputs": false
flag is correctly added to the File component’sdata
output, ensuring it’s displayed individually in the UI as intended.
283-291
: Approvegroup_outputs
on File componentdataframe
output.Consistent addition of
"group_outputs": false
aligns with PR objectives and matches thedata
output configuration.
298-306
: Approvegroup_outputs
on File componentmessage
output.The flag is correctly applied to the
message
output, maintaining consistency across all File component outputs.
584-592
: Approvegroup_outputs
on Prompt componentprompt
output.The
"group_outputs": false
property is correctly included in this Prompt node’s output, matching the starter project pattern.
737-745
: Approvegroup_outputs
on second Prompt componentprompt
output.Ensures both Prompt node definitions explicitly disable grouping of outputs. Good consistency.
901-909
: Approvegroup_outputs
on OpenAIModeltext_output
output.Correctly added to the
text_output
entry, aligning backend metadata with frontend rendering logic.
915-924
: Approvegroup_outputs
on OpenAIModelmodel_output
output.The
"group_outputs": false
flag is properly set for themodel_output
, ensuring both outputs follow the same behavior.
2225-2233
: Approvegroup_outputs
on ChatOutputmessage
output.The ChatOutput node’s
message
output now explicitly disables grouping, as intended for individual display.
2533-2541
: Approvegroup_outputs
on second ChatOutputmessage
output.Consistent addition of the flag in all ChatOutput instances. No issues detected.
2901-2904
: Approve newtags
metadata.The
"tags": ["classification"]
entry is correctly added to the flow’s metadata, categorizing it appropriately.src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json (4)
185-188
: Prompt node: Explicitly disable output grouping
The addition of"group_outputs": false
to the Prompt node’s output is syntactically correct and aligns with the new flag’s intended behavior.
355-358
: TextInput node: Explicitly disable output grouping
The"group_outputs": false
flag has been correctly inserted into the TextInput node’s output configuration.
468-471
: ChatOutput node: Explicitly disable output grouping
The"group_outputs": false
entry for the ChatOutput node’s output is properly placed and formatted.
804-807
: OpenAIModel node: Explicitly disable output grouping for all outputs
Bothtext_output
andmodel_output
now include"group_outputs": false
, matching the specification across the starter projects.Also applies to: 819-822
src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json (5)
129-132
: Approvegroup_outputs
flag on Prompt-KhvO6 output
The"group_outputs": false
property is correctly inserted alongside other output metadata, ensuring this prompt’s output will render individually. JSON syntax and comma placement are valid.
431-433
: Approvegroup_outputs
flag on Prompt-KlZxj output
The new"group_outputs": false
entry is properly added to the second Prompt node’s outputs, matching the starter-project convention. Structure and syntax are correct.
565-567
: Approvegroup_outputs
flag on ChatOutput-iMyF9 output
Adding"group_outputs": false
here aligns with other starter projects and ensures the chat output isn’t grouped behind a dropdown. JSON formatting is correct.
909-911
: Approvegroup_outputs
flag on OpenAIModel text output
The"group_outputs": false
insertion fortext_output
is correct and consistent with the PR objectives. Valid JSON and ordering.
923-926
: Approvegroup_outputs
flag on OpenAIModel model output
The"group_outputs": false
field formodel_output
is properly added. This matches the expected behavior for starter configs.src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json (11)
325-325
: Consistent addition ofgroup_outputs
for Prompt node (Prompt-I3JbF).
This flag ensures the Prompt component’s output is displayed directly rather than inside a dropdown.
482-482
: Addedgroup_outputs
to Chat Input node outputs (ChatInput-KgyhN).
Ensures chat input messages render individually in the UI.
776-776
: Setgroup_outputs
on Prompt node (Prompt-o2zd8).
Aligns with starter‐project convention to show outputs without grouping.
1010-1010
: Includegroup_outputs
in Agent node outputs (Agent-TPxdA).
Makes agent responses render as individual outputs.
1610-1610
: Applygroup_outputs
on Prompt node (Prompt-saNk6).
Keeps prompt outputs visible without dropdown grouping.
1738-1738
: Addgroup_outputs
for Prompt node (Prompt-z31Nf).
Ensures consistency across all Prompt variants.
2378-2378
: Setgroup_outputs
on OpenAIModel output (text_output).
Makes model responses display directly rather than in a grouped menu.
2392-2392
: Addgroup_outputs
to OpenAIModel output (model_output).
Ensures the built model output is shown individually.
2771-2771
: Includegroup_outputs
on second OpenAIModel output (text_output).
Maintains UI consistency for multiple model nodes.
2786-2786
: Applygroup_outputs
on second OpenAIModel output (model_output).
Prevents dropdown grouping for the language‐model output.
3155-3155
: Addedgroup_outputs
to Chat Output node (ChatOutput-Fg9B4).
Shows chat output messages directly for better visibility.src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json (2)
12-181
: Approve multi-line JSON formatting
Converting single-line arrays and object literals to multi-line enhances readability and consistency without affecting the data or behavior.
183-184
: Inconsistent AI summary:group_outputs
flags are present
The AI-generated summary claims that nogroup_outputs
properties were added, but this file includes"group_outputs": false
on severaloutputs
entries (e.g., ChatInput).Likely an incorrect or invalid review comment.
src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json (1)
1-4894
: Approve JSON formatting and explicitgroup_outputs
flags
All hunks in this file are either:
- Stylistic—expanding single-line arrays/objects (e.g.,
output_types
,input_types
,types
,options
,base_classes
,field_order
,required_inputs
,tags
, etc.) into a multi-line format for improved readability, with no semantic impact.- Additions of
"group_outputs": false
under output definitions (lines like 322–332, 615–627, 788–800, 1086–1098, 1400–1415, 1891–1950, 2416–2429, 3395–3443, 4157–4164, etc.), which correctly implement the PR objective of explicitly disabling grouping in these starter projects.No functional regressions or inconsistencies detected—formatting is uniform, and the new flag usage aligns with the backend/frontend contract.
src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json (4)
619-619
: Explicitly disable grouping for ChatInput output
The addition of"group_outputs": false
under the ChatInput node ensures messages are shown individually rather than in a dropdown, matching the starter-project convention.
947-947
: Explicitly disable grouping for Agent output
Adding"group_outputs": false
to the Agent component’s outputs aligns with other starter projects, guaranteeing that responses are rendered directly without grouping.
1647-1647
: Explicitly disable grouping for SaveToFile confirmation
The"group_outputs": false
flag prevents the confirmation output from being hidden behind a dropdown, improving visibility in the News Aggregator flow.
1873-1873
: Explicitly disable grouping for ChatOutput message
With"group_outputs": false
added, chat outputs will display immediately rather than under a grouped control, consistent with the refactoring across starter configs.src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (11)
229-229
: Consistent addition ofgroup_outputs
for Prompt Message output
The"group_outputs": false
flag is correctly inserted to ensure this output appears individually rather than in a grouped dropdown. This aligns with the PR objective to explicitly control output grouping per node.
363-363
: Consistent addition ofgroup_outputs
for Chat Input output
The"group_outputs": false
property has been added to the ChatInput node’s output to disable grouping. This matches the pattern established across starter projects.
660-660
: Consistent addition ofgroup_outputs
for Chat Output output
Adding"group_outputs": false
here ensures the ChatOutput node’s output is displayed individually as intended.
958-958
: Consistent addition ofgroup_outputs
for Prompt (FRjO8) output
The new flag"group_outputs": false
is correctly applied to this Prompt node instance to prevent grouping.
1086-1086
: Consistent addition ofgroup_outputs
for Prompt (f1f2v) output
This insertion of"group_outputs": false
aligns with the requirement that starter project nodes explicitly opt out of grouping outputs.
1304-1304
: Consistent addition ofgroup_outputs
for OpenAIModel (lL9HA) text_output
The first output of the OpenAIModel node now has"group_outputs": false
, ensuring individual display in the UI.
1319-1319
: Consistent addition ofgroup_outputs
for OpenAIModel (lL9HA) model_output
The second output of this node also includes"group_outputs": false
, maintaining consistency across all outputs.
1697-1697
: Consistent addition ofgroup_outputs
for OpenAIModel (JieGw) text_output
This"group_outputs": false
flag correctly disables grouping for the text_output of this model instance.
1712-1712
: Consistent addition ofgroup_outputs
for OpenAIModel (JieGw) model_output
The second output of the JieGw model now explicitly opts out of grouping, as intended.
2090-2090
: Consistent addition ofgroup_outputs
for OpenAIModel (dXMRv) text_output
The text_output property now includes"group_outputs": false
to display individually.
2105-2105
: Consistent addition ofgroup_outputs
for OpenAIModel (dXMRv) model_output
Ensures the second output of the dXMRv model is not grouped in the frontend dropdown.src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json (7)
215-215
: Addgroup_outputs
flag to ChatInput output
Thegroup_outputs": false
property correctly annotates the ChatInput node’s output to prevent dropdown grouping, aligning with the updated backendOutput
schema.
520-520
: Addgroup_outputs
flag to ChatOutput output
Includinggroup_outputs": false
on the ChatOutput node ensures its message output is displayed inline, matching the new UI behavior.
853-853
: Addgroup_outputs
flag to Prompt output
The Prompt component’s output now explicitly opts out of grouping, providing consistency across starter projects and backend logic.
998-998
: Addgroup_outputs
flag to OpenAIModel text output
Marking thetext_output
withgroup_outputs": false
ensures the generated text appears without a dropdown, as intended by the refactor.
1013-1013
: Addgroup_outputs
flag to OpenAIModel model output
Applyinggroup_outputs": false
to themodel_output
entry keeps the LanguageModel output visible inline, consistent with the new grouping logic.
1380-1380
: Addgroup_outputs
flag to StructuredOutput structured_output output
The primary StructuredOutput (build_structured_output
) is now explicitly set to not group its output, matching frontend expectations.
1395-1395
: Addgroup_outputs
flag to StructuredOutput DataFrame output
Ensuring the DataFrame output defaults to visible inline by addinggroup_outputs": false
maintains uniform UX across outputs.src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (6)
352-352
: Add explicitgroup_outputs
flag to ChatInput output
The"group_outputs": false
property is correctly inserted to ensure no grouping in the frontend. JSON syntax and placement look good.
1377-1377
: Add explicitgroup_outputs
flag to ChatOutput output
The"group_outputs": false
addition aligns with the new grouping logic and is correctly placed.
1979-1979
: Add explicitgroup_outputs
flag to SambaNovaModel text_output
The"group_outputs": false
key is properly added to the first output ofSambaNovaModel
.
1994-1994
: Add explicitgroup_outputs
flag to SambaNovaModel model_output
The"group_outputs": false
flag is correctly applied to the second output ofSambaNovaModel
.
3706-3706
: Add explicitgroup_outputs
flag to Prompt output (Prompt-er8QV)
The"group_outputs": false
insertion for this Prompt node is accurate and consistent.
3883-3883
: Add explicitgroup_outputs
flag to Prompt output (Prompt-AdpTy)
The"group_outputs": false
property is correctly placed in the second Prompt node.src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (8)
152-156
: Addgroup_outputs
to Chat Input component output
Including"group_outputs": false
here ensures that the Chat Input node’s output is shown individually (not in a dropdown) in the UI, consistent with the new starter project defaults.
457-462
: Addgroup_outputs
to Chat Output component output
The Chat Output node’s single output now explicitly has"group_outputs": false
, matching the intended behavior for these starter projects.
825-831
: Addgroup_outputs
to Memory (Data) output
The Data output of the Chat Memory node now includes"group_outputs": false
, ensuring that the raw data output is displayed without grouping.
839-843
: Addgroup_outputs
to Memory (Message) output
Including"group_outputs": false
for themessages_text
output aligns it with the new output grouping logic for starter projects.
853-857
: Addgroup_outputs
to Memory (DataFrame) output
The DataFrame output is now configured with"group_outputs": false
, so it will be rendered as its own output pane.
1090-1094
: Addgroup_outputs
to Prompt component output
The Prompt node’s single output now explicitly sets"group_outputs": false
, ensuring consistency in output presentation for tutorial flows.
1258-1262
: Addgroup_outputs
to OpenAIModel “Message” output
Marking thetext_output
with"group_outputs": false
makes the LLM response appear directly without a dropdown.
1273-1277
: Addgroup_outputs
to OpenAIModel “Language Model” output
Including"group_outputs": false
for themodel_output
streamlines the starter project’s display of the model instance itself.src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json (11)
329-329
: Disable dropdown grouping for Chat Input output
Explicitly setting"group_outputs": false
here ensures the Chat Input node’s Message output is rendered directly rather than hidden behind a dropdown.
623-623
: Disable dropdown grouping for Prompt (R71s9) output
The addition of"group_outputs": false
makes the Prompt node’s built prompt visible without requiring the user to open a dropdown.
793-793
: Disable dropdown grouping for Text Input output
Adding"group_outputs": false
for the Text Input node’s Message output improves discoverability by eliminating the dropdown.
904-904
: Disable dropdown grouping for Prompt (LCAlG) output
This flag ensures the second Prompt node’s output is shown inline, matching the behavior of other prompt components.
1060-1060
: Disable dropdown grouping for Chat Output message
Explicitly marking the Chat Output node’s Message output as ungrouped improves consistency and avoids hidden outputs.
1380-1380
: Disable dropdown grouping for Agent response
Adding"group_outputs": false
here surfaces the Agent’s Response output immediately, without a dropdown.
1983-1983
: Disable dropdown grouping for Prompt (ZA2H7) output
Setting"group_outputs": false
ensures this Prompt node’s output is directly visible in the UI.
2804-2804
: Disable grouping for OpenAIModel text output
The"group_outputs": false
flag here makes the text response from the OpenAIModel component immediately accessible.
2818-2818
: Disable grouping for OpenAIModel language-model output
Applying"group_outputs": false
to the model output prevents it from being tucked into a dropdown.
3196-3196
: Disable grouping for OpenAIModel (7yVxU) text output
Consistently turning off grouping for the second OpenAIModel instance’s text output ensures uniform behavior.
3211-3211
: Disable grouping for OpenAIModel (7yVxU) language-model output
The explicit"group_outputs": false
here aligns with the other model outputs and avoids nested dropdowns.src/backend/base/langflow/initial_setup/starter_projects/Market Research.json (7)
211-211
: Explicitly disable grouping for ChatInput "Message" output
Thegroup_outputs: false
flag correctly aligns with other starter projects to render this output individually.
509-509
: Explicitly disable grouping for ChatOutput "Message" output
The addition ofgroup_outputs: false
ensures chat messages are shown without dropdowns as intended.
848-848
: Explicitly disable grouping for StructuredOutput "Structured Output"
Addinggroup_outputs: false
correctly targets the primary structured output and matches the new flag semantics.
862-862
: Explicitly disable grouping for StructuredOutput "DataFrame" output
Thegroup_outputs: false
entry maintains consistency for DataFrame outputs in structured output components.
1230-1230
: Explicitly disable grouping for Agent "Response" output
The new flag correctly forces individual display of agent responses, improving visibility in the UI.
2310-2310
: Explicitly disable grouping for OpenAIModel "Message" output
Addinggroup_outputs: false
aligns with the backend flag support to show messages directly.
2325-2325
: Explicitly disable grouping for OpenAIModel "Language Model" output
Thegroup_outputs
property is properly set to false to prevent grouping of the model output.src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (11)
270-273
: Addgroup_outputs
flag to ChatInput output
The"group_outputs": false
entry correctly enforces individual output display for the Chat Input component in this starter project.
581-584
: Addgroup_outputs
flag to StructuredOutput (Structured Output)
The"group_outputs": false
addition for the first output of the Structured Output node is consistent with the PR goal of disabling grouped dropdowns in starter configs.
596-598
: Addgroup_outputs
flag to StructuredOutput (DataFrame)
The"group_outputs": false
flag on the DataFrame output ensures both StructuredOutput outputs render individually as intended.
905-908
: Addgroup_outputs
flag to OpenAIModel (Message)
Adding"group_outputs": false
for the Message output aligns with the new metadata-driven output rendering.
920-923
: Addgroup_outputs
flag to OpenAIModel (Language Model)
The"group_outputs": false
for the model_output output correctly disables grouping for this output channel.
1303-1306
: Addgroup_outputs
flag to AstraDB (Search Results)
Inserting"group_outputs": false
for the Search Results output matches the PR’s uniform starter‐project configuration pattern.
1321-1325
: Addgroup_outputs
flag to AstraDB (DataFrame)
The"group_outputs": false
flag on the DataFrame output ensures consistent individual rendering.
1337-1340
: Addgroup_outputs
flag to AstraDB (Vector Store Connection)
Adding"group_outputs": false
and keeping this output hidden is consistent with backend decorator defaults.
2066-2069
: Addgroup_outputs
flag to ParserComponent-9FGat
The"group_outputs": false
addition for the Parsed Text output fulfills the PR objective in this node.
2546-2550
: Addgroup_outputs
flag to ParserComponent-AzBHA
Ensuring"group_outputs": false
on the second ParserComponent instance maintains consistent output display.
2245-2248
: Addgroup_outputs
flag to ChatOutput
The"group_outputs": false
for the ChatOutput message output aligns with the intended per‐output visibility in the UI.src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/NodeOutputs.tsx (4)
28-36
: LGTM: Improved output display condition logic.The refactored logic clearly consolidates multiple conditions that determine whether to show all outputs. The addition of
group_outputs
flag support aligns with the PR objectives, and the explicit naming makes the code more readable.The fallback comment for
ConditionalRouter
suggests this might be technical debt that could be addressed in future iterations.
38-76
: LGTM: Clean implementation of multi-output rendering.The filtering logic correctly handles both regular and hidden outputs based on the
keyPrefix
. The rendering consolidates the output mapping logic while maintaining proper indexing and prop passing.The
lastOutput
calculation usingidx === outputsToRender.length - 1
is correct for the filtered array.
78-98
: LGTM: Well-structured helper function with proper fallback chain.The
getDisplayOutput
function implements a logical fallback chain:
- Filter outputs based on keyPrefix
- Find selectedOutput by name
- Find output with
selected
property- Fall back to first filtered output
This approach ensures robust output selection even when the preferred output is not available.
100-130
: LGTM: Consolidated single output rendering.The single output rendering now uses the helper function and maintains consistency with the multi-output branch in terms of prop handling and index calculation. The
findIndex
with fallback to 0 handles edge cases gracefully.src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json (5)
239-281
: Appropriate addition ofgroup_outputs
to Memory component outputs.
Thegroup_outputs: false
flag has been correctly added to all outputs (Data
,Message
,DataFrame
) of the Memory component, ensuring individual output rendering in the frontend.
505-519
: Addedgroup_outputs
flag to Prompt component output.
The single output of the Prompt component (Prompt Message
) now includesgroup_outputs: false
, aligning with other starter projects to display outputs individually.
1418-1431
: Correctly setgroup_outputs: false
on AnthropicModel outputs.
Both outputs (Message
andLanguage Model
) of the AnthropicModel node now explicitly disable grouping, matching the intended UI behavior.Also applies to: 1433-1440
1749-1761
: Addedgroup_outputs: false
to ChatInput component output.
The ChatInput node’s output (Message
) now specifiesgroup_outputs: false
, ensuring consistency in output presentation.
2061-2074
: Explicitgroup_outputs: false
for ChatOutput component output.
The ChatOutput node’sMessage
output has been updated to includegroup_outputs: false
, preventing grouping in the frontend.src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json (2)
232-238
:group_outputs
metadata looks correct hereAdding
"group_outputs": false
to standard (non-loop, non-router) outputs is consistent with the new convention: the frontend will still render a dropdown for these outputs while leaving the behaviour unchanged. No further action required.
1681-1702
: Good use ofgroup_outputs: true
for loop outputsSetting
group_outputs: true
on both “Item” (loop) and “Done” outputs ensures all outputs become visible without a dropdown, which is exactly what you need for a Loop component so users can wire each handle individually.No issues spotted with the JSON syntax or property placement.
src/frontend/src/CustomNodes/GenericNode/index.tsx (2)
277-303
: Edge-update logic: ensure you keep both serialised & object handles in syncGreat idea to mutate edges in place instead of deleting & recreating them. Two points to double-check:
- You overwrite
edge.sourceHandle
(string) but leaveedge.data.sourceHandle
updated – good. Make sure both are always present; some older edges might not have the object copy and will be skipped. A defensive guard can help:if (!edge.data?.sourceHandle) return edge; // skip legacy edges
scapedJSONStringfy
replaces quotes withœ
. If the backend ever reverses this encoding, mismatched IDs could appear. Consider extracting the helper to a shared util and adding unit tests around handle-ID generation.No blockers, but worth a once-over.
604-617
: Hidden outputs block – good conditional renderingRendering hidden outputs only when the flag is active keeps the DOM light and prevents stray handles. Looks good.
src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json (8)
345-353
: Addgroup_outputs: false
to BatchRunComponent outputs
Including"group_outputs": false
on thebatch_results
output ensures it’s rendered individually in the UI, matching the intended starter‐project behavior and schema default.
559-567
: Addgroup_outputs: false
to YouTubeCommentsComponent outputs
Marking thecomments
output with"group_outputs": false
keeps that channel ungrouped, aligning with other starter‐project configurations.
777-785
: Addgroup_outputs: false
to OpenAIModeltext_output
Specifying"group_outputs": false
fortext_output
maintains consistency with non‐grouped outputs in starter flows.
792-800
: Addgroup_outputs: false
to OpenAIModelmodel_output
Ensures themodel_output
is displayed individually rather than behind a dropdown, matching intended default behavior.
1829-1836
: Addgroup_outputs: false
to Prompt outputs
Flagging theprompt
output as"group_outputs": false
aligns it with other ungrouped starter outputs.
2004-2011
: Addgroup_outputs: false
to ChatOutput messages
Ensures themessage
output ofChatOutput
is shown directly, in line with other starter configurations.
2596-2604
: Addgroup_outputs: false
to ChatInput messages
Maintains UI consistency by showing themessage
output individually forChatInput
.
2994-3021
: Enablegroup_outputs: true
for ConditionalRouter outputs
Grouping bothtrue_result
andfalse_result
outputs ensures that users see all branches without selecting from a dropdown, which matches the backend component’s explicit grouping logic.src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (2)
128-128
: Explicitly disable output grouping for Chat Input node
Adding"group_outputs": false
here ensures that the "Message" output from the Chat Input node is displayed individually (no dropdown), matching the starter-project behavior.
441-441
: Explicitly disable output grouping for Chat Output node
The"group_outputs": false
flag makes the Chat Output’s "Message" appear individually, aligning with the grouping convention set for starter projects.
// Initialize selectedOutput from persisted data | ||
const [selectedOutput, setSelectedOutput] = useState<OutputFieldType | null>( | ||
null, | ||
() => { | ||
// Find the output that has a selected property | ||
const outputWithSelection = data.node?.outputs?.find( | ||
(output) => output.selected, | ||
); | ||
return outputWithSelection || null; | ||
}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
State initialisation is great, but missing sync on external changes
Initialising selectedOutput
lazily from the node’s persisted selected
flag is 👍.
However, if the node’s outputs change later (e.g. after a template update) the state will keep the stale reference.
Add an effect that resets the state when data.node?.outputs
updates:
+useEffect(() => {
+ const outputWithSelection = data.node?.outputs?.find((o) => o.selected);
+ setSelectedOutput(outputWithSelection ?? null);
+}, [data.node?.outputs]);
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
// Initialize selectedOutput from persisted data | |
const [selectedOutput, setSelectedOutput] = useState<OutputFieldType | null>( | |
null, | |
() => { | |
// Find the output that has a selected property | |
const outputWithSelection = data.node?.outputs?.find( | |
(output) => output.selected, | |
); | |
return outputWithSelection || null; | |
}, | |
); | |
// Initialize selectedOutput from persisted data | |
const [selectedOutput, setSelectedOutput] = useState<OutputFieldType | null>( | |
() => { | |
// Find the output that has a selected property | |
const outputWithSelection = data.node?.outputs?.find( | |
(output) => output.selected, | |
); | |
return outputWithSelection || null; | |
}, | |
); | |
useEffect(() => { | |
const outputWithSelection = data.node?.outputs?.find((o) => o.selected); | |
setSelectedOutput(outputWithSelection ?? null); | |
}, [data.node?.outputs]); |
🤖 Prompt for AI Agents
In src/frontend/src/CustomNodes/GenericNode/index.tsx around lines 262 to 271,
the selectedOutput state is initialized lazily from data.node?.outputs but does
not update if outputs change later. Add a useEffect hook that listens for
changes to data.node?.outputs and updates selectedOutput accordingly by finding
the output with the selected property or setting it to null if none is found.
…nd simplifying output logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx (1)
449-449
: Consider using a static empty function for better performance.The simplification to an empty arrow function is clean, but creating a new function on each render could potentially cause unnecessary re-renders of child components. Consider defining a static empty function outside the component or using
useCallback
if this needs to be dynamic.+const noop = () => {}; + function NodeOutputField({ // ... props }) { // ... component body - onClick={() => {}} + onClick={noop}Alternatively, if the onClick is truly not needed since the OutputModal handles the interaction, consider making it optional in the InspectButton's props interface.
src/backend/base/langflow/components/logic/conditional_router.py (1)
71-71
: Fix whitespace formatting issue.The blank line contains unnecessary whitespace. Please remove it for cleaner code formatting.
Apply this diff to fix the formatting:
- +🧰 Tools
🪛 Ruff (0.11.9)
71-71: Blank line contains whitespace
Remove whitespace from blank line
(W293)
src/backend/base/langflow/components/logic/loop.py (1)
27-27
: Fix whitespace formatting issue.The blank line contains unnecessary whitespace. Please remove it for cleaner code formatting.
Apply this diff to fix the formatting:
- +🧰 Tools
🪛 Ruff (0.11.9)
27-27: Blank line contains whitespace
Remove whitespace from blank line
(W293)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
src/backend/base/langflow/components/logic/conditional_router.py
(1 hunks)src/backend/base/langflow/components/logic/loop.py
(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json
(51 hunks)src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json
(81 hunks)src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/NodeOutputs.tsx
(2 hunks)src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx
(1 hunks)src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx
(3 hunks)src/frontend/src/CustomNodes/GenericNode/index.tsx
(3 hunks)src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
(0 hunks)
💤 Files with no reviewable changes (1)
- src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
- src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx
- src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/NodeOutputs.tsx
- src/frontend/src/CustomNodes/GenericNode/index.tsx
- src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json
- src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json
🧰 Additional context used
🧬 Code Graph Analysis (2)
src/backend/base/langflow/components/logic/conditional_router.py (1)
src/backend/base/langflow/template/field/base.py (1)
Output
(181-258)
src/backend/base/langflow/components/logic/loop.py (1)
src/backend/base/langflow/template/field/base.py (1)
Output
(181-258)
🪛 Ruff (0.11.9)
src/backend/base/langflow/components/logic/conditional_router.py
71-71: Blank line contains whitespace
Remove whitespace from blank line
(W293)
src/backend/base/langflow/components/logic/loop.py
27-27: Blank line contains whitespace
Remove whitespace from blank line
(W293)
⏰ Context from checks skipped due to timeout of 90000ms (22)
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 9/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 10/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 6/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 7/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 8/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 4/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 5/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 3/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 1/10
- GitHub Check: Run Frontend Tests / Playwright Tests - Shard 2/10
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 3
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 2
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 5
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 4
- GitHub Check: Run Backend Tests / Unit Tests - Python 3.10 - Group 1
- GitHub Check: Run Backend Tests / Integration Tests - Python 3.10
- GitHub Check: Lint Backend / Run Mypy (3.13)
- GitHub Check: Optimize new Python code in this PR
- GitHub Check: Run benchmarks (3.12)
- GitHub Check: Ruff Style Check (3.13)
- GitHub Check: Run Ruff Check and Format
- GitHub Check: Update Starter Projects
🔇 Additional comments (2)
src/backend/base/langflow/components/logic/conditional_router.py (1)
68-70
: LGTM! Excellent improvement to output visibility.Adding
group_outputs=True
to both outputs will ensure they are displayed directly without dropdown menus in the frontend, which significantly improves the user experience for conditional routing. This change aligns perfectly with the PR objective to enhance output visibility and interaction.src/backend/base/langflow/components/logic/loop.py (1)
24-26
: LGTM! Great consistency with the overall PR changes.Adding
group_outputs=True
to both the "Item" and "Done" outputs follows the same improvement pattern as other components in this PR. This will ensure loop outputs are displayed directly without dropdown menus, enhancing the user experience. The existing attributes likeallows_loop=True
are correctly preserved.
This pull request introduces a new
group_outputs
flag to various components and JSON configuration files in the backend. The flag determines whether outputs should be displayed as grouped or individually in the frontend. This change affects both the logic components and the starter project configurations.Updates to Logic Components:
group_outputs=True
to theOutput
definitions inConditionalRouter
andLoopComponent
to ensure all outputs are displayed without dropdowns in the frontend. (src/backend/base/langflow/components/logic/conditional_router.py
,src/backend/base/langflow/components/logic/loop.py
) [1] [2]Updates to Starter Projects:
group_outputs=false
to multiple output configurations in JSON files for starter projects (Basic Prompt Chaining.json
,Basic Prompting.json
,Blog Writer.json
,Custom Component Maker.json
,Diet Analysis.json
) to explicitly specify that outputs should not be grouped. This change ensures consistency across all starter projects. [1] [2] [3] [4] [5] [6]These updates improve the clarity and consistency of how outputs are handled in both the backend logic and the initial setup configurations.
Summary by CodeRabbit
New Features
Improvements
Style
Documentation
Refactor
Chores