Skip to content

Commit a99e6af

Browse files
authored
Merge branch 'main' into feature/audit-telemetry-gdpr-deletion
2 parents 4e5cdbc + 5cfda91 commit a99e6af

28 files changed

Lines changed: 814 additions & 90 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Flowise support different environment variables to configure your instance. You
157157
| Variable | Description | Type | Default |
158158
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------- |
159159
| PORT | The HTTP port Flowise runs on | Number | 3000 |
160+
| CORS_ALLOW_CREDENTIALS | Enables CORS `Access-Control-Allow-Credentials` when `true` | Boolean | false |
160161
| CORS_ORIGINS | The allowed origins for all cross-origin HTTP calls | String | |
161162
| IFRAME_ORIGINS | The allowed origins for iframe src embedding | String | |
162163
| FLOWISE_FILE_SIZE_LIMIT | Upload File Size Limit | String | 50mb |

docker/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ PORT=3000
7474
############################################################################################################
7575

7676
# NUMBER_OF_PROXIES= 1
77+
# CORS_ALLOW_CREDENTIALS=false
7778
# CORS_ORIGINS=*
7879
# IFRAME_ORIGINS=*
7980
# FLOWISE_FILE_SIZE_LIMIT=50mb

docker/worker/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ WORKER_PORT=5566
7474
############################################################################################################
7575

7676
# NUMBER_OF_PROXIES= 1
77+
# CORS_ALLOW_CREDENTIALS=false
7778
# CORS_ORIGINS=*
7879
# IFRAME_ORIGINS=*
7980
# FLOWISE_FILE_SIZE_LIMIT=50mb

packages/agentflow/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ module.exports = {
5454
'./src/features/canvas/components/ConnectionLine.tsx': { branches: 80, functions: 80, lines: 80, statements: 80 },
5555
// Only getMinimumNodeHeight() is tested; the component is Tier 3 UI with no business logic
5656
'./src/features/canvas/components/NodeOutputHandles.tsx': { branches: 0, functions: 10, lines: 30, statements: 30 },
57+
'./src/features/canvas/containers/NodeInfoDialog.tsx': { branches: 80, functions: 80, lines: 80, statements: 80 },
5758
'./src/features/canvas/hooks/': { branches: 80, functions: 80, lines: 80, statements: 80 },
5859
'./src/features/generator/GenerateFlowDialog.tsx': { branches: 80, functions: 80, lines: 80, statements: 80 },
5960
'./src/features/node-editor/': { branches: 80, functions: 80, lines: 80, statements: 80 },

packages/agentflow/src/core/types/node.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export interface NodeData {
2121
icon?: string
2222
selected?: boolean
2323
hideInput?: boolean
24+
// Metadata from component definition
25+
badge?: string
26+
tags?: string[]
27+
documentation?: string
2428
// Status properties
2529
status?: 'INPROGRESS' | 'FINISHED' | 'ERROR' | 'STOPPED' | 'TERMINATED'
2630
error?: string
@@ -86,6 +90,16 @@ export interface InputParam {
8690
codeExample?: string // Example code snippet shown via an "Example" button
8791
}
8892

93+
export interface NodeConfigEntry {
94+
node: string
95+
nodeId: string
96+
label: string
97+
name: string
98+
type: string
99+
enabled?: boolean
100+
schema?: Record<string, string> | Array<{ name: string; type: string }>
101+
}
102+
89103
export interface EdgeData {
90104
sourceColor?: string
91105
targetColor?: string

packages/agentflow/src/core/utils/flowExport.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function pickExportNodeData(data: NodeData): NodeData {
2121
color: data.color,
2222
hideInput: data.hideInput,
2323
baseClasses: data.baseClasses,
24+
tags: data.tags,
2425
category: data.category,
2526
description: data.description,
2627
inputs: data.inputs,

packages/agentflow/src/core/utils/nodeFactory.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,17 @@ describe('initNode', () => {
223223
badge: 'NEW',
224224
author: 'Flowise',
225225
documentation: 'https://docs.example.com',
226+
tags: ['LLM', 'OpenAI'],
226227
loadMethods: { listModels: () => Promise.resolve([]) }
227228
} as Partial<NodeData>)
228229
const result = initNode(nodeData, 'n1')
229230
expect(result).not.toHaveProperty('filePath')
230-
expect(result).not.toHaveProperty('badge')
231231
expect(result).not.toHaveProperty('author')
232-
expect(result).not.toHaveProperty('documentation')
233232
expect(result).not.toHaveProperty('loadMethods')
233+
// badge, tags, documentation are preserved for NodeInfoDialog display
234+
expect(result.badge).toBe('NEW')
235+
expect(result.tags).toEqual(['LLM', 'OpenAI'])
236+
expect(result.documentation).toBe('https://docs.example.com')
234237
})
235238

236239
it('should strip runtime-only state from node data', () => {

packages/agentflow/src/core/utils/nodeFactory.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ function createAgentFlowOutputs(nodeData: NodeData, newNodeId: string): Array<{
9090

9191
/**
9292
* Pick only the properties that belong to NodeData from a server API response.
93-
* Strips server-only metadata (filePath, badge, author, loadMethods, etc.)
93+
* Strips server-only metadata (filePath, author, loadMethods, etc.)
9494
* and runtime-only state (status, error, warning, hint, validationErrors)
9595
* that should not be persisted in flow data.
9696
*
97-
* Mirrors the allowlist used by generateExportFlowData in agentflow v2
98-
* (packages/ui/src/utils/genericHelper.js).
97+
* Preserves component metadata needed at runtime (badge, tags, documentation)
98+
* for display in the NodeInfoDialog.
9999
*/
100100
function pickNodeData(raw: NodeData): NodeData {
101101
return {
@@ -114,7 +114,10 @@ function pickNodeData(raw: NodeData): NodeData {
114114
outputAnchors: raw.outputAnchors,
115115
color: raw.color,
116116
icon: raw.icon,
117-
hideInput: raw.hideInput
117+
hideInput: raw.hideInput,
118+
badge: raw.badge,
119+
tags: raw.tags,
120+
documentation: raw.documentation
118121
}
119122
}
120123

packages/agentflow/src/features/canvas/components/NodeInfoDialog.tsx

Lines changed: 0 additions & 38 deletions
This file was deleted.

packages/agentflow/src/features/canvas/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ export type { AgentflowHeaderProps } from './AgentflowHeader'
22
export { AgentflowHeader, createHeaderProps } from './AgentflowHeader'
33
export { ConnectionLine } from './ConnectionLine'
44
export { NodeIcon } from './NodeIcon'
5-
export { NodeInfoDialog } from './NodeInfoDialog'
65
export { NodeInputHandle } from './NodeInputHandle'
76
export { NodeModelConfigs } from './NodeModelConfigs'
87
export { getMinimumNodeHeight, NodeOutputHandles } from './NodeOutputHandles'

0 commit comments

Comments
 (0)