Skip to content

Prevent tools page crash on ungrouped tools - #11

Merged
enowdev merged 1 commit into
enowdev:mainfrom
nvdorman:fix/tools-null-toolsets
Aug 1, 2026
Merged

enowdev merged 1 commit into
enowdev:mainfrom
nvdorman:fix/tools-null-toolsets

Conversation

@nvdorman

@nvdorman nvdorman commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • encode toolset membership as [] instead of null for dynamic/ungrouped tools such as MCP tools
  • defensively normalize nullable toolsets payloads in the Tools page for compatibility with older servers and cached responses
  • add backend JSON and frontend normalization regression tests

Root cause

ToolsetsFor returned a nil Go slice for tools not present in named presets. JSON encoded that as null, while the UI assumed string[] and called item.toolsets.slice(...), causing:

Cannot read properties of null (reading 'slice')

Verification

  • make check
  • 6 web tests, 0 failures
  • TypeScript + Vite production build
  • Brave smoke test, 15/15 routes
  • installed live bundle contains Array.isArray(toolsets) ? toolsets : []
  • live daemon health is 200 after restart

@enowdev
enowdev merged commit f09bd8c into enowdev:main Aug 1, 2026
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.

2 participants