refactor: Clean up the hidden attribute and switch group_outputs logic#9065
refactor: Clean up the hidden attribute and switch group_outputs logic#9065deon-sanchez wants to merge 25 commits into
Conversation
- Updated multiple JSON files and Python components to remove the 'hidden' property from outputs, enhancing clarity and consistency across the codebase. - Adjusted related frontend components to reflect these changes, ensuring that hidden outputs are no longer managed or displayed. - Cleaned up unused constants and helper functions related to hidden outputs, streamlining the codebase. This refactor aims to simplify the output handling logic and improve maintainability.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change removes the Changes
Sequence Diagram(s)sequenceDiagram
participant Backend
participant Frontend
participant User
User->>Frontend: Request to view node outputs
Frontend->>Backend: Fetch node output metadata
Backend-->>Frontend: Return outputs (all outputs visible)
Frontend-->>User: Render all outputs (no hidden outputs logic)
Possibly related PRs
Suggested labels
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Actionable comments posted: 5
🔭 Outside diff range comments (2)
docs/docs/Integrations/Notion/Meeting_Notes_Agent.json (2)
182-187: Invalid JSON – dangling comma left behind afterhiddenremoval
"cache": true,is now the terminal property in the object, but the comma was kept when thehiddenline below it was deleted.
This renders the whole flow file syntactically invalid and will break parsing/runtime import.- "cache": true, + "cache": trueSame issue repeats for every output block touched by this PR – search for
"cache": true,followed by a blank line/closing brace and drop the comma in each occurrence.
Failure to fix will 404 the integration at load time.
350-353:hiddenattribute still present – violates stated refactor goalA few outputs still carry
"hidden": falseor"hidden": null.
Example lines shown above.
To keep the schema consistent and honour the PR objective (“remove thehiddenattribute from outputs”), delete the property entirely instead of toggling its value / null-ing it.- "hidden": false(or the whole line with
null)Removing these residual keys will also eliminate redundant metadata and avoid future drift.
Also applies to: 526-530, 1448-1452, 2763-2766
🧹 Nitpick comments (5)
src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (1)
1750-1760: Large inlined code string – consider extracting to a.pyThe full Python implementation of
MemoryComponentsits inside a JSON-string ("value": "from typing import Any, cast\n...").
This makes diff-review, syntax linting and IDE support extremely difficult.If practical, store the class in a regular
.pymodule and reference it from the template instead.
That keeps JSON lightweight and gives the Python code proper tooling.src/backend/base/langflow/initial_setup/starter_projects/Custom Component Generator.json (1)
310-325: Ensureselected_outputis updated when switching to “Store” modeThe
update_outputsmethod now surfaces thestored_messagesoutput (👍), but it does not resetfrontend_node["selected_output"].
If the user toggles from “Retrieve” ➜ “Store”,selected_outputwill still point tomessages_text, producing a dangling reference on the front-end.if field_value == "Store": frontend_node["outputs"] = [ Output( display_name="Stored Messages", name="stored_messages", method="store_message", dynamic=True, ) ] + frontend_node["selected_output"] = "stored_messages" elif field_value == "Retrieve": frontend_node["outputs"] = [ Output( display_name="Messages", name="messages_text", method="retrieve_messages_as_text", dynamic=True, ), Output( display_name="Dataframe", name="dataframe", method="retrieve_messages_dataframe", dynamic=True, ), ] + frontend_node["selected_output"] = "messages_text"This small addition avoids UI inconsistencies and potential runtime errors when the flow is executed right after mode switching.
docs/docs/Integrations/Notion/Conversational_Notion_Agent.json (3)
698-709: Consistency across the fileMultiple blocks had
hiddenremoved, yet some others still keep"hidden": null(e.g. Memory at ~2999 ff, Prompt at ~3297 ff).
Consider purging those leftovers as well for a clean, uniform schema.- "hidden": null,
1555-1571: Agent output now publicMaking the internal
agentrunnable visible can be powerful but also dangerous—users may chain it unexpectedly.
Ensure downstream components can consume anAgentExecutor; if not, keep it hidden.
2477-2499: Tool data output exposed
tool_datais mostly meta-information. If it is large or verbose, consider keeping it hidden and expose only on demand to avoid noise.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (27)
docs/docs/Integrations/Notion/Conversational_Notion_Agent.json(10 hunks)docs/docs/Integrations/Notion/Meeting_Notes_Agent.json(12 hunks)src/backend/base/langflow/base/agents/agent.py(1 hunks)src/backend/base/langflow/base/tools/run_flow.py(0 hunks)src/backend/base/langflow/base/vectorstores/vector_store_connection_decorator.py(0 hunks)src/backend/base/langflow/components/datastax/astra_assistant_manager.py(1 hunks)src/backend/base/langflow/components/helpers/memory.py(0 hunks)src/backend/base/langflow/components/helpers/store_message.py(1 hunks)src/backend/base/langflow/components/langchain_utilities/csv_agent.py(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Custom Component Generator.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json(68 hunks)src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json(96 hunks)src/backend/base/langflow/template/field/base.py(1 hunks)src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/NodeOutputs.tsx(3 hunks)src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/index.tsx(0 hunks)src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx(1 hunks)src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx(2 hunks)src/frontend/src/CustomNodes/GenericNode/index.tsx(7 hunks)src/frontend/src/CustomNodes/helpers/mutate-template.ts(1 hunks)src/frontend/src/CustomNodes/helpers/update-hidden-outputs.ts(0 hunks)src/frontend/src/CustomNodes/hooks/use-update-all-nodes.ts(1 hunks)src/frontend/src/CustomNodes/hooks/use-update-node-code.ts(1 hunks)src/frontend/src/constants/constants.ts(0 hunks)src/frontend/src/types/api/index.ts(0 hunks)src/frontend/src/types/components/index.ts(1 hunks)
💤 Files with no reviewable changes (7)
- src/backend/base/langflow/base/vectorstores/vector_store_connection_decorator.py
- src/backend/base/langflow/components/helpers/memory.py
- src/frontend/src/types/api/index.ts
- src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/index.tsx
- src/frontend/src/constants/constants.ts
- src/backend/base/langflow/base/tools/run_flow.py
- src/frontend/src/CustomNodes/helpers/update-hidden-outputs.ts
🧰 Additional context used
📓 Path-based instructions (5)
src/frontend/**/*.{ts,tsx}
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- .cursor/rules/frontend_development.mdc
src/frontend/**/*.{ts,tsx,js,jsx,css,scss}
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- .cursor/rules/frontend_development.mdc
src/backend/**/*.py
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- .cursor/rules/backend_development.mdc
src/backend/base/langflow/components/**/*.py
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- .cursor/rules/backend_development.mdc
src/backend/**/components/**/*.py
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- .cursor/rules/icons.mdc
🧠 Learnings (11)
src/frontend/src/CustomNodes/helpers/mutate-template.ts (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Error handling for API calls in React should be abstracted into custom hooks (e.g., useApi), which manage loading and error state and expose an execute function for invoking the API.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: API integration in the frontend should be encapsulated in service functions that use async/await and return only the response data, not the full response object.
src/frontend/src/CustomNodes/hooks/use-update-all-nodes.ts (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx (3)
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#0
File: :0-0
Timestamp: 2025-06-26T19:43:18.260Z
Learning: In langflow custom components, the `module_name` parameter is now propagated through template building functions to add module metadata and code hashes to frontend nodes for better component tracking and debugging.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.849Z
Learning: Applies to src/frontend/**/*.@(test|spec).{ts,tsx,js,jsx} : Frontend tests should validate input/output behavior and component state changes.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx (1)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
src/backend/base/langflow/initial_setup/starter_projects/Custom Component Generator.json (4)
undefined
<retrieved_learning>
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#0
File: :0-0
Timestamp: 2025-06-26T19:43:18.260Z
Learning: In langflow custom components, the module_name parameter is now propagated through template building functions to add module metadata and code hashes to frontend nodes for better component tracking and debugging.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.464Z
Learning: Starter project files are auto-formatted after langflow run; these changes can be committed or ignored
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
</retrieved_learning>
src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/NodeOutputs.tsx (2)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: React Flow should be used for flow graph visualization, with nodes and edges passed as props, and changes handled via onNodesChange and onEdgesChange callbacks.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
src/frontend/src/CustomNodes/GenericNode/index.tsx (8)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.510Z
Learning: Applies to src/frontend/src/components/**/*FlowGraph.tsx : Use React Flow for flow graph visualization components.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: Export custom icon components in React using React.forwardRef to ensure proper ref forwarding and compatibility with parent components.
Learnt from: dolfim-ibm
PR: langflow-ai/langflow#8394
File: src/frontend/src/icons/Docling/index.tsx:4-6
Timestamp: 2025-06-16T11:14:04.200Z
Learning: The Langflow codebase consistently uses `React.PropsWithChildren<{}>` as the prop type for all icon components using forwardRef, rather than `React.SVGProps<SVGSVGElement>`. This is an established pattern across hundreds of icon files in src/frontend/src/icons/.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: React Flow should be used for flow graph visualization, with nodes and edges passed as props, and changes handled via onNodesChange and onEdgesChange callbacks.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Use Zustand for state management in React components within the frontend; stores should expose both state and setter functions, and be imported via hooks (e.g., useMyStore).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-30T14:40:29.510Z
Learning: Applies to src/frontend/src/icons/**/*.{ts,tsx,js,jsx} : Use Lucide React for icons in frontend components.
Learnt from: namastex888
PR: langflow-ai/langflow#9018
File: src/frontend/src/modals/apiModal/codeTabs/code-tabs.tsx:244-244
Timestamp: 2025-07-11T22:12:46.228Z
Learning: In src/frontend/src/modals/apiModal/codeTabs/code-tabs.tsx, the inconsistent showLineNumbers setting between Step 1 (false) and Step 2 (true) in the API modal is intentional to prevent breaking the modal height. Step 1 uses showLineNumbers={false} to save vertical space while Step 2 uses showLineNumbers={true} for better readability of longer code.
src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json (3)
undefined
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.464Z
Learning: Starter project files are auto-formatted after langflow run; these changes can be committed or ignored
</retrieved_learning>
<retrieved_learning>
Learnt from: edwinjosechittilappilly
PR: #8504
File: src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json:391-393
Timestamp: 2025-06-12T15:25:01.072Z
Learning: The repository owner prefers CodeRabbit not to review or comment on JSON files because they are autogenerated.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.849Z
Learning: Applies to {src/backend/tests//*.py,tests//*.py} : Test Langflow's 'Message' objects and chat functionality by asserting correct properties and structure.
</retrieved_learning>
src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (2)
undefined
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
</retrieved_learning>
src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (4)
undefined
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.464Z
Learning: Starter project files are auto-formatted after langflow run; these changes can be committed or ignored
</retrieved_learning>
<retrieved_learning>
Learnt from: edwinjosechittilappilly
PR: #8504
File: src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json:391-393
Timestamp: 2025-06-12T15:25:01.072Z
Learning: The repository owner prefers CodeRabbit not to review or comment on JSON files because they are autogenerated.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/docs_development.mdc:0-0
Timestamp: 2025-06-30T14:40:02.682Z
Learning: Applies to docs/docs/**/*.{md,mdx} : Use consistent terminology: always capitalize 'Langflow', 'Component', and 'Flow' when referring to Langflow concepts; always uppercase 'API' and 'JSON'.
</retrieved_learning>
<retrieved_learning>
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.849Z
Learning: Applies to {src/backend/tests//*.py,tests//*.py} : Test Langflow's 'Message' objects and chat functionality by asserting correct properties and structure.
</retrieved_learning>
🧬 Code Graph Analysis (3)
src/backend/base/langflow/components/langchain_utilities/csv_agent.py (1)
src/backend/base/langflow/template/field/base.py (1)
Output(181-256)
src/backend/base/langflow/base/agents/agent.py (1)
src/backend/base/langflow/template/field/base.py (1)
Output(181-256)
src/backend/base/langflow/components/datastax/astra_assistant_manager.py (2)
src/backend/base/langflow/template/field/base.py (1)
Output(181-256)src/backend/base/langflow/base/astra_assistants/util.py (1)
name(147-151)
🔇 Additional comments (23)
src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json (1)
1-2676: Skipping review for auto-generated starter project JSONPer the repository maintainers’ guidance, starter-project JSON files are auto-generated/auto-formatted and should not receive code-review comments.
src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json (1)
1-4523: Skipping review – starter-project JSON files are auto-generated.Per prior maintainer feedback, these files are formatted automatically and shouldn’t receive manual review comments.
src/frontend/src/CustomNodes/helpers/mutate-template.ts (1)
56-56: LGTM: Simplified output assignment improves code clarity.The direct assignment of
newTemplate.outputs ?? []eliminates the complex hidden output handling logic, making the code more straightforward and maintainable. This aligns well with the refactor goals to remove hidden output functionality.src/frontend/src/CustomNodes/hooks/use-update-node-code.ts (1)
31-31: LGTM: Direct output assignment simplifies the logic.The direct assignment of
newNodeClass.outputseliminates the complex hidden output handling logic, making the code more straightforward and easier to understand. This change aligns well with the refactor goals to remove hidden output functionality.src/backend/base/langflow/components/helpers/store_message.py (1)
52-52: LGTM! Output visibility change aligns with PR objectives.This change removes the
hidden=Trueattribute from the "Stored Messages" output, making it visible in the UI. The change is consistent with the broader refactor to eliminate hidden outputs across the codebase.src/backend/base/langflow/components/langchain_utilities/csv_agent.py (1)
64-64: LGTM! Output visibility and tool mode configuration updated correctly.This change removes the
hidden=Trueattribute from the "Agent" output and explicitly setstool_mode=False. The change makes the Agent output visible in the UI and correctly configures its tool mode behavior, aligning with the PR objectives.src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json (1)
1005-1005: LGTM! Memory component configuration updated to remove hidden outputs.This configuration update removes the
hidden=Trueattribute from the "Stored Messages" output in the Memory component'supdate_outputsmethod. The change is consistent with the broader refactor to eliminate hidden outputs across the codebase and aligns with the PR objectives.src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx (1)
14-14: LGTM! Clean simplification of output handling logic.The component props have been simplified by replacing
shownOutputsandshowHiddenOutputswith a single unifiedoutputsprop. The logic for determining thelastInputcondition has been streamlined to simply check if there are any outputs, removing unnecessary complexity related to hidden output handling.Also applies to: 97-97
src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json (1)
1708-1740:update_outputsnow exposes “Stored Messages” – check downstream consumersThe previously-hidden
stored_messagesoutput is now visible.
Two things to double-check before merging:
- Front-end nodes that switch the component into Store mode may still have their
selected_outputpointing to the now-removed hidden port. Ensure the UI receives a valid, existing output name after this change, otherwise the run will fail with “output not found”.- Any automation/scripts that assumed the port was hidden (e.g. tracing pipelines that rely on
messages_textonly) will now receive an additional output. Confirm this does not break JSON-schema validation or downstream chaining.No code change required, but worth running an end-to-end flow to verify.
src/frontend/src/CustomNodes/GenericNode/components/NodeOutputfield/index.tsx (1)
125-127: No changes needed:hiddenprop is for UI toggling, not the removed output‐definition flag.The
hiddenprop in NodeOutputField—and the EyeIcon it drives—is used purely for local collapse/expand of the output field in the UI. It isn’t related to the removedshowHiddenOutputslogic, so this usage is correct and requires no refactoring.Likely an incorrect or invalid review comment.
src/frontend/src/CustomNodes/GenericNode/index.tsx (2)
223-223: LGTM: Unified output handling implementation.The replacement of separate
shownOutputsandhiddenOutputsarrays with a singleoutputsarray correctly implements the PR objective of treating all outputs uniformly.
344-344: LGTM: Consistent use of unified outputs array.All child components now receive the unified
outputsarray, eliminating the need for separate hidden/shown output handling. This change is consistent throughout the component.Also applies to: 490-490, 493-493, 545-545, 556-556
src/backend/base/langflow/components/datastax/astra_assistant_manager.py (1)
139-142: LGTM: Removal of hidden attribute from output declarations.The removal of
hidden=Truefrom the "Tool output", "Thread Id", "Assistant Id", and "Vector Store Id" outputs aligns with the PR objective of making previously hidden outputs visible. These outputs will now be available for users to inspect and connect to other components.docs/docs/Integrations/Notion/Conversational_Notion_Agent.json (3)
393-404: Hidden flag removed – verify default UI behaviour
hiddenwas dropped from this output descriptor.
Confirm that the consumer (front-end / SDK) now treats absence of that field exactly ashidden=false; otherwise the port may disappear or break older flows.No code change required if the contract is already clear, just sanity-check.
546-557: Same concern for every “Data” outputSame note as above – validate that newly-visible outputs won’t clutter the canvas or expose sensitive payloads.
(Here and in every other component touched by this PR.)
1225-1236: Visibility & UX impactNotionSearch now surfaces its “Data” port.
Double-check large result sets don’t flood the UI or produce heavy payloads when rendered.src/frontend/src/CustomNodes/GenericNode/components/NodeOutputParameter/NodeOutputs.tsx (7)
29-30: LGTM: Simplified shouldShowAllOutputs conditionThe condition now focuses solely on the core logic (loop outputs, group outputs, and conditional router) without the complexity of hidden output handling. This simplification improves readability and maintainability.
35-35: LGTM: Direct output mapping without hidden filteringThe mapping now processes all outputs directly without filtering for hidden status, which aligns with the refactor goal of making all outputs visible.
45-45: LGTM: Simplified lastOutput calculationThe calculation now correctly determines if the current output is the last one in the unfiltered outputs array.
52-52: LGTM: Explicit hidden prop set to falseConsistently setting
hidden={false}ensures all outputs are treated as visible, which is the intended behavior after removing the hidden output concept.
60-64: LGTM: Simplified getDisplayOutput functionThe function now searches the full outputs array without hidden filtering and falls back to the first output if no selection is found. This is a cleaner implementation that maintains the expected behavior.
81-81: LGTM: Correct lastOutput assignmentSetting
lastOutput={true}for the single display output case is correct since it's the only output being rendered in this code path.
88-88: LGTM: Consistent hidden prop assignmentMaintaining consistency with the other render path by setting
hidden={false}ensures uniform behavior across all output rendering scenarios.
|
|
||
| hidden?: boolean; |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Verify consistency: hidden property may be inconsistent with the refactor goals.
The hidden?: boolean; property on line 112 appears to remain in the NodeOutputFieldComponentType interface, which seems inconsistent with the broader refactor to remove hidden output functionality. Please verify if this property should also be removed as part of this change.
🏁 Script executed:
#!/bin/bash
# Description: Search for remaining references to hidden outputs in the frontend codebase
# Expected: Should find minimal or no references if the refactor is complete
echo "Searching for 'hidden' property in output-related types and components..."
rg -A 3 -B 3 "hidden.*output|output.*hidden" src/frontend/
echo "Searching for 'showHiddenOutputs' references..."
rg -A 3 -B 3 "showHiddenOutputs" src/frontend/
echo "Searching for 'hidden' in component types..."
rg -A 3 -B 3 "hidden\?" src/frontend/src/types/Length of output: 1360
Remove lingering hidden properties to align with refactor
The grep output shows that hidden?: boolean is still defined in your type declarations, despite removing the hidden-output functionality:
• src/frontend/src/types/components/index.ts
• Remove the hidden?: boolean; property from NodeOutputFieldComponentType.
• src/frontend/src/types/utils/functions.ts
• Remove the hidden?: boolean; property from the related utility type.
These lingering definitions will reintroduce hidden-output behavior. Please delete them (and any now-unused imports) to complete the refactor.
🤖 Prompt for AI Agents
In src/frontend/src/types/components/index.ts around lines 111 to 112, remove
the lingering `hidden?: boolean;` property from the
`NodeOutputFieldComponentType` type declaration to fully eliminate hidden-output
functionality. Also, check for and remove any now-unused imports related to this
property to complete the refactor.
|
|
||
| hidden: bool | None = Field(default=None) | ||
| """Dictates if the field is hidden.""" | ||
|
|
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
LGTM: Removal of hidden field aligns with refactor goals.
The removal of the hidden field from the Output class is consistent with the broader refactor to eliminate hidden output functionality. This simplifies the output model and makes all outputs uniformly visible.
🏁 Script executed:
#!/bin/bash
# Description: Verify no remaining references to hidden outputs in backend code
# Expected: Should find minimal or no references if the refactor is complete
echo "Searching for 'hidden' in backend output-related code..."
rg -A 3 -B 3 "hidden.*output|output.*hidden" src/backend/
echo "Searching for 'hidden=True' in backend components..."
rg -A 2 -B 2 "hidden=True" src/backend/Length of output: 44599
Fix Required: Remove residual hidden references
We still have hidden=True usages that will break now that the hidden parameter has been removed from Output. Please update the following:
-
src/backend/tests/data/MemoryChatbotNoLLM.json
In theupdate_outputscode block, remove thehidden=Trueargument:- Output( - display_name="Stored Messages", - name="stored_messages", - method="store_message", - hidden=True, - dynamic=True, - ) + Output( + display_name="Stored Messages", + name="stored_messages", + method="store_message", + dynamic=True, + )
After making these edits, run rg -R "hidden=" src/backend/ to ensure no other occurrences remain, then re-run tests to confirm everything passes.
📝 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.
| Output( | |
| display_name="Stored Messages", | |
| name="stored_messages", | |
| method="store_message", | |
| dynamic=True, | |
| ) |
🤖 Prompt for AI Agents
In src/backend/tests/data/MemoryChatbotNoLLM.json at the update_outputs code
block, remove all instances of the hidden=True argument since the hidden
parameter has been removed from Output. After this, run a recursive grep search
for "hidden=" within the src/backend/ directory to confirm no other references
remain. Finally, rerun all tests to verify that the removal does not cause any
failures.
| outputs!, | ||
| updatedOutputs!, | ||
| ); | ||
| updatedNode.data.node!.outputs = updatedNode.data.node?.outputs; |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Remove redundant no-op assignment.
The line updatedNode.data.node!.outputs = updatedNode.data.node?.outputs; is effectively a no-op operation that assigns a value to itself. This appears to be leftover from removing the updateHiddenOutputs logic. Consider removing this line entirely since it serves no purpose.
- updatedNode.data.node!.outputs = updatedNode.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.
| updatedNode.data.node!.outputs = updatedNode.data.node?.outputs; |
🤖 Prompt for AI Agents
In src/frontend/src/CustomNodes/hooks/use-update-all-nodes.ts at line 50, remove
the line that assigns updatedNode.data.node!.outputs to itself, as it is a
redundant no-op and serves no purpose after removing the updateHiddenOutputs
logic.
| outputs = [ | ||
| Output(display_name="Agent", name="agent", method="build_agent", hidden=True, tool_mode=False), | ||
| Output(display_name="Agent", name="agent", method="build_agent", tool_mode=False), | ||
| Output(display_name="Response", name="response", method="message_response"), | ||
| ] |
There was a problem hiding this comment.
_validate_outputs will raise – name must be "build_agent"
_validate_outputs (lines 89-98) explicitly checks that each required method name ("build_agent") is present in output.name.
With the current declaration:
Output(display_name="Agent", name="agent", method="build_agent", tool_mode=False)output.name is "agent", so the check if method_name not in output_names: evaluates to True, and the component will raise ValueError("Output with name 'build_agent' must be defined.") during instantiation.
Proposed minimal fix:
-Output(display_name="Agent", name="agent", method="build_agent", tool_mode=False),
+Output(display_name="Agent", name="build_agent", method="build_agent", tool_mode=False),This keeps the user-facing label while satisfying the internal validation.
🤖 Prompt for AI Agents
In src/backend/base/langflow/base/agents/agent.py around lines 72 to 75, the
Output object has name="agent" but the _validate_outputs method requires an
output with name="build_agent". To fix this, change the Output's name from
"agent" to "build_agent" while keeping display_name as "Agent" to satisfy the
validation without changing the user-facing label.
| "value": "__UNDEFINED__", | ||
| "cache": true, | ||
| "hidden": true | ||
|
|
||
| }, |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Carry-over of the same dangling-comma bug in other blocks
The exact trailing-comma mistake appears at the following additional ranges (non-exhaustive):
- 338-341 – NotionSearch output
- 910-917 – ToolCallingAgent (first instance)
- 1228-1233 – OpenAIModel (first instance)
- 1698-1703 – ToolCallingAgent (second instance)
- 2013-2018 – OpenAIModel (second instance)
- 2169-2174 – AddContentToPage
- 2446-2451 – NotionDatabaseProperties
Please sweep the whole document for it; otherwise the JSON will remain unparsable.
Also applies to: 910-917, 1228-1233, 1698-1703, 2013-2018, 2169-2174, 2446-2451
🏁 Script executed:
#!/bin/bash
set -e
# Locate the Notion Meeting Notes Agent JSON file
FILE=$(fd --full-path Meeting_Notes_Agent.json | head -n 1)
echo "Checking JSON validity for: $FILE"
# Try parsing the JSON to catch trailing-comma errors
python3 - <<EOF
import json, sys
fpath = sys.argv[1]
try:
with open(fpath) as f:
json.load(f)
print("✅ JSON parsed successfully")
except Exception as e:
print("❌ JSON parse error:", e)
EOF
"$FILE"Length of output: 422
🏁 Script executed:
#!/bin/bash
set -e
# Locate the JSON file
FILE=$(fd --full-path Meeting_Notes_Agent.json | head -n 1)
echo "Inspecting: $FILE"
# Search for trailing commas before closing braces or brackets
echo -e "\n--- Trailing commas matches ---"
rg -n ',\s*[\}\]]' "$FILE" || true
# Show context for each reported range
for range in "338,341" "910,917" "1228,1233" "1698,1703" "2013,2018" "2169,2174" "2446,2451"; do
start=${range%,*}
end=${range#*,}
echo -e "\n--- Context lines $start-$end ---"
sed -n "${start},${end}p" "$FILE"
doneLength of output: 4246
Remove trailing commas from the last property in each JSON object
The JSON file docs/docs/Integrations/Notion/Meeting_Notes_Agent.json contains several objects where the final property ("cache": true) has a trailing comma, making the document invalid JSON. Please remove the comma after "cache": true in each of the following ranges:
• Lines 338–341
• Lines 910–917
• Lines 1228–1233
• Lines 1698–1703
• Lines 2013–2018
• Lines 2169–2174
• Lines 2446–2451
Example diff for lines 338–341:
"value": "__UNDEFINED__",
- "cache": true,
+ "cache": true
},📝 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.
| "value": "__UNDEFINED__", | |
| "cache": true, | |
| "hidden": true | |
| }, | |
| "value": "__UNDEFINED__", | |
| "cache": true | |
| }, |
🧰 Tools
🪛 Biome (1.9.4)
[error] 341-341: Expected a property but instead found '}'.
Expected a property here.
(parse)
🤖 Prompt for AI Agents
In docs/docs/Integrations/Notion/Meeting_Notes_Agent.json at lines 338 to 341,
remove the trailing comma after the last property "cache": true in the JSON
object to ensure valid JSON syntax. Repeat this removal of trailing commas after
the last property in the JSON objects at the specified line ranges: 910–917,
1228–1233, 1698–1703, 2013–2018, 2169–2174, and 2446–2451.
This comment has been minimized.
This comment has been minimized.
- Updated multiple starter project JSON files to set "group_outputs" to true for various message and output components, enhancing the output handling experience. - Adjusted the base model in the Python code to default "group_outputs" to true, ensuring consistency across the application. - This change improves the user interface by allowing outputs to be grouped, simplifying the interaction with multiple outputs.
- Added console logging for grouped and individual outputs in NodeOutputs component to aid in debugging. - Removed unused EyeIcon component and the hidden property from NodeOutputField, streamlining the code. - Introduced state management for the popover in OutputComponent, improving user interaction by closing the popover upon selection. - These changes improve clarity and maintainability of the output handling logic across components.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
580a5a1 to
1e03bb9
Compare
This comment has been minimized.
This comment has been minimized.
|
Build successful! ✅ |
1 similar comment
|
Build successful! ✅ |
|
Build successful! ✅ |
|
Build successful! ✅ |
|
|
Build successful! ✅ |
|
closing. fix is already merged to release |



This pull request removes the
hiddenattribute from various output definitions across multiple files and updates thegroup_outputsattribute in some starter project configurations. These changes improve the visibility and grouping behavior of outputs in the system.Removal of
hiddenattribute:docs/docs/Integrations/Notion/Conversational_Notion_Agent.json: Removed thehiddenattribute from multiple output definitions to make them visible. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]docs/docs/Integrations/Notion/Meeting_Notes_Agent.json: Removed thehiddenattribute from several output definitions to ensure visibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]hiddenattribute from output definitions in various backend components to align with the updated visibility requirements:src/backend/base/langflow/base/agents/agent.pysrc/backend/base/langflow/base/tools/run_flow.pysrc/backend/base/langflow/base/vectorstores/vector_store_connection_decorator.pysrc/backend/base/langflow/components/datastax/astra_assistant_manager.pysrc/backend/base/langflow/components/helpers/memory.pysrc/backend/base/langflow/components/helpers/store_message.pysrc/backend/base/langflow/components/langchain_utilities/csv_agent.pyUpdates to
group_outputsattribute:group_outputsattribute totruefor certain outputs to enable better grouping behavior in the following files:src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json[1] [2]src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json[1] [2]src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json