Implementation: How to implement focused API activity recording for debuggin...
Documentation for Sessions
⚙️ Implementation: How to implement focused API activity recording for debuggin...
Date: 2026-03-17
Time: 18:27:58 UTC
Session: gspace1-229.10
Agent: backend
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How to implement focused API activity recording for debugging specific flows?
Task: Not specified
🎯 Decision Made
Chosen:
Frontend-only recording session using the existing backend
sincequery parameter. Click Record → saves startTime, setssincefilter on all polls to only show records created after that moment. Click Stop → freezes the current data as a snapshot, pauses live polling. User can then export the recording as JSON or discard to return to live mode. Zero backend changes needed.
Options Considered:
- Backend recording sessions with session IDs (overengineered)
- Frontend-only using existing
sinceparam (chosen — zero backend changes) - WebSocket streaming with client-side accumulation (complex, new transport)
💭 Reasoning
The backend already has a since parameter on the activity endpoint. A 'recording' is simply constraining the time window to [recordStart, now]. This is the simplest possible implementation with maximum value: developers can say 'I'm about to test the checkout flow', click Record, perform the action, click Stop, and see exactly what happened with no noise from unrelated requests. The alternative (backend-side recording sessions with session IDs) adds unnecessary complexity — the filtering already exists, we just need a UI affordance to use it.
📁 Files Involved
libs/libs-structural/api-tools/src/lib/components/pages/api-tools-overview/api-tools-overview.component.ts
🔗 Related
- Decision ID:
dev_1773772078319_0pyei6h - Session: 229
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation