Skip to content

fix(settings): Web Search section no longer crashes the app - #65

Merged
QR-Madness merged 1 commit into
masterfrom
fix/settings-select-empty-value
Aug 2, 2026
Merged

fix(settings): Web Search section no longer crashes the app#65
QR-Madness merged 1 commit into
masterfrom
fix/settings-select-empty-value

Conversation

@QR-Madness

Copy link
Copy Markdown
Owner

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.tsx declares { value: '', label: 'Provider default' } for both Search depth and SafeSearch, and nothing catches the throw — SettingsContent has a Suspense boundary but no error boundary, so the crash escapes to the app root.

The fix

SelectField swaps '' 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 other SelectField consumer is untouched.

This mirrors how ModelPickerField already treats '' as a first-class "System default" — it sidesteps the problem by not using Radix at all.

Verification

Live, in the running app:

  • Web Search renders; picker lists all five options with "Provider default" correctly selected.
  • Round-trip '' → 'basic' → '' persists through /api/config/update — confirmed against GET /api/config. Config ends where it started.
  • Fresh reload (no HMR state) renders clean.

Plus two new SelectField tests: an empty-valued option renders without throwing, and selecting it reports '' back to the caller.

task docs:check green 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

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
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentx-docs-site Ready Ready Preview Aug 2, 2026 2:06pm

@QR-Madness
QR-Madness merged commit fbc3600 into master Aug 2, 2026
4 checks passed
@QR-Madness
QR-Madness deleted the fix/settings-select-empty-value branch August 2, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant