← Back to Kontasks
Flow Timeline API Discovery
Output
Current Flow Timeline Architecture
There is no single Flow Timeline API. The browser fetches two separate endpoints and merges client-side.
What the Browser Fetches
1. Kontasks GET /api/kontasks?limit=100&status=completed&flowId=X Returns: id, title, type, status, scope, tags, flowId, context 2. System Events GET /api/gv/system-events?limit=50&since=X Returns: id, type, service, message, severity, createdAt
Client-Side Processing (flow-timeline-pane.ts)
flowTimelineState = { kontasks: [], // From /api/kontasks systemEvents: [], // From /api/gv/system-events threads: {}, // Built client-side via loadThreadData() kontaskThreadMap: {} // Thread grouping built client-side }
The Enrichment Happens Client-Side
- Topic/Domain colors - Applied via CSS classes based on kontask tags
- Thread grouping - Built by
loadThreadData()fetching edge data - Interleaving - Kontasks + system events merged by timestamp
- Type labels - "Feature", "Review", etc. derived from kontask type/tags
Recommendation
Create a new dedicated endpoint that returns the merged, enriched timeline:
GET /api/gv/flow-timeline?hours=2&flowId=X&limit=20 Returns: { "entries": [ { "type": "kontask", "id": "...", "title": "...", "topic": "feature", "domain": "frontend", "threadId": "...", "threadDepth": 0 }, { "type": "system_event", "message": "Konsole started" } ], "threads": { /* thread grouping */ }, "summary": { "totalKontasks": 10, "totalEvents": 3 } }
Then the MCP tool just calls this single endpoint and gets the full picture.
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
greatvibe
Tags
mcptimelineapi
Created
12 Jan 2026, 4:21 am
Updated
12 Jan 2026, 4:21 am
Timing
⏱️ 50.9s
0 tools
● TTFE 0%
● Thinking 100%
● Tools 0%
Created By
claude
📋 Claude's Context
Session
ses_286e2e28...
Raw Data
{
"id": "8364bd0b-af80-49fe-ad38-f55ec31f3e0f",
"type": "general",
"status": "completed",
"title": "Flow Timeline API Discovery",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Consolas','Monaco',monospace;\">\n<h2 style=\"font-family:sans-serif;color:#fff;margin:0 0 16px 0;\">Current Flow Timeline Architecture</h2>\n\n<p style=\"color:#f97316;margin-bottom:16px;\"><strong>There is no single Flow Timeline API.</strong> The browser fetches two separate endpoints and merges client-side.</p>\n\n<h3 style=\"color:#61afef;margin:20px 0 12px 0;\">What the Browser Fetches</h3>\n<pre style=\"background:#2d2d2d;padding:16px;border-radius:6px;overflow-x:auto;line-height:1.8;\">\n<span style=\"color:#c678dd;\">1. Kontasks</span>\n <span style=\"color:#56b6c2;\">GET</span> /api/kontasks?limit=100&status=completed&flowId=X\n <span style=\"color:#7f848e;\">Returns: id, title, type, status, scope, tags, flowId, context</span>\n\n<span style=\"color:#c678dd;\">2. System Events</span>\n <span style=\"color:#56b6c2;\">GET</span> /api/gv/system-events?limit=50&since=X\n <span style=\"color:#7f848e;\">Returns: id, type, service, message, severity, createdAt</span>\n</pre>\n\n<h3 style=\"color:#61afef;margin:20px 0 12px 0;\">Client-Side Processing (flow-timeline-pane.ts)</h3>\n<pre style=\"background:#2d2d2d;padding:16px;border-radius:6px;overflow-x:auto;line-height:1.6;\">\n<span style=\"color:#98c379;\">flowTimelineState</span> = {\n kontasks: [], <span style=\"color:#7f848e;\">// From /api/kontasks</span>\n systemEvents: [], <span style=\"color:#7f848e;\">// From /api/gv/system-events</span>\n threads: {}, <span style=\"color:#7f848e;\">// Built client-side via loadThreadData()</span>\n kontaskThreadMap: {} <span style=\"color:#7f848e;\">// Thread grouping built client-side</span>\n}\n</pre>\n\n<h3 style=\"color:#61afef;margin:20px 0 12px 0;\">The Enrichment Happens Client-Side</h3>\n<ul style=\"color:#e0e0e0;padding-left:24px;line-height:1.8;\">\n<li><span style=\"color:#98c379;\">Topic/Domain colors</span> - Applied via CSS classes based on kontask tags</li>\n<li><span style=\"color:#98c379;\">Thread grouping</span> - Built by <code>loadThreadData()</code> fetching edge data</li>\n<li><span style=\"color:#98c379;\">Interleaving</span> - Kontasks + system events merged by timestamp</li>\n<li><span style=\"color:#98c379;\">Type labels</span> - \"Feature\", \"Review\", etc. derived from kontask type/tags</li>\n</ul>\n\n<h3 style=\"color:#22c55e;margin:20px 0 12px 0;\">Recommendation</h3>\n<p style=\"margin-bottom:12px;\">Create a <strong>new dedicated endpoint</strong> that returns the merged, enriched timeline:</p>\n<pre style=\"background:#2d2d2d;padding:16px;border-radius:6px;overflow-x:auto;line-height:1.6;\">\n<span style=\"color:#56b6c2;\">GET</span> <span style=\"color:#98c379;\">/api/gv/flow-timeline</span>?hours=2&flowId=X&limit=20\n\n<span style=\"color:#7f848e;\">Returns:</span>\n{\n <span style=\"color:#98c379;\">\"entries\"</span>: [\n { <span style=\"color:#98c379;\">\"type\"</span>: <span style=\"color:#98c379;\">\"kontask\"</span>, <span style=\"color:#98c379;\">\"id\"</span>: <span style=\"color:#98c379;\">\"...\"</span>, <span style=\"color:#98c379;\">\"title\"</span>: <span style=\"color:#98c379;\">\"...\"</span>,\n <span style=\"color:#98c379;\">\"topic\"</span>: <span style=\"color:#98c379;\">\"feature\"</span>, <span style=\"color:#98c379;\">\"domain\"</span>: <span style=\"color:#98c379;\">\"frontend\"</span>,\n <span style=\"color:#98c379;\">\"threadId\"</span>: <span style=\"color:#98c379;\">\"...\"</span>, <span style=\"color:#98c379;\">\"threadDepth\"</span>: <span style=\"color:#d19a66;\">0</span> },\n { <span style=\"color:#98c379;\">\"type\"</span>: <span style=\"color:#98c379;\">\"system_event\"</span>, <span style=\"color:#98c379;\">\"message\"</span>: <span style=\"color:#98c379;\">\"Konsole started\"</span> }\n ],\n <span style=\"color:#98c379;\">\"threads\"</span>: { <span style=\"color:#7f848e;\">/* thread grouping */</span> },\n <span style=\"color:#98c379;\">\"summary\"</span>: { <span style=\"color:#98c379;\">\"totalKontasks\"</span>: <span style=\"color:#d19a66;\">10</span>, <span style=\"color:#98c379;\">\"totalEvents\"</span>: <span style=\"color:#d19a66;\">3</span> }\n}\n</pre>\n\n<p style=\"color:#7f848e;margin-top:16px;font-style:italic;\">Then the MCP tool just calls this single endpoint and gets the full picture.</p>\n</div>",
"requestedAt": "2026-01-12T04:30:00.000Z",
"requestId": "382ee230-4665-40b6-b22f-5817f08c260a",
"choices": [
{
"label": "Create the API",
"value": "Create a new /api/gv/flow-timeline endpoint that returns merged kontasks + system events with thread grouping and topic/domain enrichment, then update the MCP tool to call it",
"primary": true
},
{
"label": "Just fix MCP tool",
"value": "Have the MCP tool call both existing APIs and merge them server-side in the handler, without creating a new endpoint"
}
],
"turnTiming": {
"totalMs": 50914,
"ttfeMs": 109,
"thinkingMs": 50805,
"toolExecutionMs": 0,
"toolCallCount": 0,
"thinkingPct": 100,
"toolsPct": 0,
"ttfePct": 0
}
},
"createdBy": "claude",
"createdAt": "2026-01-11T18:21:49.000Z",
"updatedAt": "2026-01-11T18:21:54.996Z",
"requestId": "382ee230-4665-40b6-b22f-5817f08c260a",
"scope": "greatvibe",
"tags": [
"mcp",
"timeline",
"api"
],
"sessionId": "ses_286e2e28-97c"
}