[AgentOps] session page support ui & backend#459
Merged
XinweiHe merged 5 commits intotraceroot-ai:pivot/agentopsfrom Mar 2, 2026
Merged
[AgentOps] session page support ui & backend#459XinweiHe merged 5 commits intotraceroot-ai:pivot/agentopsfrom
XinweiHe merged 5 commits intotraceroot-ai:pivot/agentopsfrom
Conversation
Greptile SummaryAdded sessions feature that groups traces by Key Changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SessionsPage as Sessions Page
participant useSessions as useSessions Hook
participant API as Sessions API
participant Router as Sessions Router
participant Service as TraceReaderService
participant CH as ClickHouse
User->>SessionsPage: Navigate to /sessions
SessionsPage->>useSessions: Fetch sessions list
useSessions->>API: getSessions(projectId, options)
API->>Router: GET /api/v1/projects/{id}/sessions
Router->>Service: list_sessions(project_id, page, filters)
Service->>CH: Query traces grouped by session_id
CH-->>Service: Aggregated session data
Service->>CH: Backfill I/O from spans (if needed)
CH-->>Service: Span I/O data
Service-->>Router: Session list with metadata
Router-->>API: SessionListResponse
API-->>useSessions: Session data
useSessions-->>SessionsPage: Render table
User->>SessionsPage: Click session row
SessionsPage->>SessionDetailPanel: Open panel with sessionId
SessionDetailPanel->>API: getSession(projectId, sessionId)
API->>Router: GET /api/v1/projects/{id}/sessions/{sessionId}
Router->>Service: get_session(project_id, session_id)
Service->>CH: Query all traces for session
CH-->>Service: Trace list
Service->>CH: Backfill trace I/O from spans (if empty)
CH-->>Service: Span I/O data
Service->>CH: Get token totals from spans
CH-->>Service: Token counts
Service-->>Router: Session detail with traces
Router-->>API: SessionDetailResponse
API-->>SessionDetailPanel: Display traces chronologically
Last reviewed commit: 7e6a3d2 |
d9499a4 to
ba88340
Compare
Collaborator
|
@greptile review |
XinweiHe
approved these changes
Mar 2, 2026
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add sessions feature — list and detail pages for viewing grouped traces by session ID.
#413
#414
Type of Change
Details
Backend
GET /api/v1/projects/{project_id}/sessions(list) andGET /api/v1/projects/{project_id}/sessions/{session_id}(detail)list_sessions()andget_session()toTraceReaderService, with ClickHouse queries that GROUP BYsession_idand aggregate trace/token statsinput/outputis empty ({}or NULL), the service backfills from span data usingargMin/argMaxSessionListItem,SessionDetailResponse, etc.)Frontend
react18-json-viewwith a lightweight custom tree renderer — displays JSON as indented key-value pairs with collapsible nodes, no curly braces (collapsed previews show{3 keys}/Array(2))getSessions(),getSession(),useSessions(),useSession()Screenshots / Recordings (if applicable)
Checklist