Skip to content

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

deon-sanchez
Copy link
Collaborator

@deon-sanchez deon-sanchez commented May 28, 2025

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:

  • Added group_outputs=True to the Output definitions in ConditionalRouter and LoopComponent 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:

  • Added 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

    • Added a new option to control output grouping, allowing certain outputs to be displayed together without dropdown menus.
  • Improvements

    • Enhanced output selection UI with refined dropdown visibility logic and improved handling of hidden outputs.
    • Smarter default output selection and updated edge connections reflecting output changes.
  • Style

    • Reduced size of the hidden outputs toggle button for a cleaner interface.
  • Documentation

    • Added explicit output grouping metadata across numerous starter projects to clarify display behavior.
  • Refactor

    • Simplified and clarified node output rendering logic for better maintainability.
  • Chores

    • Reformatted multiple JSON configuration files for improved readability and consistency.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels May 28, 2025
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed enhancement New feature or request labels May 28, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels May 28, 2025
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 28, 2025
@deon-sanchez deon-sanchez self-assigned this May 28, 2025
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 28, 2025
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 28, 2025
Copy link

codspeed-hq bot commented May 28, 2025

CodSpeed Performance Report

Merging #8254 will degrade performances by 36.43%

Comparing lfoss-1244 (e436ca7) with main (85ed6a6)

Summary

❌ 1 regressions
✅ 18 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_cancel_build_success 256 ms 402.7 ms -36.43%

@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 28, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels May 29, 2025
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 29, 2025
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 29, 2025
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 29, 2025
Copy link
Collaborator

@mfortman11 mfortman11 left a 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 &&
Copy link
Collaborator

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;
Copy link
Collaborator

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?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 29, 2025
Copy link

coderabbitai bot commented May 29, 2025

Walkthrough

The changes introduce a new group_outputs property to output definitions in both backend Python code and frontend TypeScript/JSON configurations. This property controls whether outputs are grouped and displayed without dropdown menus in the frontend UI. The frontend logic is updated to respect this property, rendering all outputs together if group_outputs is set or if certain node types are present. Numerous starter project JSON files are updated to include this metadata. Some files also receive formatting improvements for readability.

Changes

File(s) Change Summary
src/backend/base/langflow/template/field/base.py Added group_outputs boolean field to Output class with default False and descriptive docstring.
src/backend/base/langflow/base/vectorstores/vector_store_connection_decorator.py Added group_outputs=False to the "Vector Store Connection" output in the decorator.
src/backend/base/langflow/components/logic/conditional_router.py
src/backend/base/langflow/components/logic/loop.py
Added group_outputs=True to outputs in ConditionalRouterComponent and LoopComponent for frontend display control.
src/backend/base/langflow/initial_setup/starter_projects/... (multiple JSON files) Added "group_outputs": false to many output definitions across various starter project nodes; some files also reformatted arrays/objects for readability.
src/backend/base/langflow/initial_setup/starter_projects/Research Translation Loop.json
src/backend/base/langflow/components/logic/loop.py
src/backend/base/langflow/components/logic/conditional_router.py
Added "group_outputs": true to Loop and ConditionalRouter outputs in JSON and Python, aligning frontend and backend logic.
src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json
Portfolio Website Code Generator.json
Text Sentiment Analysis.json
Vector Store RAG.json
Reformatted arrays and objects to multi-line style for improved readability; no functional changes.
src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/NodeOutputs.tsx Refactored output rendering logic to respect group_outputs, allows_loop, hidden flags, and node type; simplified control flow and rendering.
src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx Updated dropdown menu logic to hide it if any output has group_outputs, allows_loop, or for "ConditionalRouter" nodes; uses flow store for node type.
src/frontend/src/CustomNodes/GenericNode/index.tsx Reduced hidden outputs button size, improved output selection initialization, updated edge handling for output selection, and refactored outputs rendering.
src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx Removed inline comments related to memoization and store subscriptions without altering logic.
src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx Removed comments explaining hasToolMode constant; no logic 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
Loading

Poem

In fields of output, grouped or free,
A rabbit tweaks the UI with glee.
No dropdowns here if flags are true,
All outputs shown—what a view!
JSON and code now hop in sync,
With tidy arrays and thoughtful link.
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 29, 2025
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.

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 every outputs object in the JSON has a group_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.json

Length 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 outputs

