Files
headquarter/openspec/changes/tool-session-progress-and-updates/specs/sessions-hub/spec.md
T
Developer 7440720b7b feat: implement tool-session progress panel and live list updates
- Add SessionOperationsContext + SessionProgressPanel for global,
  non-blocking lifecycle progress (create/start/stop/restart/delete/
  recreate-tunnel) driven by SSE events.
- Promote SessionsContext to authoritative shared session state with
  refresh, addOrUpdateSession, and removeSession helpers.
- Wire AppShell, DashboardPage, SessionsPage, useInstanceActions,
  ToolStarter, and InstanceList into shared state so lists update
  immediately after create/delete without manual refresh.
- Remove legacy blocking overlays from CreateSessionForm, SessionCard,
  and InstanceList; keep disabled states and inline spinners only.
- Update DashboardPage tests to wrap with SessionsProvider and
  SessionOperationsProvider.
- Add .cache/ to .gitignore.

Quality gates: npm run typecheck, npm run lint, npm test -- --run
(82 passed).
2026-06-12 13:19:58 +00:00

34 lines
1.6 KiB
Markdown

## ADDED Requirements
### Requirement: New sessions appear in lists immediately
The system SHALL add a newly created session to every session list as soon as the creation API returns.
#### Scenario: Create session from floating button
- **WHEN** the user starts a tool from the global floating action button
- **THEN** the modal closes
- **AND** the new session appears on the dashboard and sessions page with status "pending" or "building"
- **AND** the active session count in the navigation updates immediately
#### Scenario: Create session from repository detail
- **WHEN** the user launches a tool inside a repository/workspace detail page
- **THEN** the new session appears in the repository instance list
- **AND** the global session lists update without requiring a manual refresh
### Requirement: Global session state is authoritative
The system SHALL use a single shared session state for the navigation sidebar, dashboard, and sessions page.
#### Scenario: Shared state updated
- **WHEN** a session is added, removed, or changed
- **THEN** the navigation badge, dashboard, and sessions page all reflect the change
- **AND** no page reload is required
## MODIFIED Requirements
### Requirement: Sessions page loads sessions
**FROM:** Sessions page fetches `/users/me/sessions` independently on mount.
**TO:** Sessions page reads sessions from the shared `SessionsContext`; the context fetches on mount and exposes a refresh function.
### Requirement: Dashboard page loads sessions
**FROM:** Dashboard page fetches `/users/me/sessions` independently on mount.
**TO:** Dashboard page reads sessions from the shared `SessionsContext`.