Repository navigation
Feature: Add agent details, sessions and code snippet - #529
Conversation
🦋 Changeset detectedLatest commit: c841547 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ove session state management. Update AgentSessionsFilters to load all agents in pagination. Adjust matchLocation function to accept an object for better readability. Add tests for AgentSessionsFilters and enhance existing tests for AgentDetailsPage and ThreadListContainer.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c841547. Configure here.
| if (matched == null || matched.type !== 'root') return matched; | ||
| const { agentId } = readSessionShareSearch(search); | ||
| return agentId != null ? { type: 'libraryAgent', agentId } : matched; | ||
| } |
There was a problem hiding this comment.
Sessions share query opens agent details
High Severity
matchLocation promotes any root URL with agentId to a library-agent place and never reads view=sessions. With withRouter, boot then calls openLibraryAgent, which closes the sessions browser. Share links of the form ?view=sessions&agentId= (the no-router Sessions URL, including an agent filter) therefore open that agent's details instead of the all-user Sessions page.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit c841547. Configure here.
| {agent.name} | ||
| </option> | ||
| ); | ||
| })} |
There was a problem hiding this comment.
Agent filter sends name as ID
Medium Severity
The Sessions agent dropdown uses agent.agentId ?? agent.name as the listSessions agentId. agentId is optional on library rows (the library only enables details when it is present), so picking an agent that only has a name sends a display name to an ID filter. The list then comes back empty or the request fails, even when that agent has sessions.
Reviewed by Cursor Bugbot for commit c841547. Configure here.


Summary
Ships the agent library as a full-page experience with Overview / Use In Code / Sessions, plus a sidebar Sessions with metrics and an event timeline.
Changes
/library,/library/:agentId)AgentSessionsServerclient.internal.agents.getCodeSnippetsinstead of rawclient.fetchHow was this tested?
Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Medium Risk
Large new surface area (routing, URL state, session/event fetching) and new runtime dependencies (
chart.js), but changes are mostly additive behind optionalsessionsand library capabilities rather than altering core chat send/receive paths.Overview
Turns the Agents Library from a modal into a shell overlay (sidebar Sessions entry included), with routed
/library,/library/:agentId, and/sessionswhenwithRouteris on. Agent rows can open detail pages with Overview, Sessions, and Use In Code tabs driven by shareable query state (?tab=,?view=sessions, filters, session links).Introduces an optional
AgentSessionsServerport (wired in the TrueForge adapter viacreateHarnessAgentSessionsServer, includinggetCodeSnippetsthroughclient.internal.agents.getCodeSnippets). The Sessions experience is a shared two-pane list + metrics strip, Chart.js event timeline, and read-only turn transcript projection; layouts and thread list navigation close library/sessions overlays when returning to chat.Routing sync now sanitizes shell-owned query keys across places;
LibrarySessionShareBootdeep-links library agents and the sessions browser without requiring the router. New UI is slot-overridable (documented + Cursor rule), with tooltip upgrades for timeline hovers and a small adapter fix to absolutize relative SDKbaseUrlfor Bearer auth.Reviewed by Cursor Bugbot for commit c841547. Bugbot is set up for automated code reviews on this repo. Configure here.