Sidebar: Fix Providers & MCP stuck on loading #38

Closed
opened 2026-03-30 10:38:08 +00:00 by mahmoud · 1 comment
Owner

Problem

In the left sidebar, both Providers and MCP sections are perpetually stuck in a loading state and never display data.

Expected Behavior

  • Providers sidebar section loads and shows connected providers
  • MCP sidebar section loads and shows connected MCP servers
  • Loading states have a timeout/error fallback

Acceptance Criteria

  • Providers sidebar loads real data
  • MCP sidebar loads real data
  • Error state shown if data fails to load (no infinite spinner)
## Problem In the left sidebar, both **Providers** and **MCP** sections are perpetually stuck in a loading state and never display data. ## Expected Behavior - Providers sidebar section loads and shows connected providers - MCP sidebar section loads and shows connected MCP servers - Loading states have a timeout/error fallback ## Acceptance Criteria - [x] Providers sidebar loads real data - [x] MCP sidebar loads real data - [x] Error state shown if data fails to load (no infinite spinner)
mahmoud self-assigned this 2026-03-31 18:00:04 +00:00
mahmoud added this to the ACTIVE project 2026-03-31 18:00:06 +00:00
mahmoud added this to the now milestone 2026-03-31 18:00:09 +00:00
Author
Owner

Already Implemented

All acceptance criteria are met:

  • Providers sidebar loads real data — Shows each provider name + key count from config.get RPC
  • MCP sidebar loads real data — Shows server count + tool count from mcp.health RPC
  • Error state shown if data fails — No infinite spinner; each section loads independently with .catch(() => null) fallback. Shows "Failed to load", "No providers", or "Not configured" as appropriate.

Root cause & fix

The original loadSidebar() used Promise.all — if any one RPC failed (e.g. mcp.health before the handler existed), ALL sections stayed on "Loading...". Fixed by giving each RPC its own .catch(() => null) and null-checking results individually.

🤖 Generated with Claude Code

## Already Implemented All acceptance criteria are met: - [x] **Providers sidebar loads real data** — Shows each provider name + key count from `config.get` RPC - [x] **MCP sidebar loads real data** — Shows server count + tool count from `mcp.health` RPC - [x] **Error state shown if data fails** — No infinite spinner; each section loads independently with `.catch(() => null)` fallback. Shows "Failed to load", "No providers", or "Not configured" as appropriate. ### Root cause & fix The original `loadSidebar()` used `Promise.all` — if any one RPC failed (e.g. `mcp.health` before the handler existed), ALL sections stayed on "Loading...". Fixed by giving each RPC its own `.catch(() => null)` and null-checking results individually. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_aibroker#38
No description provided.