Parent Issue
Part of #500 — depends on #501 (sessions CRUD API)
Context
There is currently no way to navigate to interactive sessions in the web-ui. This issue adds the /sessions page (a list of past and active sessions for the current workspace) and a sidebar navigation entry so users can discover and access it.
What to Build
1. New page: web-ui/src/app/sessions/page.tsx
Layout:
Sessions [+ New Session]
──────────────────────────────────────────────────
Search...
┌──────────────────────────────────────────────────┐
│ 🟢 Session #a3f2 · active │
│ workspace/myproject · claude-sonnet-4-6 │
│ Started 5 minutes ago · $0.012 │
│ [Resume →] │
└──────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────┐
│ ⚪ Session #b1e7 · ended │
│ workspace/myproject · claude-sonnet-4-6 │
│ Ended 2 hours ago · $0.047 │
│ [View →] │
└──────────────────────────────────────────────────┘
Data fetching:
GET /api/v2/sessions?workspace_path=<current> via SWR with 10s revalidation
- Filter active sessions (state =
active) and ended sessions separately
- Show active sessions first
Session card:
- State dot: green (active), gray (ended/paused)
- Session short ID (last 8 chars of UUID)
- Workspace path (basename only)
- Model name
- Relative start time + elapsed duration
- Cost so far
- [Resume →] for active, [View →] for ended — both link to
/sessions/[id]
- [End] button for active sessions (calls
DELETE /api/v2/sessions/{id}, confirms first)
New Session button:
- Opens a small modal/dialog:
- Workspace path (pre-filled from current workspace, editable)
- Model selector (dropdown: claude-sonnet-4-6, claude-opus-4-6, claude-haiku-4-5)
- [Start Session] →
POST /api/v2/sessions → redirect to /sessions/[id]
Empty state:
- Icon + "No sessions yet" + "Start a session to chat with your agent interactively"
Loading state:
- Skeleton cards (2–3 animate-pulse placeholders)
2. Sidebar navigation entry (web-ui/src/components/layout/AppSidebar.tsx)
Add "Sessions" as the 5th nav item (after Execution, before Blockers):
{ href: "/sessions", label: "Sessions", icon: MessageSquareIcon }
- Use appropriate Hugeicon (e.g.,
MessageMultiple01Icon or similar chat icon)
- Add active badge with count of active sessions (poll
GET /api/v2/sessions?state=active every 30s — same pattern as blocker badge)
3. New layout file: web-ui/src/app/sessions/layout.tsx (if needed)
Standard page layout following the pattern of other pages.
Acceptance Criteria
Notes
- Reuse existing card patterns from
TaskCard or workspace components for consistency
- Workspace path comes from
getSelectedWorkspacePath() (existing localStorage helper)
Parent Issue
Part of #500 — depends on #501 (sessions CRUD API)
Context
There is currently no way to navigate to interactive sessions in the web-ui. This issue adds the
/sessionspage (a list of past and active sessions for the current workspace) and a sidebar navigation entry so users can discover and access it.What to Build
1. New page:
web-ui/src/app/sessions/page.tsxLayout:
Data fetching:
GET /api/v2/sessions?workspace_path=<current>via SWR with 10s revalidationactive) and ended sessions separatelySession card:
/sessions/[id]DELETE /api/v2/sessions/{id}, confirms first)New Session button:
POST /api/v2/sessions→ redirect to/sessions/[id]Empty state:
Loading state:
2. Sidebar navigation entry (
web-ui/src/components/layout/AppSidebar.tsx)Add "Sessions" as the 5th nav item (after Execution, before Blockers):
MessageMultiple01Iconor similar chat icon)GET /api/v2/sessions?state=activeevery 30s — same pattern as blocker badge)3. New layout file:
web-ui/src/app/sessions/layout.tsx(if needed)Standard page layout following the pattern of other pages.
Acceptance Criteria
/sessionspage lists sessions from API, sorted active first/sessions/[id]/sessionsNotes
TaskCardor workspace components for consistencygetSelectedWorkspacePath()(existing localStorage helper)