Repository navigation
fix(web): omit empty optional agent variable inputs - #44748
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44748 +/- ##
=======================================
Coverage 89.39% 89.40%
=======================================
Files 5986 5986
Lines 375177 375182 +5
Branches 76081 76083 +2
=======================================
+ Hits 335408 335420 +12
+ Misses 33732 33725 -7
Partials 6037 6037
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lyzno1
enabled auto-merge
October 26, 2026 03:15
lyzno1
approved these changes
Oct 26, 2026
hjlarry
pushed a commit
that referenced
this pull request
Oct 26, 2026
(cherry picked from commit 2edd56a)
1 task done
6 tasks done
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.
Summary
fix #44742
fix #44579
Clearing an optional
anyinput in a legacy Workflow/Chatflow Agent node leaves an empty variable reference in the saved graph. An untouched optional input withdefault: nullcan also become an empty reference when another form field changes. This change omits those entries at the Agent form serialization boundary, restoring the unconfigured state.Refs #44579. The issue author, @ZhXZhao, has described a locally verified Agent-specific frontend fix. This PR independently implements the narrow frontend serialization portion and adds regression coverage. It complements #44655's backend handling of existing saved configurations. The broader nested manual-tool parameter path and the full MCP remove/re-add sequence in #44742 remain outside this change.
Only parameters present in the submitted form values and declared as optional
anyare omitted when their selector is'',null, or[]. Required inputs, nonempty references, ordinary constants, tool lists, nested automatic tool parameters, and unknown saved fields retain their existing behavior. Non-null strategy-default encoding is unchanged.Validation:
mainbefore applying the fix.vp run -w checkandvp stagedpassed.@tsrs/wasmversion (0.18.0-ts7.1.0-dev.20260929); the native tsrs package has no Windows executable.Screenshots
The visible empty field is unchanged; the observable change is the serialized graph data:
{"context":{"type":"variable","value":""}}after clearing{}{"context":{"type":"variable","value":null},"enabled":{"type":"constant","value":false}}after editing another field{"enabled":{"type":"constant","value":false}}Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint godsThe documentation items are not applicable to this serialization bug fix. The final checklist item applies to
vp staged; no backend files changed.From Codex