Repository navigation
fix(dashboard-v2): align projection bridge and registry - #20
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Lite Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR introduces centralized projection API endpoints and websocket invalidation topics, replacing hardcoded REST endpoints across multiple components. It adds a new Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant QueryClient as TanStack Query Client
participant Server
participant WebSocket as WebSocket Server
participant Database
Client->>QueryClient: useQuery({queryKey: ['cost-trends']})
QueryClient->>Server: GET /projection/cost-trends
Server->>Database: Query cost trend data
Database-->>Server: Result
Server-->>QueryClient: Projection response
QueryClient-->>Client: Data displayed
WebSocket->>WebSocket: Monitor 'cost-trends' channel
Database->>Database: Cost trends updated
WebSocket->>WebSocket: Publish 'cost-trends' message
QueryClient->>QueryClient: Invalidate ['cost-trends', 'cost-trends-3d', 'cost-by-model', 'cost-by-model-2d']
QueryClient->>Server: Refetch affected queries
Server->>Database: Fetch updated data
Database-->>Server: Result
Server-->>QueryClient: Updated projections
QueryClient-->>Client: UI refreshed with latest data
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Poem
Comment |
|
Follow-up landed on this branch in This extends the initial bridge/registry repair by moving the delegation summary lane onto the event bus by default:
Additional verification:
|
Summary
/projection/:topicHTTP bridge for the v2 snapshot topics used by the dashboard widgets/api/*routesVerification
npm cinpm run generate:registrynpm run test:run -- server/routes.test.ts server/broadcast.test.tsnpm run checkSummary by CodeRabbit
New Features
Tests
Chores