fix(settings): Web Search section no longer crashes the app - #65
Merged
Conversation
Radix Select rejects an item whose value is the empty string — it reserves
`''` for "cleared, show the placeholder". SearchSection declares
`{ value: '', label: 'Provider default' }` for both Search depth and
SafeSearch, so opening Settings → Web Search threw during render and took
the whole app down (no per-section boundary catches it).
SelectField now swaps `''` for a sentinel at the Radix boundary only, in
both directions. Callers keep passing and receiving `''`, so the two
declarations stay as they are and every other consumer is untouched.
Verified live: the section renders, the picker lists all five options with
"Provider default" selected, and a '' → 'basic' → '' round-trip persists
correctly through /api/config/update.
No release-notes bullet: the defect only ever existed between releases
(the Web Search control plane landed after v0.21.250), so no released
build carried it.
Assisted-by: Fable 5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Opening Settings → Web Search threw during render and took the entire app down to the "AgentX failed to start" screen. Every time, on current master.
Radix Select reserves
''for "cleared — show the placeholder" and throws on any item declaring it.SearchSection.tsxdeclares{ value: '', label: 'Provider default' }for both Search depth and SafeSearch, and nothing catches the throw —SettingsContenthas a Suspense boundary but no error boundary, so the crash escapes to the app root.The fix
SelectFieldswaps''for an internal sentinel at the Radix boundary only, in both directions. The public prop contract stays'', so both declarations stay exactly as written and every otherSelectFieldconsumer is untouched.This mirrors how
ModelPickerFieldalready treats''as a first-class "System default" — it sidesteps the problem by not using Radix at all.Verification
Live, in the running app:
'' → 'basic' → ''persists through/api/config/update— confirmed againstGET /api/config. Config ends where it started.Plus two new
SelectFieldtests: an empty-valued option renders without throwing, and selecting it reports''back to the caller.task docs:checkgreen across all four gates; settings field suite 6/6.Notes
No release-notes bullet. The defect only ever existed between releases — the Web Search control plane landed after
v0.21.250, the last published build — so no released version carried it. Version still bumps to 0.21.262 per the continuous-version habit.A per-section error boundary (so one sick section can't kill the shell) is coming in the settings foundation work; this PR is deliberately just the crash.
Assisted-by: Fable 5