deerflow2/frontend/src
Huixin615 a17d2ff8f8
fix(mcp): surface admin-required state on settings tools page (#3527) (#3533)
GET /api/mcp/config returns 403 for non-admin users, but the previous
client returned the error body as MCPConfig, causing MCPServerList to
crash with 'Cannot convert undefined or null to object' on
Object.entries(config.mcp_servers).

- api.ts: introduce MCPConfigRequestError; loadMCPConfig and
  updateMCPConfig now throw it (carrying status + isAdminRequired)
  instead of letting non-2xx bodies leak through as parsed config
- tool-settings-page.tsx: render a friendly 'admin privileges required'
  empty state when the React Query error is an admin-required
  MCPConfigRequestError; keep MCPServerList resilient with
  Object.entries(servers ?? {}) and an empty-state for no servers
- i18n: add settings.tools.adminRequired and settings.tools.empty in
  en-US, zh-CN and the Translations type
- tests: cover 403 / 5xx / instanceof / detail-fallback for both
  loadMCPConfig and updateMCPConfig in tests/unit/core/mcp/api.test.ts

Refs: #3527
2026-06-13 07:36:57 +08:00
..
app feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
components fix(mcp): surface admin-required state on settings tools page (#3527) (#3533) 2026-06-13 07:36:57 +08:00
content refactor(lead-agent): make build_middlewares public to drop the last cross-module private import (#3458) 2026-06-09 11:56:28 +08:00
core fix(mcp): surface admin-required state on settings tools page (#3527) (#3533) 2026-06-13 07:36:57 +08:00
hooks feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
lib fix(frontend): prevent submit during IME composition (#1562) 2026-03-29 22:36:38 +08:00
styles fix(frontend): UI polish - fix CSS typo, dark mode border, and hardcoded colors (#1942) 2026-04-08 09:07:39 +08:00
typings feat: add 'about' page 2026-02-06 15:18:37 +08:00
env.js feat(auth): release-validation pass for 2.0-rc — 12 blockers + simplify follow-ups (#2008) 2026-04-26 11:08:11 +08:00
mdx-components.ts Add documents site (#1767) 2026-04-03 07:25:40 +08:00