Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
cce966a
First prototype of inspection panel
lucaseduoli Jan 9, 2026
5429a4b
fixed value not being set
lucaseduoli Jan 9, 2026
ebe8886
Hide inputs that are not handles from the node, show everything else …
lucaseduoli Jan 9, 2026
b6bb0d4
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 9, 2026
2369db5
Implemented close button on inspection panel
lucaseduoli Jan 13, 2026
deedd21
Re-show inputs on the node
lucaseduoli Jan 14, 2026
bc12b15
remove code from node toolbar
lucaseduoli Jan 14, 2026
63eca6c
change code design on inspection panel
lucaseduoli Jan 14, 2026
dc6c424
create feature flag
lucaseduoli Jan 14, 2026
7355fb4
disable code and controls on node based on feature flag
lucaseduoli Jan 14, 2026
830beb9
adjusted inspection panel size
lucaseduoli Jan 14, 2026
a50cee2
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 14, 2026
3673b68
disable inspection panel with feature flag
lucaseduoli Jan 14, 2026
e51e4ee
Show only connections on component
lucaseduoli Jan 15, 2026
f541e1c
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 15, 2026
d2fbfdf
Merge remote-tracking branch 'origin/main' into feat/inspection_panel
lucaseduoli Jan 16, 2026
61d1b6e
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 16, 2026
a4ab8ff
Add output and logs to inspect panel
lucaseduoli Jan 16, 2026
12407f9
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 16, 2026
1dd1bb6
removed label from code button
lucaseduoli Jan 16, 2026
f494cc4
filter handleinputs
lucaseduoli Jan 16, 2026
29ce8d5
Merge remote-tracking branch 'origin/main' into feat/inspection_panel
lucaseduoli Jan 19, 2026
d0c6831
added description on inspection panel header
lucaseduoli Jan 19, 2026
745760c
remove tabs from inspection panel and use inspect output on node again
lucaseduoli Jan 19, 2026
eca1e53
Make inspect panel have flexible height and disable its animation
lucaseduoli Jan 19, 2026
dca90a5
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 19, 2026
28cc19f
Removed division from node name and inputs
lucaseduoli Jan 20, 2026
725e3ee
Reduce some gaps
lucaseduoli Jan 20, 2026
8d3bf63
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 20, 2026
504f4b3
Add docs button
lucaseduoli Jan 20, 2026
d005c4e
show docs just when exists
lucaseduoli Jan 20, 2026
1331af6
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 20, 2026
bee5509
added custom 4.5 height and width
lucaseduoli Jan 20, 2026
8c81ffe
Changed node text sizes and icon size
lucaseduoli Jan 20, 2026
e5ebd57
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 20, 2026
27fa9ad
Added freeze always to the node toolbar
lucaseduoli Jan 20, 2026
8b30f2a
Updated input size on inspect panel and output size on node
lucaseduoli Jan 20, 2026
ae227b5
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 20, 2026
e0c1f69
Implemented name and description editing
lucaseduoli Jan 28, 2026
5b1d13a
Changed paddings to match design
lucaseduoli Jan 28, 2026
1a27d8b
Added advanced fields and trigger
lucaseduoli Jan 28, 2026
9b9f6d7
fixed advanced and pencil design
lucaseduoli Jan 28, 2026
f6dc533
Implemented new prompt component with inline editing
lucaseduoli Jan 28, 2026
5030b8c
Merge remote-tracking branch 'origin/main' into feat/inspection_panel
lucaseduoli Jan 28, 2026
7ee16b4
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 28, 2026
004259d
Remove console logs
lucaseduoli Jan 29, 2026
c80f9f7
Dont fetch data on inspection panel
lucaseduoli Jan 29, 2026
e0dd8e9
Made inputs appear to perform calculations but not show up on nodes
lucaseduoli Jan 29, 2026
9fa1457
Removed LanguageModel from input types of model input in basic prompting
lucaseduoli Jan 29, 2026
cc58b05
Changed inputs to not render when showParameter is false, in order to…
lucaseduoli Jan 29, 2026
7eb1204
Change tests to select node to change model, and then unselect all
lucaseduoli Jan 29, 2026
2ff9c28
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 29, 2026
6931607
Merge branch 'main' into feat/inspection_panel
Cristhianzl Feb 2, 2026
4935cf7
Merge remote-tracking branch 'origin/main' into feat/inspection_panel
lucaseduoli Feb 2, 2026
dc99e57
Merge remote-tracking branch 'origin/main' into feat/inspection_panel
lucaseduoli Feb 2, 2026
42b900c
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 2, 2026
7cd9b72
deleted unused file
lucaseduoli Feb 2, 2026
25462a2
extract filtering logic
lucaseduoli Feb 2, 2026
003c8d7
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 2, 2026
853397e
removed Made with Bob comments
lucaseduoli Feb 2, 2026
dd688be
Fix error catching
lucaseduoli Feb 2, 2026
3b0c6d5
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 2, 2026
acf2190
Fixed dropdown not avoiding collisions
lucaseduoli Feb 2, 2026
a9b5f2e
Remove dead zone below the inspection panel
lucaseduoli Feb 2, 2026
17e14ed
Fixed prompt validation being done even if input didnt change
lucaseduoli Feb 2, 2026
fe3d7ee
Fixed handle fields appearing
lucaseduoli Feb 2, 2026
033dab6
Fixed handle not showing up on minimized components
lucaseduoli Feb 2, 2026
e5c4918
Fixed condition for minimizing component
lucaseduoli Feb 2, 2026
46926f3
fixed minimized nodes behavior to minimize when only one input is con…
lucaseduoli Feb 2, 2026
5d5b0a9
Merge branch 'main' into feat/inspection_panel
lucaseduoli Feb 3, 2026
f2213f6
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
5a11d5b
fixed component not showing up as hidden
lucaseduoli Feb 3, 2026
b10742e
changed data test id of advanced modal and advanced trigger, to fix t…
lucaseduoli Feb 3, 2026
76f5f51
Fixed custom component not having pink code button
lucaseduoli Feb 3, 2026
faa62a1
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
0673a22
fixed node exhibition when feature flag is disabled, fixed minimized …
lucaseduoli Feb 3, 2026
16ae4d1
added show and hide advanced button on inspection panel
lucaseduoli Feb 3, 2026
367b001
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
c09828e
Fixed fit view to contain padding when a component is clicked
lucaseduoli Feb 3, 2026
bd004b8
fixed freeze path test
lucaseduoli Feb 3, 2026
d91435a
change label
lucaseduoli Feb 3, 2026
d431b81
changed gpt model test
lucaseduoli Feb 3, 2026
679666e
added separator between description and fields
lucaseduoli Feb 3, 2026
e5c3215
Changed advanced padding
lucaseduoli Feb 3, 2026
df7a616
fixed gpt setup and image sentiment analysis
lucaseduoli Feb 3, 2026
2eda317
fixed mcp server test
lucaseduoli Feb 3, 2026
38181c0
fixed freeze spec
lucaseduoli Feb 3, 2026
a8f8cc3
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
6af30eb
fixed logs setup
lucaseduoli Feb 3, 2026
5de486e
Fixed stop building test
lucaseduoli Feb 3, 2026
c446323
Fixed minimization text
lucaseduoli Feb 3, 2026
fdd4345
changed variable name
lucaseduoli Feb 3, 2026
4fb186f
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
9e905aa
Filter tool mode
lucaseduoli Feb 3, 2026
9b32822
fixed prompt component unfocusing every time
lucaseduoli Feb 3, 2026
85b4715
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
5f27e35
fixed blog writer
lucaseduoli Feb 3, 2026
ac05916
added select anthropic model, fixed custom component generator that d…
lucaseduoli Feb 3, 2026
a232854
fixed inspection panel advanced
lucaseduoli Feb 3, 2026
e8ac894
fixed tests that used advanced fields
lucaseduoli Feb 3, 2026
4cee0bc
fixed gpt model timeout
lucaseduoli Feb 3, 2026
ac3a479
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
a8db935
fixed toolbar button collision
lucaseduoli Feb 3, 2026
9c5c16e
always show language model input
lucaseduoli Feb 3, 2026
7e47e6a
fixed tests
lucaseduoli Feb 3, 2026
2e4e78b
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
2d0295a
disabled advanced shortcut when inspection panel is enabled
lucaseduoli Feb 3, 2026
75fabc0
fixed tests
lucaseduoli Feb 3, 2026
093da5d
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
e6825d1
fixed flicker
lucaseduoli Feb 3, 2026
e05d63d
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
efa86ac
fix tests
lucaseduoli Feb 3, 2026
7df3f80
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
c187f35
push to trigger tests
lucaseduoli Feb 3, 2026
6bed58e
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
2ab8326
Update select-gpt-model and select-anthropic-model utilities
Feb 4, 2026
780ec33
feat: improve Inspection Panel UX
Feb 4, 2026
ba49307
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 4, 2026
cac19ad
Enable node toolbar items when inspect panel is disabled, save user p…
lucaseduoli Feb 4, 2026
1eddc36
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 4, 2026
4b3ff13
Show handle inputs on advanced
lucaseduoli Feb 4, 2026
13fa51c
Adjusted description and name
lucaseduoli Feb 4, 2026
5d04d36
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 4, 2026
b8e1a29
disable select nodes on drag
lucaseduoli Feb 4, 2026
7e1807f
Try to fix tests that have controls open
lucaseduoli Feb 4, 2026
3bb44c4
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 4, 2026
324eeeb
fix run flow test and select gpt model
lucaseduoli Feb 4, 2026
adc987a
Revert "Fixed dropdown not avoiding collisions"
lucaseduoli Feb 4, 2026
a0207c5
fixed collisions on inspection panel
lucaseduoli Feb 4, 2026
7dbd0a6
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 4, 2026
f05be04
fixed select gpt model and parameter render input
lucaseduoli Feb 4, 2026
58772a8
updated similarity test
lucaseduoli Feb 4, 2026
a50dd4e
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 4, 2026
1d6119e
changed playwright config
lucaseduoli Feb 4, 2026
7668741
fix test text sentiment and and elect-gpt-model
Feb 4, 2026
247da1b
fixed jest tests
lucaseduoli Feb 4, 2026
eb0d19f
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 4, 2026
3991d9e
Fixed tests related to the advanced modal
lucaseduoli Feb 4, 2026
66af60f
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 4, 2026
7802a65
fix textAreaModalComponent test
Feb 4, 2026
e4a8842
fix freeze test
Feb 5, 2026
4ddd510
fix edit-name-description-node-spec
Feb 5, 2026
dc5b072
fix edit-name-description-node-spec plus adding timeout
Feb 5, 2026
f196e53
fix lanflowShortcut test
Feb 5, 2026
af3f23c
fix edit-name-description-node test
Feb 5, 2026
1fd3d97
fix userSettings test
Feb 5, 2026
349319f
fixed tests
lucaseduoli Feb 5, 2026
a4a3eb3
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 5, 2026
011d4e5
fixed jest tests
lucaseduoli Feb 5, 2026
f08726f
fixed test
lucaseduoli Feb 5, 2026
d63e727
Added unit tests for inspection panel
lucaseduoli Feb 5, 2026
3973118
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 5, 2026
547b497
re-added code and fixed tests
lucaseduoli Feb 5, 2026
ea68fb3
fixed header design
lucaseduoli Feb 5, 2026
caf5e02
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 5, 2026
98e624a
Fixed shortcuts, fixed advanced mode
lucaseduoli Feb 6, 2026
ba078c3
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 6, 2026
c33ca06
fixed tests
lucaseduoli Feb 6, 2026
160cbe7
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 6, 2026
2ba7677
fixed unit tests
lucaseduoli Feb 6, 2026
f167242
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 6, 2026
d817d8f
Merge remote-tracking branch 'origin/main' into feat/inspection_panel
lucaseduoli Feb 6, 2026
4493e8f
fixed tests and sortable list component
lucaseduoli Feb 6, 2026
3ec91fc
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ export default function NodeInputField({
/>
</div>

{data.node?.template[name] !== undefined && (
{/* Hide the input component when field has a handle - inputs are edited in Inspection Panel */}
{!optionalHandle && data.node?.template[name] !== undefined && (
<CustomParameterComponent
handleOnNewValue={handleOnNewValue}
name={name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,23 @@ const RenderInputParameters = ({
const shownTemplateFields = useMemo(() => {
return templateFields.filter((templateField) => {
const template = data.node?.template[templateField];
return (
template?.show &&
!template?.advanced &&
!(template?.tool_mode && isToolMode)
);

// Basic visibility check
if (
!template?.show ||
template?.advanced ||
(template?.tool_mode && isToolMode)
) {
return false;
}

// Only show fields that have handles (input_types)
const hasHandle = template.input_types && template.input_types.length > 0;
if (!hasHandle) {
return false;
}

return true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's search for templates/definitions that have both refresh_button and input_types
rg -n "refresh_button|input_types" src/frontend/src --type tsx --type ts --type json -A 2 -B 2 | head -100

Repository: langflow-ai/langflow

Length of output: 91


🏁 Script executed:

# Also search more broadly for template definitions and the NodeInputField component
fd -t f "NodeInputField|template" src/frontend/src --type tsx --type ts | head -20

Repository: langflow-ai/langflow

Length of output: 234


🏁 Script executed:

# Look at the actual RenderInputParameters file to see the full context
wc -l src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx

Repository: langflow-ai/langflow

Length of output: 151


🏁 Script executed:

# Get the full file to understand the context better
cat -n src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx | head -80

Repository: langflow-ai/langflow

Length of output: 2926


🏁 Script executed:

# Search for NodeInputField usage and displayHandle logic
rg -n "displayHandle|NodeInputField" src/frontend/src -A 3 -B 1 --type tsx --type ts | head -80

Repository: langflow-ai/langflow

Length of output: 91


🏁 Script executed:

# Read the rest of the file to see how shownTemplateFields is used
cat -n src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx | tail -70

Repository: langflow-ai/langflow

Length of output: 2549


🏁 Script executed:

# Find NodeInputField component
fd -name "NodeInputField*" src/frontend/src

Repository: langflow-ai/langflow

Length of output: 294


🏁 Script executed:

# Search for refresh_button and input_types (without file type filter)
rg -n "refresh_button" src/frontend/src -A 2 -B 2 | head -80

Repository: langflow-ai/langflow

Length of output: 2664


🏁 Script executed:

# Find and read NodeInputField component
find src/frontend/src -name "NodeInputField*" -type f

Repository: langflow-ai/langflow

Length of output: 46


🏁 Script executed:

# Read the NodeInputField component
cat -n src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx | head -150

Repository: langflow-ai/langflow

Length of output: 5769


🏁 Script executed:

# Search for template definitions or examples with both refresh_button and input_types
rg -n "input_types" src/frontend/src -B 3 -A 3 | grep -E "(input_types|refresh_button)" | head -50

Repository: langflow-ai/langflow

Length of output: 6099


🏁 Script executed:

# Read the rest of NodeInputField to see the full rendering logic
cat -n src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx | sed -n '140,200p'

Repository: langflow-ai/langflow

Length of output: 2347


🏁 Script executed:

# Check if there are any template definitions/examples that show both refresh_button and input_types together
rg -l "refresh_button" src/frontend/src | head -10

Repository: langflow-ai/langflow

Length of output: 404


🏁 Script executed:

# Search for any test data or mock templates with both properties
rg "refresh_button.*input_types|input_types.*refresh_button" src/frontend/src -B 5 -A 5

Repository: langflow-ai/langflow

Length of output: 46


🏁 Script executed:

# Read more of NodeInputField to see what renders the actual editor/input
cat -n src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx | sed -n '200,280p'

Repository: langflow-ai/langflow

Length of output: 2371


🏁 Script executed:

# Look for parameterRenderComponent usage within NodeInputField
rg -n "parameterRenderComponent\|ParameterRender" src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx -A 3 -B 3

Repository: langflow-ai/langflow

Length of output: 46


🏁 Script executed:

# Check what LANGFLOW_SUPPORTED_TYPES contains
rg -n "LANGFLOW_SUPPORTED_TYPES" src/frontend/src/constants/constants.ts -A 10

Repository: langflow-ai/langflow

Length of output: 268


🏁 Script executed:

# Check types to understand input_types structure better
cat -n src/frontend/src/types/api/index.ts | sed -n '35,95p'

Repository: langflow-ai/langflow

Length of output: 1859


🏁 Script executed:

# Look for any model-type fields with refresh_button to understand the edge case
rg -n "refresh_button" src/frontend/src -B 5 -A 5 | grep -E "(type.*model|refresh_button|input_types)" | head -30

Repository: langflow-ai/langflow

Length of output: 788


Address the "blank row" risk where fields have input_types + refresh_button but no visible editor or handle.

The filter passes any field with input_types, but NodeInputField hides its editor when optionalHandle is present (line 230). If such a field also has refresh_button: true and is not a model type, the condition (!hasRefreshButton || isModelInput) becomes false, hiding the handle as well. This leaves an empty row with neither editor nor connection point.

Verify that no field template combines refresh_button: true, non-empty input_types, and type ≠ "model", or if such fields exist, confirm this blank-row rendering is intentional.

Additionally, harden the input_types check to use Array.isArray() for defensive programming, matching the pattern already used elsewhere in NodeInputField (line 109):

Proposed change
-      const hasHandle = template.input_types && template.input_types.length > 0;
+      const hasHandle =
+        Array.isArray(template.input_types) && template.input_types.length > 0;
       if (!hasHandle) {
         return false;
       }
📝 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
// Basic visibility check
if (
!template?.show ||
template?.advanced ||
(template?.tool_mode && isToolMode)
) {
return false;
}
// Only show fields that have handles (input_types)
const hasHandle = template.input_types && template.input_types.length > 0;
if (!hasHandle) {
return false;
}
return true;
// Basic visibility check
if (
!template?.show ||
template?.advanced ||
(template?.tool_mode && isToolMode)
) {
return false;
}
// Only show fields that have handles (input_types)
const hasHandle =
Array.isArray(template.input_types) && template.input_types.length > 0;
if (!hasHandle) {
return false;
}
return true;
🤖 Prompt for AI Agents
In
@src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx
around lines 35 - 50, The current visibility filter returns true for any
template with input_types, but that can produce a blank row when NodeInputField
hides its editor due to optionalHandle and also hides the handle when
refresh_button is true on non-model inputs; update the check in the renderer
(the hasHandle logic around template.input_types) to first use
Array.isArray(template.input_types) && template.input_types.length > 0 and then
exclude templates where template.refresh_button === true && template.type !==
"model" (or otherwise ensure such templates render a visible editor/handle);
locate the template checks in this function and adjust the boolean logic so
fields that would end up with neither editor nor handle are filtered out (or
alternatively, ensure NodeInputField/optionalHandle logic is changed to prevent
blank rows consistently).

});
}, [templateFields, data.node?.template, isToolMode]);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
import { useMemo } from "react";
import { AssistantButton } from "@/components/common/assistant";
import IconComponent from "@/components/common/genericIconComponent";
import ShadTooltip from "@/components/common/shadTooltipComponent";
import {
CustomParameterComponent,
CustomParameterLabel,
getCustomParameterTitle,
} from "@/customization/components/custom-parameter";
import { LANGFLOW_AGENTIC_EXPERIENCE } from "@/customization/feature-flags";
import { useIsAutoLogin } from "@/hooks/use-is-auto-login";
import useAuthStore from "@/stores/authStore";
import useFlowStore from "@/stores/flowStore";
import { useTypesStore } from "@/stores/typesStore";
import type { NodeInputFieldComponentType } from "@/types/components";
import { cn } from "@/utils/utils";
import {
DEFAULT_TOOLSET_PLACEHOLDER,
FLEX_VIEW_TYPES,
ICON_STROKE_WIDTH,
} from "@/constants/constants";
import useHandleNodeClass from "@/CustomNodes/hooks/use-handle-node-class";
import { usePostTemplateValue } from "@/controllers/API/queries/nodes/use-post-template-value";
import useFetchDataOnMount from "@/CustomNodes/hooks/use-fetch-data-on-mount";
import useHandleOnNewValue from "@/CustomNodes/hooks/use-handle-new-value";
import NodeInputInfo from "@/CustomNodes/GenericNode/components/NodeInputInfo";

export default function InspectionPanelField({
id,
data,
title,
name = "",
required = false,
info = "",
showNode,
isToolMode = false,
proxy,
}: Omit<
NodeInputFieldComponentType,
| "colors"
| "tooltipTitle"
| "type"
| "optionalHandle"
| "colorName"
| "lastInput"
>) {
const isAuthenticated = useAuthStore((state) => state.isAuthenticated);
const isAutoLogin = useIsAutoLogin();
const shouldDisplayApiKey = isAuthenticated && !isAutoLogin;

const { currentFlowId, currentFlowName } = useFlowStore((state) => ({
currentFlowId: state.currentFlow?.id,
currentFlowName: state.currentFlow?.name,
}));

const myData = useTypesStore((state) => state.data);
const postTemplateValue = usePostTemplateValue({
node: data.node!,
nodeId: data.id,
parameterId: name,
});

const { handleNodeClass } = useHandleNodeClass(data.id);

const { handleOnNewValue } = useHandleOnNewValue({
node: data.node!,
nodeId: data.id,
name,
});

const nodeInformationMetadata = useMemo(() => {
return {
flowId: currentFlowId ?? "",
nodeType: data?.type?.toLowerCase() ?? "",
flowName: currentFlowName ?? "",
isAuth: shouldDisplayApiKey!,
variableName: name,
};
}, [data?.node?.id, shouldDisplayApiKey, name]);

Comment on lines +67 to +76
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix useMemo deps to avoid stale nodeInformationMetadata.

nodeInformationMetadata uses currentFlowId, currentFlowName, and data.type, but they’re not in the dependency list, so metadata can silently go stale.

Proposed fix
   const nodeInformationMetadata = useMemo(() => {
     return {
       flowId: currentFlowId ?? "",
       nodeType: data?.type?.toLowerCase() ?? "",
       flowName: currentFlowName ?? "",
       isAuth: shouldDisplayApiKey!,
       variableName: name,
     };
-  }, [data?.node?.id, shouldDisplayApiKey, name]);
+  }, [currentFlowId, currentFlowName, data?.type, shouldDisplayApiKey, name]);
🤖 Prompt for AI Agents
In
@src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelField.tsx
around lines 71 - 80, The useMemo for nodeInformationMetadata is missing
dependencies and can produce stale values; update the dependency array of the
useMemo that defines nodeInformationMetadata to include currentFlowId,
currentFlowName, and data?.type in addition to the existing shouldDisplayApiKey
and name (and optionally keep data?.node?.id if you still need it) so the memo
recalculates when currentFlowId, currentFlowName, or data.type change.

useFetchDataOnMount(
data.node!,
data.id,
handleNodeClass,
name,
postTemplateValue,
);

const template = data.node?.template[name];
const type = template?.type;
const isFlexView = FLEX_VIEW_TYPES.includes(type ?? "");

return (
<div
className={cn(
"relative flex min-h-10 w-full flex-wrap items-center justify-between px-3 py-1.5",
isToolMode && "bg-primary/10",
(name === "code" && type === "code") || (name.includes("code") && proxy)
? "hidden"
: "",
)}
Comment on lines +87 to +94
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's read the file to understand the full context
cat -n "src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelField.tsx" | head -120 | tail -40

Repository: langflow-ai/langflow

Length of output: 1500


🏁 Script executed:

# Get more context around lines 94-101
wc -l "src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelField.tsx"

Repository: langflow-ai/langflow

Length of output: 162


🏁 Script executed:

# Read the entire file to understand the component structure
cat -n "src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelField.tsx"

Repository: langflow-ai/langflow

Length of output: 7409


🏁 Script executed:

# Search for where this component is used and what name values are passed
rg "InspectionPanelField" --type tsx -A 3 -B 1 | head -100

Repository: langflow-ai/langflow

Length of output: 91


🏁 Script executed:

# Look for field names that might contain "code"
rg "name.*code|code.*name" --type tsx -i | head -50

Repository: langflow-ai/langflow

Length of output: 91


🏁 Script executed:

# Search for InspectionPanelField usage with name parameters
rg "InspectionPanelField" -A 5 -B 2 | head -150

Repository: langflow-ai/langflow

Length of output: 5862


🏁 Script executed:

# Search for field definitions that might contain "code" in their names
rg "name.*=.*code|code.*name" --type ts --type tsx -i -A 2 -B 2 | head -100

Repository: langflow-ai/langflow

Length of output: 91


🏁 Script executed:

# Look for template fields that might be passed as name prop
rg "template\[.*code" --type ts --type tsx -A 2 -B 2 | head -50

Repository: langflow-ai/langflow

Length of output: 91


🏁 Script executed:

# Search for what proxy fields might be and their naming patterns
rg "proxy" --type tsx -B 3 -A 3 "InspectionPanel" | head -80

Repository: langflow-ai/langflow

Length of output: 91


🏁 Script executed:

# Find all usages of name.includes pattern in codebase
rg 'name\.includes.*code' --type ts --type tsx

Repository: langflow-ai/langflow

Length of output: 91


🏁 Script executed:

# Look for InspectionPanelFields.tsx to see how fields are iterated
cat -n "src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelFields.tsx"

Repository: langflow-ai/langflow

Length of output: 2970


🏁 Script executed:

# Search for name.includes pattern anywhere in the codebase
rg 'name\.includes' -A 2 -B 2 | head -80

Repository: langflow-ai/langflow

Length of output: 5103


🏁 Script executed:

# Look for proxy-related field names in templates
rg '"code"' src/frontend --max-count 50 | grep -i name

Repository: langflow-ai/langflow

Length of output: 4997


🏁 Script executed:

# Search for field definitions/templates that contain "code" in various files
rg '"[^"]*code[^"]*":\s*{' -A 3 src/frontend --max-count 30

Repository: langflow-ai/langflow

Length of output: 169


🏁 Script executed:

# Look for proxy field definitions with "code" in their names
rg 'proxy.*true' src/backend -A 2 -B 2 | grep -i code | head -50

Repository: langflow-ai/langflow

Length of output: 50376


🏁 Script executed:

# Check NodeInputField to see if it has similar logic
cat -n "src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx" | grep -A 10 -B 10 'name.includes.*code'

Repository: langflow-ai/langflow

Length of output: 772


🏁 Script executed:

# Search for proxy field definitions with any field names
rg '"proxy".*"field"' -A 2 -B 2 | head -80

Repository: langflow-ai/langflow

Length of output: 50377


🏁 Script executed:

# Look for any fields that might be code-related with proxy
rg 'includes.*code|encode|decode' src/frontend --type ts -A 3 -B 3 | head -100

Repository: langflow-ai/langflow

Length of output: 6939


🏁 Script executed:

# Check the actual backend to understand what fields exist
find src/backend -name "*.py" -type f | head -20 | xargs rg 'proxy.*=.*True' -A 2 -B 2 | head -80

Repository: langflow-ai/langflow

Length of output: 46


🏁 Script executed:

# Search for actual proxy field patterns and names more carefully
rg '"field"\s*:\s*"[^"]*code' src/backend src/frontend -A 1 -B 1 | head -50

Repository: langflow-ai/langflow

Length of output: 1330


🏁 Script executed:

# Check if there are any Python definitions of fields with "code" in name and proxy=True
find src/backend -name "*.py" -type f -exec grep -l "proxy.*True" {} \; | head -5 | xargs grep -B 5 -A 5 'name.*=.*' | grep -i code

Repository: langflow-ai/langflow

Length of output: 46


🏁 Script executed:

# Let's verify the filtering is indeed redundant by checking if any fields pass both filters
python3 << 'EOF'
# Simulate the logic from InspectionPanelFields
test_fields = [
    ("code", {"show": True, "type": "code"}),
    ("model_kwargs", {"show": True, "type": "code", "proxy": {"id": "x", "field": "y"}}),
    ("my_code_field", {"show": True, "type": "str", "proxy": {"id": "x", "field": "z"}}),
    ("code_handler", {"show": True, "type": "str", "proxy": {"id": "x", "field": "w"}}),
    ("llm", {"show": True, "type": "BaseLanguageModel", "proxy": {"id": "x", "field": "llm"}}),
]

print("Fields that would be filtered (redundantly hidden in InspectionPanelField):")
for field_name, template in test_fields:
    if (field_name == "code" and template.get("type") == "code") or (field_name.includes("code") and template.get("proxy")):
        print(f"  - {field_name}: includes('code')={field_name.includes('code')}, proxy={bool(template.get('proxy'))}")
EOF

Repository: langflow-ai/langflow

Length of output: 150


🏁 Script executed:

# Better approach - check actual field data from real flows
rg -A 15 '"template"\s*:' src/backend/tests/data/grouped_chat.json 2>/dev/null | grep -E '"name"|"type"|"proxy"' | head -40

Repository: langflow-ai/langflow

Length of output: 20337


🏁 Script executed:

# Check if fields filtered in InspectionPanelFields ever reach InspectionPanelField
cat -n "src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelFields.tsx" | head -50

Repository: langflow-ai/langflow

Length of output: 1946


Tighten the field name matching to avoid unintentionally hiding unrelated fields.

The condition name.includes("code") is overly broad and can hide valid fields with names like "encode", "decode", or any field containing "code" as a substring. Since proxy fields with "field": "code" do exist in the codebase, a more precise predicate is warranted.

Suggested fix
-        (name === "code" && type === "code") || (name.includes("code") && proxy)
+        (name === "code" && type === "code") ||
+        (proxy && /(^|_)code($|_)/.test(name))
           ? "hidden"
           : "",
🤖 Prompt for AI Agents
In
@src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelField.tsx
around lines 94 - 101, The name matching is too broad: replace the substring
check `name.includes("code")` with a precise check so unrelated fields like
"encode" aren't hidden; update the condition in InspectionPanelField.tsx so the
hidden branch only triggers for an explicit code field (e.g., keep `(name ===
"code" && type === "code")` and change the proxy case to check the proxy's
declared field like `proxy?.field === "code"` or `proxy && proxy.field ===
"code"`) so only actual proxy fields that target "code" hide the element.

>
<div
className={cn(
"flex w-full flex-col gap-2",
isFlexView ? "flex-row" : "flex-col",
)}
>
<div className="flex w-full items-center justify-between text-sm">
<div className="flex w-full items-center truncate">
{proxy ? (
<ShadTooltip content={<span>{proxy.id}</span>}>
<span>
{getCustomParameterTitle({
title,
nodeId: data.id,
isFlexView,
required,
})}
</span>
</ShadTooltip>
) : (
<div className="flex gap-2">
<span className="text-sm font-medium">
{getCustomParameterTitle({
title,
nodeId: data.id,
isFlexView,
required,
})}
</span>
</div>
)}
<div>
{info !== "" && (
<ShadTooltip content={<NodeInputInfo info={info} />}>
<div className="cursor-help">
<IconComponent
name="Info"
strokeWidth={ICON_STROKE_WIDTH}
className="relative ml-1 h-3 w-3 text-placeholder"
/>
</div>
</ShadTooltip>
)}
</div>
{LANGFLOW_AGENTIC_EXPERIENCE &&
data.node?.template[name]?.ai_enabled && (
<AssistantButton
compData={id}
handleOnNewValue={handleOnNewValue}
inputValue={data.node?.template[name]?.value}
type="field"
/>
)}
</div>
<CustomParameterLabel
name={name}
nodeId={data.id}
templateValue={data.node?.template[name]}
nodeClass={data.node!}
/>
</div>

{data.node?.template[name] !== undefined && (
<CustomParameterComponent
handleOnNewValue={handleOnNewValue}
name={name}
nodeId={data.id}
inputId={id}
templateData={data.node?.template[name]!}
templateValue={data.node?.template[name].value ?? ""}
editNode={false}
handleNodeClass={handleNodeClass}
nodeClass={data.node!}
placeholder={
isToolMode
? DEFAULT_TOOLSET_PLACEHOLDER
: data.node?.template[name].placeholder
}
isToolMode={isToolMode}
nodeInformationMetadata={nodeInformationMetadata}
proxy={proxy}
/>
)}
</div>
</div>
);
}

// Made with Bob
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { useMemo } from "react";
import { sortToolModeFields } from "@/CustomNodes/helpers/sort-tool-mode-field";
import getFieldTitle from "@/CustomNodes/utils/get-field-title";
import type { NodeDataType } from "@/types/flow";
import { LANGFLOW_SUPPORTED_TYPES } from "@/constants/constants";
import InspectionPanelField from "./InspectionPanelField";

interface InspectionPanelFieldsProps {
data: NodeDataType;
}

export default function InspectionPanelFields({
data,
}: InspectionPanelFieldsProps) {
// Get all fields in one list - show ALL fields in Inspection Panel
const allFields = useMemo(() => {
return Object.keys(data.node?.template || {})
.filter((templateField) => {
const template = data.node?.template[templateField];

// Filter out fields that shouldn't be shown
if (
templateField.charAt(0) === "_" ||
!template?.show ||
(templateField === "code" && template.type === "code") ||
(templateField.includes("code") && template.proxy)
) {
return false;
}

return true;
})
.sort((a, b) =>
sortToolModeFields(
a,
b,
data.node!.template,
data.node?.field_order ?? [],
false,
),
);
}, [data.node?.template, data.node?.field_order]);

if (allFields.length === 0) {
return (
<div className="flex items-center justify-center p-8 text-sm text-muted-foreground">
No fields available
</div>
);
}

return (
<div className="space-y-2 p-3">
{allFields.map((templateField: string) => {
const template = data.node?.template[templateField];

return (
<InspectionPanelField
key={`${data.id}-${templateField}`}
data={data}
title={getFieldTitle(data.node?.template!, templateField)}
info={template.info!}
name={templateField}
required={template.required}
id={{
inputTypes: template.input_types,
type: template.type,
id: data.id,
fieldName: templateField,
}}
proxy={template.proxy}
showNode={true}
isToolMode={false}
/>
);
})}
</div>
Comment on lines +141 to +146
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add a defensive guard for missing template entries to avoid runtime crashes.

If data.node.template is mutated/updated between allFields computation and render (or if template keys are sparse), template can be undefined and template.* will throw.

Proposed fix
   return (
     <div className="space-y-2 p-3">
       {allFields.map((templateField: string) => {
-        const template = data.node?.template[templateField];
+        const template = data.node?.template?.[templateField];
+        if (!template) return null;

         return (
           <InspectionPanelField
             key={`${data.id}-${templateField}`}
             data={data}
             title={getFieldTitle(data.node?.template!, templateField)}
-            info={template.info!}
+            info={template.info ?? ""}
             name={templateField}
-            required={template.required}
+            required={!!template.required}
             id={{
               inputTypes: template.input_types,
               type: template.type,
               id: data.id,
               fieldName: templateField,
             }}
             proxy={template.proxy}
             showNode={true}
             isToolMode={false}
           />
         );
       })}
     </div>
   );
📝 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
return (
<div className="space-y-2 p-3">
{allFields.map((templateField: string) => {
const template = data.node?.template[templateField];
return (
<InspectionPanelField
key={`${data.id}-${templateField}`}
data={data}
title={getFieldTitle(data.node?.template!, templateField)}
info={template.info!}
name={templateField}
required={template.required}
id={{
inputTypes: template.input_types,
type: template.type,
id: data.id,
fieldName: templateField,
}}
proxy={template.proxy}
showNode={true}
isToolMode={false}
/>
);
})}
</div>
return (
<div className="space-y-2 p-3">
{allFields.map((templateField: string) => {
const template = data.node?.template?.[templateField];
if (!template) return null;
return (
<InspectionPanelField
key={`${data.id}-${templateField}`}
data={data}
title={getFieldTitle(data.node?.template!, templateField)}
info={template.info ?? ""}
name={templateField}
required={!!template.required}
id={{
inputTypes: template.input_types,
type: template.type,
id: data.id,
fieldName: templateField,
}}
proxy={template.proxy}
showNode={true}
isToolMode={false}
/>
);
})}
</div>
);
🤖 Prompt for AI Agents
In
@src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelFields.tsx
around lines 52 - 77, The render loop over allFields can crash if
data.node?.template[templateField] is undefined; modify the map in
InspectionPanelFields to guard against missing template entries by checking that
const template = data.node?.template?.[templateField] exists before returning an
<InspectionPanelField/>; if template is undefined, either skip rendering that
iteration (return null) or render a safe fallback with defaults, and ensure
getFieldTitle is only called when template is present; reference the map over
allFields, the template variable, getFieldTitle, and the InspectionPanelField
component when making the change.

);
}

// Made with Bob
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove the stray “Made with Bob” comment before merging.

🤖 Prompt for AI Agents
In
@src/frontend/src/pages/FlowPage/components/InspectionPanel/components/InspectionPanelFields.tsx
at line 81, Remove the stray comment line containing "Made with Bob" from the
InspectionPanelFields.tsx file: locate the comment in the InspectionPanelFields
component (or nearby top-level file header) and delete that line so no stray
comment remains; then run the project's lint/format step to ensure no trailing
whitespace or formatting issues.

Loading
Loading