Fix Sessions Endpoint in Activity Feed · Entire

Summary

The /me/sessions data is rendered only on the Overview (dashboard/home) page. The React frontend does not call /me/sessions directly — it calls the BFF cache route GET /api/v1/cache/user/sessions?timeframe=…&limit=…, which proxies to the home API's me/sessions and otherwise serves the identical handler locally.

1. Which route/page renders the list

2. Fields displayed per session ROW

Important: although the API envelope carries token and attribution fields, the frontend UserSession type drops them — api.ts only maps: sessionId, displayName, isPublic, agent, model, prompt, startedAt, lastActivityAt, checkpointCount, stepCount, org, repo, repoFullName, isPrivate. And of those, the row renders only a subset. prompt, stepCount, startedAt, customName, firstCommitAuthorUsername, and all token/attribution counts are not shown in the row.

The row JSX (RecentSessionsList.tsx lines 67–104):

const agentConfig = getAgent(session.agent)
const modelLabel = formatModel(session.model)
const title =
  session.displayName.length > 120
    ? `${session.displayName.slice(0, 120)}...`
    : session.displayName

<ListViewItem
  href={`/gh/${org}/${repo}/session/${sessionId}`}
  ...
>
  <span className="flex min-w-0 flex-1 items-center gap-2 md:flex-initial">
    <span className="truncate text-sm font-medium text-default">{title}</span>
    {session.isPublic && <PublicSessionBadge />}
  </span>
  <span className="shrink-0 text-xs text-muted">{session.repoFullName}</span>
  <span aria-hidden className="basis-full md:hidden" />
  <span className="... font-mono text-xs text-muted md:ml-auto ...">
    <AgentBadge agent={session.agent} className="shrink-0" />
    <span className="shrink-0 md:w-28 md:truncate md:text-right" title={modelLabel || undefined} ...>
      {modelLabel ?? ""}
    </span>
    <span className="shrink-0 md:w-28 md:text-right">
      {session.checkpointCount}{