[P2] Route state indicators in sidebar and dashboard #119

Closed
opened 2026-04-02 18:49:19 +02:00 by claude · 1 comment
Owner

Parent Epic

#100

Problem

There is no visual indicator showing whether an application has stopped/suspended routes, or whether individual routes are stopped/suspended. Users must navigate to the route control bar to see this state.

Proposed Solution

  • Show visual indicators in the sidebar tree for apps with stopped/suspended routes
  • Show route state (stopped/suspended) in the dashboard route list
  • State must accurately reflect agents' current configurations, not just what was sent
  • Update in real-time as agent state changes

Dependencies

  • Depends on synchronous command dispatch (#116) for accurate state tracking

Acceptance Criteria

  • Sidebar app nodes show indicator when any route is stopped/suspended
  • Sidebar route nodes show stopped/suspended state
  • Dashboard route list shows route state
  • State reflects actual agent-reported configuration
  • State updates when agents report changes
## Parent Epic #100 ## Problem There is no visual indicator showing whether an application has stopped/suspended routes, or whether individual routes are stopped/suspended. Users must navigate to the route control bar to see this state. ## Proposed Solution - Show visual indicators in the sidebar tree for apps with stopped/suspended routes - Show route state (stopped/suspended) in the dashboard route list - State must accurately reflect agents' current configurations, not just what was sent - Update in real-time as agent state changes ## Dependencies - Depends on synchronous command dispatch (#116) for accurate state tracking ## Acceptance Criteria - [ ] Sidebar app nodes show indicator when any route is stopped/suspended - [ ] Sidebar route nodes show stopped/suspended state - [ ] Dashboard route list shows route state - [ ] State reflects actual agent-reported configuration - [ ] State updates when agents report changes
Author
Owner

Implemented in 2 commits.

Backend:

  • RouteStateRegistry — in-memory ConcurrentHashMap tracking route operational state (STARTED/STOPPED/SUSPENDED) per application+route. Defaults to STARTED. Resets on server restart.
  • AgentCommandController.sendGroupCommand() — after all agents ACK a ROUTE_CONTROL command successfully, updates the registry with the new state
  • RouteSummary DTO — new routeState field (null = started, "stopped", "suspended")
  • RouteCatalogController — injects RouteStateRegistry, populates routeState in catalog response

Frontend:

  • SidebarRoute type — new routeState?: 'stopped' | 'suspended' field
  • buildAppTreeNodes() and buildRouteTreeNodes() — stopped routes show red square icon, suspended show amber pause icon; badge shows "STOPPED" or "SUSPENDED" prefix
  • LayoutShell.tsx — maps r.routeState from catalog response, passes stop/pause icon factories to tree builders

State accuracy: State only updates when ALL agents successfully ACK a route-control command. Partial failures leave state unchanged. On server restart, all states reset to started (Camel default behavior).

Implemented in 2 commits. **Backend:** - `RouteStateRegistry` — in-memory ConcurrentHashMap tracking route operational state (STARTED/STOPPED/SUSPENDED) per application+route. Defaults to STARTED. Resets on server restart. - `AgentCommandController.sendGroupCommand()` — after all agents ACK a ROUTE_CONTROL command successfully, updates the registry with the new state - `RouteSummary` DTO — new `routeState` field (null = started, "stopped", "suspended") - `RouteCatalogController` — injects RouteStateRegistry, populates routeState in catalog response **Frontend:** - `SidebarRoute` type — new `routeState?: 'stopped' | 'suspended'` field - `buildAppTreeNodes()` and `buildRouteTreeNodes()` — stopped routes show red square icon, suspended show amber pause icon; badge shows "STOPPED" or "SUSPENDED" prefix - `LayoutShell.tsx` — maps `r.routeState` from catalog response, passes stop/pause icon factories to tree builders **State accuracy:** State only updates when ALL agents successfully ACK a route-control command. Partial failures leave state unchanged. On server restart, all states reset to started (Camel default behavior).
Sign in to join this conversation.