The component_as_tool outputs in these nodes lack a group_outputs field. Please update each output definition to include "group_outputs": false (or true 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 issue

Missing 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: Add group_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:

  1. Update any relevant documentation or README to describe the purpose and default of group_outputs.
  2. Add unit tests that confirm:
    • The default serialization includes "group_outputs": false.
    • Toggling group_outputs to true 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 small

The 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 for shownOutputs (keyPrefix="shown") and again for the same list earlier when showNode 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

📥 Commits

Reviewing files that changed from the base of the PR and between 85ed6a6 and e436ca7.

⛔ 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 like output_types, inputTypes, base_classes, field_order, types, and tags 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: Ensure group_outputs Integration
The group_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 no group_outputs property was added, but lines 237–238 introduce group_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
Adding group_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 of group_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’s message 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’s message 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: Add group_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: Add group_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 the text_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 the model_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 the message 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 the message output guarantees ungrouped display in the playground.


1225-1225: Explicitly disable output grouping for StructuredOutput’s Structured Output output
Inserting "group_outputs": false for the structured_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 the structured_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 the transcription_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 the text_output output aligns with the new flag semantics and maintains consistency.


497-497: Ensure OpenAIModel model_output is displayed individually
The model_output port now explicitly opts out of grouping, matching the PR’s intent.


865-865: Explicitly disable grouping for Prompt output
The Prompt node’s prompt output includes "group_outputs": false to make its output visible without a dropdown.


1016-1016: Ensure ChatOutput is displayed individually
Adding "group_outputs": false to ChatOutput-g8PGI confirms that messages won’t be nested under a dropdown.


1318-1318: Ensure hidden ChatOutput variant is also non-grouped
The ChatOutput-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 the text_output of the second OpenAIModel instance.


1645-1645: Ensure non-grouped display for second OpenAIModel model_output
The model_output port on the second OpenAIModel also disables grouping as expected.


2316-2316: Explicitly disable grouping for second Prompt node
The Prompt-7sDZ1 node’s prompt output now includes "group_outputs": false, ensuring uniform behavior.


2487-2487: Ensure MemoryComponent messages output is non-grouped
Setting "group_outputs": false for the messages output aligns with the new grouping configuration.


2502-2502: Ensure MemoryComponent messages_text output is non-grouped
The messages_text output now explicitly disables grouping, matching adjacent outputs.


2516-2516: Ensure MemoryComponent dataframe output is non-grouped
Adding "group_outputs": false for the dataframe output completes the MemoryComponent’s output configuration.


2757-2757: Ensure ChatInput message output is non-grouped
The ChatInput-2fdX6 node’s message output now explicitly opts out of grouping.


3171-3171: Ensure AssemblyAITranscriptionJobCreator transcript_id output is non-grouped
The transcript_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 the ChatInput node’s message 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 the ChatOutput node’s message 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 added group_outputs to the Prompt node’s output
The "group_outputs": false property on the Prompt node’s prompt output ensures it is rendered without a dropdown, matching the starter‐project convention.


315-315: Correctly added group_outputs to the ChatOutput node’s output
The "group_outputs": false property on the ChatOutput node’s message output disables grouping, improving visibility as intended.


879-879: Correctly added group_outputs to the ChatInput node’s output
The "group_outputs": false property on the ChatInput node’s message 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 like LoopComponent. Unlike starter projects which use group_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: Approve group_outputs flag for Chat Input output
The addition of "group_outputs": false under the ChatInput node’s message output is consistent with the PR goal and matches other starter project configurations.


470-472: Approve group_outputs flag for Chat Output output
Adding "group_outputs": false to the ChatOutput node’s message output aligns with the new metadata standard and ensures uniform frontend behavior.


1657-1659: Approve group_outputs flag for Agent output
The "group_outputs": false flag on the Agent node’s response 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
The group_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 explicit group_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 explicit group_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 explicit group_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 explicit group_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 explicit group_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 explicit group_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 explicit group_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 explicit group_outputs to NovitaModel text output
Adding "group_outputs": false ensures the NovitaModel’s text response is displayed individually in the UI.


594-594: Add explicit group_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 explicit group_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 for output_types.

Converted the output_types from a single-line to a multi-line array for improved readability. No functional impact.


268-275: Approve group_outputs on File component data output.

The new "group_outputs": false flag is correctly added to the File component’s data output, ensuring it’s displayed individually in the UI as intended.


283-291: Approve group_outputs on File component dataframe output.

Consistent addition of "group_outputs": false aligns with PR objectives and matches the data output configuration.


298-306: Approve group_outputs on File component message output.

The flag is correctly applied to the message output, maintaining consistency across all File component outputs.


584-592: Approve group_outputs on Prompt component prompt output.

The "group_outputs": false property is correctly included in this Prompt node’s output, matching the starter project pattern.


737-745: Approve group_outputs on second Prompt component prompt output.

Ensures both Prompt node definitions explicitly disable grouping of outputs. Good consistency.


901-909: Approve group_outputs on OpenAIModel text_output output.

Correctly added to the text_output entry, aligning backend metadata with frontend rendering logic.


915-924: Approve group_outputs on OpenAIModel model_output output.

The "group_outputs": false flag is properly set for the model_output, ensuring both outputs follow the same behavior.


2225-2233: Approve group_outputs on ChatOutput message output.

The ChatOutput node’s message output now explicitly disables grouping, as intended for individual display.


2533-2541: Approve group_outputs on second ChatOutput message output.

Consistent addition of the flag in all ChatOutput instances. No issues detected.


2901-2904: Approve new tags 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
Both text_output and model_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: Approve group_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: Approve group_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: Approve group_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: Approve group_outputs flag on OpenAIModel text output
The "group_outputs": false insertion for text_output is correct and consistent with the PR objectives. Valid JSON and ordering.


923-926: Approve group_outputs flag on OpenAIModel model output
The "group_outputs": false field for model_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 of group_outputs for Prompt node (Prompt-I3JbF).
This flag ensures the Prompt component’s output is displayed directly rather than inside a dropdown.


482-482: Added group_outputs to Chat Input node outputs (ChatInput-KgyhN).
Ensures chat input messages render individually in the UI.


776-776: Set group_outputs on Prompt node (Prompt-o2zd8).
Aligns with starter‐project convention to show outputs without grouping.


1010-1010: Include group_outputs in Agent node outputs (Agent-TPxdA).
Makes agent responses render as individual outputs.


1610-1610: Apply group_outputs on Prompt node (Prompt-saNk6).
Keeps prompt outputs visible without dropdown grouping.


1738-1738: Add group_outputs for Prompt node (Prompt-z31Nf).
Ensures consistency across all Prompt variants.


2378-2378: Set group_outputs on OpenAIModel output (text_output).
Makes model responses display directly rather than in a grouped menu.


2392-2392: Add group_outputs to OpenAIModel output (model_output).
Ensures the built model output is shown individually.


2771-2771: Include group_outputs on second OpenAIModel output (text_output).
Maintains UI consistency for multiple model nodes.


2786-2786: Apply group_outputs on second OpenAIModel output (model_output).
Prevents dropdown grouping for the language‐model output.


3155-3155: Added group_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 no group_outputs properties were added, but this file includes "group_outputs": false on several outputs 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 explicit group_outputs flags
All hunks in this file are either:

  1. 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.
  2. 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 of group_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 of group_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 of group_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 of group_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 of group_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 of group_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 of group_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 of group_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 of group_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 of group_outputs for OpenAIModel (dXMRv) text_output
The text_output property now includes "group_outputs": false to display individually.


2105-2105: Consistent addition of group_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: Add group_outputs flag to ChatInput output
The group_outputs": false property correctly annotates the ChatInput node’s output to prevent dropdown grouping, aligning with the updated backend Output schema.


520-520: Add group_outputs flag to ChatOutput output
Including group_outputs": false on the ChatOutput node ensures its message output is displayed inline, matching the new UI behavior.


853-853: Add group_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: Add group_outputs flag to OpenAIModel text output
Marking the text_output with group_outputs": false ensures the generated text appears without a dropdown, as intended by the refactor.


1013-1013: Add group_outputs flag to OpenAIModel model output
Applying group_outputs": false to the model_output entry keeps the LanguageModel output visible inline, consistent with the new grouping logic.


1380-1380: Add group_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: Add group_outputs flag to StructuredOutput DataFrame output
Ensuring the DataFrame output defaults to visible inline by adding group_outputs": false maintains uniform UX across outputs.

src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json (6)

352-352: Add explicit group_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 explicit group_outputs flag to ChatOutput output
The "group_outputs": false addition aligns with the new grouping logic and is correctly placed.


1979-1979: Add explicit group_outputs flag to SambaNovaModel text_output
The "group_outputs": false key is properly added to the first output of SambaNovaModel.


1994-1994: Add explicit group_outputs flag to SambaNovaModel model_output
The "group_outputs": false flag is correctly applied to the second output of SambaNovaModel.


3706-3706: Add explicit group_outputs flag to Prompt output (Prompt-er8QV)
The "group_outputs": false insertion for this Prompt node is accurate and consistent.


3883-3883: Add explicit group_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: Add group_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: Add group_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: Add group_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: Add group_outputs to Memory (Message) output
Including "group_outputs": false for the messages_text output aligns it with the new output grouping logic for starter projects.


853-857: Add group_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: Add group_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: Add group_outputs to OpenAIModel “Message” output
Marking the text_output with "group_outputs": false makes the LLM response appear directly without a dropdown.


1273-1277: Add group_outputs to OpenAIModel “Language Model” output
Including "group_outputs": false for the model_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
The group_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 of group_outputs: false ensures chat messages are shown without dropdowns as intended.


848-848: Explicitly disable grouping for StructuredOutput "Structured Output"
Adding group_outputs: false correctly targets the primary structured output and matches the new flag semantics.


862-862: Explicitly disable grouping for StructuredOutput "DataFrame" output
The group_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
Adding group_outputs: false aligns with the backend flag support to show messages directly.


2325-2325: Explicitly disable grouping for OpenAIModel "Language Model" output
The group_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: Add group_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: Add group_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: Add group_outputs flag to StructuredOutput (DataFrame)
The "group_outputs": false flag on the DataFrame output ensures both StructuredOutput outputs render individually as intended.


905-908: Add group_outputs flag to OpenAIModel (Message)
Adding "group_outputs": false for the Message output aligns with the new metadata-driven output rendering.


920-923: Add group_outputs flag to OpenAIModel (Language Model)
The "group_outputs": false for the model_output output correctly disables grouping for this output channel.


1303-1306: Add group_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: Add group_outputs flag to AstraDB (DataFrame)
The "group_outputs": false flag on the DataFrame output ensures consistent individual rendering.


1337-1340: Add group_outputs flag to AstraDB (Vector Store Connection)
Adding "group_outputs": false and keeping this output hidden is consistent with backend decorator defaults.


2066-2069: Add group_outputs flag to ParserComponent-9FGat
The "group_outputs": false addition for the Parsed Text output fulfills the PR objective in this node.


2546-2550: Add group_outputs flag to ParserComponent-AzBHA
Ensuring "group_outputs": false on the second ParserComponent instance maintains consistent output display.


2245-2248: Add group_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 using idx === 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:

  1. Filter outputs based on keyPrefix
  2. Find selectedOutput by name
  3. Find output with selected property
  4. 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 of group_outputs to Memory component outputs.
The group_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: Added group_outputs flag to Prompt component output.
The single output of the Prompt component (Prompt Message) now includes group_outputs: false, aligning with other starter projects to display outputs individually.


1418-1431: Correctly set group_outputs: false on AnthropicModel outputs.
Both outputs (Message and Language Model) of the AnthropicModel node now explicitly disable grouping, matching the intended UI behavior.

Also applies to: 1433-1440


1749-1761: Added group_outputs: false to ChatInput component output.
The ChatInput node’s output (Message) now specifies group_outputs: false, ensuring consistency in output presentation.


2061-2074: Explicit group_outputs: false for ChatOutput component output.
The ChatOutput node’s Message output has been updated to include group_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 here

Adding "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 of group_outputs: true for loop outputs

Setting 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 sync

Great idea to mutate edges in place instead of deleting & recreating them. Two points to double-check:

  1. You overwrite edge.sourceHandle (string) but leave edge.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
  1. 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 rendering

Rendering 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: Add group_outputs: false to BatchRunComponent outputs
Including "group_outputs": false on the batch_results output ensures it’s rendered individually in the UI, matching the intended starter‐project behavior and schema default.


559-567: Add group_outputs: false to YouTubeCommentsComponent outputs
Marking the comments output with "group_outputs": false keeps that channel ungrouped, aligning with other starter‐project configurations.


777-785: Add group_outputs: false to OpenAIModel text_output
Specifying "group_outputs": false for text_output maintains consistency with non‐grouped outputs in starter flows.


792-800: Add group_outputs: false to OpenAIModel model_output
Ensures the model_output is displayed individually rather than behind a dropdown, matching intended default behavior.


1829-1836: Add group_outputs: false to Prompt outputs
Flagging the prompt output as "group_outputs": false aligns it with other ungrouped starter outputs.


2004-2011: Add group_outputs: false to ChatOutput messages
Ensures the message output of ChatOutput is shown directly, in line with other starter configurations.


2596-2604: Add group_outputs: false to ChatInput messages
Maintains UI consistency by showing the message output individually for ChatInput.


2994-3021: Enable group_outputs: true for ConditionalRouter outputs
Grouping both true_result and false_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.

Comment on lines 262 to 271
// 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;
},
);
Copy link

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.

Suggested change
// 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.

@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 29, 2025
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels May 29, 2025
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 29, 2025
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 29, 2025
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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 71964e3 and d30631b.

📒 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 like allows_loop=True are correctly preserved.

@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer refactor Maintenance tasks and housekeeping size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants