Commit f82f853
feat(monitoring): redesign monitoring page — overview cards, Top Agents/Automations, Threads tab (#2953)
* feat(monitoring): redesign overview with card-based layout matching Figma
Update Card component to remove default hover and lighten title weight.
Rebuild monitoring overview with MonitoringMetricCard pattern: Tool Calls
(full width), Latency + Errors (half width), Top Tools + Top Agents,
AI Usage section with model leaderboards. Update header with Live
streaming indicator and inline tabs/controls.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(monitoring): add Threads tab with agent, model, user, usage and conversation view
Adds a new Threads tab to the Monitor page showing a paginated list of
threads with their associated agent, model (resolved from decopilot
monitoring logs), user, status, and token usage (in/out/total). Clicking
a thread opens a slide-over panel with the full conversation rendered
using the existing chat UI components in read-only mode.
Made-with: Cursor
* feat(monitoring): add time range filter to Threads tab
Made-with: Cursor
* feat(monitoring): add search and model/user/status filters to Threads tab
Made-with: Cursor
* feat(monitoring): add search, filters (status/agent/user/model) and consistent table header to Threads tab
- Search by title (backend ILIKE)
- Filter by status, user, agent (all backend), model (client-side from logs)
- FiltersPopover matches Audit tab visual style
- Fix empty threads bug: updated_at is TEXT so compare as ISO string, not Date
- Table headers now match Audit tab style (uppercase monospace muted)
Made-with: Cursor
* fix(monitoring): threads tab quality fixes
- Use PersistedRunConfigSchema.passthrough() for run_config in ThreadEntitySchema instead of loose record type
- Replace ThreadMessagesContent with self-contained ThreadConversationPanel that owns its header, eliminating the onModelResolved-during-render anti-pattern
- Paginate thread messages (100/page with infinite scroll) to support long threads
- Paginate decopilot monitoring logs internally until hasMore=false to avoid 500-log truncation for model/usage aggregation
- Debounce search input (300ms) to avoid firing a query on every keystroke
- Switch threads list and model logs queries from useSuspenseInfiniteQuery/useSuspenseQuery to useInfiniteQuery/useQuery so ThreadsTabContent never suspends (fixing search input focus loss)
- Hide table header when threads list is empty or loading
Made-with: Cursor
* fix file
* fix(thread): revert run_config schema to record type for storage compatibility
PersistedRunConfigSchema.passthrough() infers required fields (models, agent,
temperature, toolApprovalLevel) that are incompatible with the Kysely storage
type Thread.run_config: Record<string, unknown> | null, breaking all thread
tool handlers. Revert to z.record() with a comment directing callers to use
PersistedRunConfigSchema for typed access at the point of use.
Made-with: Cursor
* fix monitoring error
* fix(types): add agent_ids column to ThreadTable and Thread interfaces
The column was added by migration 052 but missing from the TypeScript types,
causing TS2345 errors in threads.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(monitoring): resolve useChatStream error in threads view
MessageAssistant used useChatStream() which throws when rendered outside
ActiveTaskProvider. Threads in the monitoring view display read-only
historical messages with no active stream context, so isRunInProgress
now safely defaults to false via useOptionalChatStream().
* fix(threads): remove stale agent_ids references, use virtual_mcp_id
Migration 057 already replaced agent_ids with virtual_mcp_id but leftover
references remained in types, storage queries, schema, and monitoring UI.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(docs): remove duplicate typescript devDependency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix agent name
* fix(monitoring): reduce header-to-content spacing, constrain audit/threads width
- Reduce top padding in overview tab (py-6 → pt-2 pb-6) to close the
gap between header controls and the first card
- Wrap audit tab content in max-w-[1200px] container with px-4/md:px-10
to match the members page table layout
- Apply same container constraint to threads tab
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): align button/select sizes, unify audit/threads UX
- Select component: change default height from h-10 to h-8 (32px) to
match button default size; xs size from h-7 to h-6
- Header controls: remove size="sm" overrides so buttons use default
h-8 (32px) consistently
- Reduce header-to-content gap (gap-4 → gap-3)
- Move search to shared header area below tabs for audit/threads
- Convert audit from accordion (inline expand) to Sheet (slide-over
panel) matching the threads pattern
- Remove ThreadFiltersPopover from threads tab
- Remove chevron expand column from LogRow, simplify to click-to-select
- Both audit and threads now use the same interaction: click row → Sheet
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): pixel-perfect card design matching Figma specs
Card component (MonitoringMetricCard):
- gap-8 (32px) between header and content sections
- Title: text-sm font-normal text-foreground/70
- Value: text-4xl font-normal (36px, weight 400)
- Content children: gap-6 (24px) between chart and table
Leaderboard tables (Connection, Tool, Model):
- Row height: h-10 (40px) with border-b border-border/50
- Row padding: px-3 (12px)
- Icon: 24x24 with border, shadow-sm, rounded-md
- Name: text-sm text-muted-foreground
- Percentage: text-sm text-foreground/30 (opacity 0.3)
- Count: text-sm text-foreground font-normal (not semibold)
- No gap between rows, only 0.5px border separator
- "See all": px-4, text-sm text-muted-foreground + arrow icon
Select trigger: w-[120px] matching Figma spec
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): move search into Page.Body matching Members page style
Move SearchInput from a standalone div between header and content into
the Page.Body container, below the tabs row. Uses w-full md:w-[375px]
matching the Members page search pattern.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(ui): TimeRangePicker trigger to use default button size (32px)
Remove size="sm" and h-7 override from the trigger button so it uses
the default h-8 (32px) height, matching all other header controls.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): tighten spacing between tabs, search, and table
Change Page.Body from pb-0 to !pb-3 so there's a consistent small gap
between the search input and the table content below.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): increase gap between tabs and search
Bump flex gap from gap-3 to gap-5 (20px) for better spacing between
title, tabs row, and search input. Also pb-3 → pb-4.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): update skeletons to match Figma card design
Overview skeleton: use SkeletonCard component matching the actual card
structure (gap-8, proper title/value sizes, border-b table rows with
icon placeholders, "See all" row). Mirrors the full overview layout
with full-width and half-width card rows.
Table skeleton: wrap in max-w-[1200px] container matching the actual
audit/threads table layout. Match row height (h-14) and column
structure (no expand chevron column).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): move search inside gap-5 flex container
The search was outside the gap-5 div, so the gap wasn't applying
between tabs and search. Now it's a sibling of the title and tabs
row inside the same flex-col gap-5 container.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(monitoring): clickable rows, See all navigation, AI Usage layout
- Connection rows in leaderboard tables are now clickable — navigate
to the connection detail page via getConnectionSlug
- Tool rows navigate to their parent connection detail page
- "See all" links navigate to the Audit tab
- All clickable rows have hover:bg-accent/50 transition
- AI Usage section: added border-t divider separating it from tool
call metrics; restructured from full-width + 2-col to a single
3-column row (AI Calls, AI Latency, AI Errors) with shorter charts
- Updated skeleton to match new 3-column AI layout
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): correct percentage calculation in leaderboard rows
The percentage was dividing the metric value (e.g. avgDurationMs=117)
by total (e.g. totalCalls=2) giving nonsensical results like 5825%.
Now per mode:
- requests: calls / totalCalls (proportion of traffic)
- latency: calls / totalCalls (proportion of traffic) + latency value
- errors: errorRate % + formatted metric value
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): improve Top Tools/Connections cards and AI section header
Top Tools / Top Connections:
- Replaced MonitoringMetricCard (with giant hero number) with simple
Card containers — just a label + the ranked list
- Renamed "Top Agents Used" to "Top Connections" (more accurate)
- Reduced gap-8 to gap-4 for compact list style
AI Usage divider:
- Replaced bare border-t with a centered section header:
horizontal lines + "AI USAGE" label in uppercase tracking-wider
- Added pt-4 for breathing room above
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(monitoring): replace Top Connections with Top Agents, improve layout
- Remove redundant "Top Connections" card (already shown in Tool Calls)
- Add "Top Agents" card listing active virtual MCPs with icons, each
clickable to navigate to the agent page; "See all" goes to Threads tab
- New AgentLeaderboardTable component using IntegrationIcon and
virtualMcps data
- Pass virtualMcps prop through to OverviewTabContent
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(monitoring): replace Top Tools with Top Agents + Top Automations
- Remove Top Tools card and ToolLeaderboardTable (tool data already
visible in the Tool Calls connection breakdown)
- Remove useMonitoringTopTools hook usage and analyticsDateRange
- Top Agents card: uses MonitoringMetricCard with chart + agent list,
shows active virtual MCPs count as hero metric
- Top Automations card: new AutomationsCard component using
useAutomationsList hook, shows automation name, trigger count,
active/inactive status; clickable rows navigate to the agent page
- Both cards in a 2-column layout with charts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(monitoring): Agent Sessions + Automation Runs follow Tool Calls pattern
Both cards now match the Tool Calls card structure: big hero metric +
chart + ranked leaderboard table with the same row styling.
Agent Sessions: total calls metric, chart, agent leaderboard
Automation Runs: active count metric, chart, automation leaderboard
showing % share of triggers + trigger count per automation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(monitoring): redesign monitoring page with new layout and stats
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(settings): remove redundant description paragraphs from settings pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(monitoring): deduplicate virtualMcpId/agentId thread filters, add local postgres docs
Merge the two redundant virtual_mcp_id WHERE clauses in thread queries
so they never conflict. Also add CLAUDE.md instructions for querying the
embedded postgres during development.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): remove unused files and exports flagged by knip
- Delete analytics-top-tools.tsx (unused file) and its useMonitoringTopTools hook
- Delete home-grid-cell.tsx (no remaining consumers after skeleton removal)
- Remove StackedConnectionChart, MonitoringStatsRowSkeleton (dead code)
- Un-export internal helpers in utils.ts (NICE_INTERVALS, intervalToMs, etc.)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(monitoring): limit thread filters to single selection matching backend
The backend only accepts singular agentId/userId strings, but the UI
allowed multi-select. Cap both filters to one value so the UI matches
the API capability.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: guitavano <tavano62@gmail.com>
Co-authored-by: viktormarinho <viktormpcs@gmail.com>1 parent e3abb28 commit f82f853
39 files changed
Lines changed: 3708 additions & 3210 deletions
File tree
- apps
- docs
- mesh/src
- storage
- tools
- monitoring
- thread
- web
- components
- chat
- message
- parts/tool-call-part
- collections
- monitoring
- page
- settings
- contexts
- lib
- routes/orgs
- home
- monitoring
- views
- settings
- virtual-mcp
- packages/ui/src/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
62 | 85 | | |
63 | 86 | | |
64 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
| |||
237 | 246 | | |
238 | 247 | | |
239 | 248 | | |
240 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
241 | 259 | | |
242 | 260 | | |
243 | 261 | | |
| |||
249 | 267 | | |
250 | 268 | | |
251 | 269 | | |
252 | | - | |
253 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
254 | 294 | | |
255 | 295 | | |
256 | 296 | | |
| |||
262 | 302 | | |
263 | 303 | | |
264 | 304 | | |
265 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
266 | 326 | | |
267 | | - | |
| 327 | + | |
268 | 328 | | |
269 | | - | |
| 329 | + | |
270 | 330 | | |
271 | 331 | | |
272 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
26 | 52 | | |
27 | 53 | | |
28 | 54 | | |
| |||
58 | 84 | | |
59 | 85 | | |
60 | 86 | | |
61 | | - | |
| 87 | + | |
| 88 | + | |
62 | 89 | | |
63 | 90 | | |
64 | 91 | | |
| |||
69 | 96 | | |
70 | 97 | | |
71 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
72 | 104 | | |
73 | 105 | | |
74 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
58 | 70 | | |
59 | 71 | | |
60 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
757 | 761 | | |
758 | 762 | | |
759 | 763 | | |
| |||
768 | 772 | | |
769 | 773 | | |
770 | 774 | | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
771 | 779 | | |
772 | 780 | | |
773 | 781 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| |||
Lines changed: 31 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | | - | |
| 35 | + | |
33 | 36 | | |
34 | | - | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
169 | | - | |
170 | | - | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
173 | 190 | | |
174 | 191 | | |
175 | 192 | | |
| |||
181 | 198 | | |
182 | 199 | | |
183 | 200 | | |
184 | | - | |
| 201 | + | |
185 | 202 | | |
186 | 203 | | |
187 | 204 | | |
188 | 205 | | |
189 | 206 | | |
190 | 207 | | |
191 | 208 | | |
192 | | - | |
193 | | - | |
| 209 | + | |
| 210 | + | |
194 | 211 | | |
195 | 212 | | |
196 | 213 | | |
| |||
289 | 306 | | |
290 | 307 | | |
291 | 308 | | |
292 | | - | |
293 | | - | |
| 309 | + | |
| 310 | + | |
294 | 311 | | |
295 | 312 | | |
296 | 313 | | |
297 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
298 | 317 | | |
299 | 318 | | |
300 | 319 | | |
| |||
0 commit comments