Conversation
Optional boolean parameters started with no saved value, so the first True/False selection only updated local state. Always propagate boolean input changes so False can be persisted explicitly.
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
Fixes #42637
For optional boolean model parameters that have no saved value yet, the first True/False selection only updated the component's local state. The parent was not notified because the propagation check treated the parameter as unset. This made it impossible to persist an explicit
falsevalue, such as disabling Ollama thinking mode.This change always propagates user selections for boolean parameters. Other optional parameter types keep their existing lazy-initialization behavior.
Testing
true; selectingFalsenow callsonChange(false).expected "vi.fn()" to be called 1 times, but got 0 times.parameter-item.spec.tsxpasses with 22 tests.vp stagedsuccessfully.pnpm run type-checkinwebfails locally indev-proxy.config.tsbecause the skipped@langgenius/dev-proxyworkspace prepare/build step did not produce the workspace package; it is unrelated to the touched files.Checklist
vp stagedfor the changed files.This PR was prepared with AI assistance and reviewed by the submitting account. Please consider adding the
llm-generatedlabel.From Codex