Clearing a data source field doesn't actually clear it - #7785
Open
yoshiokatsuneo wants to merge 2 commits into
Open
Clearing a data source field doesn't actually clear it#7785yoshiokatsuneo wants to merge 2 commits into
yoshiokatsuneo wants to merge 2 commits into
Conversation
Greptile SummaryThis PR changes DynamicForm submission normalization so every empty string is submitted as
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| client/app/components/dynamic-form/DynamicForm.jsx | Empty-string normalization is simplified to consistently produce null, with no eligible follow-up defect established. |
Reviews (3): Last reviewed commit: "Apply prettier formatting" | Re-trigger Greptile
yoshiokatsuneo
force-pushed
the
fix/dynamic-form-empty-value-normalization
branch
from
August 11, 2026 17:15
317606e to
cea411e
Compare
Previously, clearing a field that had a previously saved value sent an empty string to the server, while never filling in a field sent null. Both cases represent the same user intent (no value), so normalize any empty string to null regardless of the field's initial value. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
yoshiokatsuneo
force-pushed
the
fix/dynamic-form-empty-value-normalization
branch
from
August 11, 2026 17:16
cea411e to
cbc3757
Compare
3 tasks
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.
Why
If you edit an existing data source and clear a field that already had a value, it doesn't actually get cleared — it saves an empty string instead of removing the setting. If you leave a field empty on a new data source, it's correctly saved as "not set." Same user intent ("no value"), two different outcomes depending on whether the field had a value before, because the code used the field's
initialValueto guess intent instead of just looking at the current value.What changed
normalizeEmptyValuesToNullinDynamicForm.jsxno longer compares againstinitialValue. Any empty string is now normalized tonull, so a cleared field always ends up unset, regardless of whether it had a saved value before.Relation to #3886 ("Fix empty values sent in dynamic form")
This
initialValuecomparison was introduced deliberately in #3886, with the stated intent: "don't submit form values if they are empty (unless they are intentionally set to empty string)". The idea was to distinguish a field the user never touched from one the user actively cleared, treating the latter as an intentional empty-string value worth preserving.In practice, clearing a field is how users expect to unset it, not to explicitly assign an empty string. Preserving
""instead ofnullmeans the field looks "set" server-side (the key is present) even though the user's intent was to remove it. This PR revisits that assumption and removes the distinction, treating both cases as "no value."Relation to #7756 ("fix(configuration): treat empty secret as explicit clear")
#7756 addresses a related symptom: clearing a secret field (e.g. an AWS credential) persists it as
"", which some downstream SDKs (e.g. boto3) treat as an explicit credential rather than "unset," breaking default credential-chain fallback. That fix is scoped to secret fields inConfigurationContainer.update()on the backend.This PR fixes the underlying cause on the frontend for all
DynamicFormfields (not limited to secrets): once a cleared field is normalized tonullbefore submission, the empty-string case #7756 handles no longer originates from the UI.Validation
pnpm run lint🤖 This PR was authored with the help of Claude Code (Anthropic), using Claude Sonnet 5 (
claude-sonnet-5).