fix(agentflow): fix variable resolution, credential sync, and add E2E example#6245
Open
jocelynlin-wd wants to merge 3 commits intomainfrom
Open
fix(agentflow): fix variable resolution, credential sync, and add E2E example#6245jocelynlin-wd wants to merge 3 commits intomainfrom
jocelynlin-wd wants to merge 3 commits intomainfrom
Conversation
… example
- Fix variable picker emitting {{nodeId.data.instance}} instead of {{nodeId}}
- Fix customMention serializer using display label instead of node ID
- Fix Start node missing outputData.content for chatInput type
- Sync credential selection to nodeData.credential for server-side execution
- Add E2E example with save/delete/test-run FABs via canvasActions
- Simplify BasicExample to minimal canvas-only usage
- Fix act() warnings in TooltipWithParser and useAsyncOptions tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive E2E example for Agentflow, including new components for saving flows to a database, performing test runs, and managing flow metadata. It also refactors variable mention rendering to use IDs instead of labels and updates the node factory to handle credential IDs. Key feedback includes addressing a potential XSS vulnerability when rendering markdown, avoiding the overloading of the credential property to prevent UI hydration issues, and improving error handling for network requests in the E2E demo.
…2E example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nt field
- VariableInput: show {{nodeId}} in mention chip instead of display label,
consistent with the value serialized to flow data
- useAvailableVariables: exclude startAgentflow from upstream node outputs;
users reference the question via {{question}} (global variable), matching
agentflow v2 behavior — no Start node change or server change needed
- Start.ts: revert outputData.content = input; Start node is no longer
exposed as a node output variable in the picker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FLOWISE-558
Summary
Fix variable resolution for HTTP and other nodes: Three-layer bug caused upstream node variables to render as literal text in agent prompts:
useAvailableVariables.ts: variable picker emitted{{nodeId.data.instance}}instead of{{nodeId}}customMention.ts: mention serializer used the display label (e.g.HTTP 0) instead of the node ID (e.g.httpAgentflow_0)useAvailableVariables.ts: exclude Start node from upstream node outputs — users reference the question via global{{question}}, consistent with agentflow v2 (no Start.ts or server change needed)Fix variable chip display consistency: Mention chips in the editor now show
{{nodeId}}(e.g.{{httpAgentflow_0}}) instead of the display label (e.g.{{HTTP 0}}), matching the value serialized to flow data.Fix credential sync for HTTP nodes: When a user selected a credential in the node editor, it was stored only in
inputs.FLOWISE_CREDENTIAL_IDbut server-side execution readsnodeData.credential. Now both are kept in sync on selection.Add E2E example to examples app: New
E2eExample.tsxdemonstrating full Flowise integration — load flow from DB, editable title, save, delete, and test run via FABs passed ascanvasActions. SimplifiedBasicExampleto minimal canvas-only usage.Test fixes: Updated test expectations for
customMention,useAvailableVariables,nodeFactory,TooltipWithParser, anduseAsyncOptionsto match corrected behavior and suppressact()warnings.🤖 Generated with Claude Code
example with http node and variable fix
agentflow-sdk-variable-http-node-fix.mov
e2e demo using existing flow from db
Screen.Recording.2026-04-17.at.5.57.41.PM.mov