7440720b7b
- 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).
45 lines
2.2 KiB
Markdown
45 lines
2.2 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Lifecycle actions show structured progress
|
|
The system SHALL display non-blocking, structured progress feedback for every tool lifecycle action (create, start, stop, restart, delete, recreate tunnel).
|
|
|
|
#### Scenario: Create a new session
|
|
- **WHEN** the user creates a session
|
|
- **THEN** a global progress indicator appears showing the current backend step
|
|
- **AND** the indicator advances through Created, Building, Starting, Probing, and Running/Error based on SSE events
|
|
|
|
#### Scenario: Delete a session
|
|
- **WHEN** the user deletes a session
|
|
- **THEN** the session disappears from the current list immediately
|
|
- **AND** the global progress indicator shows "Deleting…" until the backend confirms deletion via SSE or API response
|
|
|
|
#### Scenario: Stop or restart a session
|
|
- **WHEN** the user stops or restarts a session
|
|
- **THEN** the global progress indicator shows the action in progress
|
|
- **AND** the indicator updates when the backend publishes the corresponding SSE event
|
|
|
|
### Requirement: Remove blocking progress overlays
|
|
The system SHALL NOT dim the entire form or card with a generic spinner while an action is in progress.
|
|
|
|
#### Scenario: Create session form submission
|
|
- **WHEN** the create session form is submitted
|
|
- **THEN** form controls are disabled
|
|
- **AND** no full-screen overlay blocks the rest of the application
|
|
- **AND** progress is shown in the global progress panel
|
|
|
|
#### Scenario: Card action in progress
|
|
- **WHEN** a session card action is triggered
|
|
- **THEN** the relevant button is disabled or shows a small inline spinner
|
|
- **AND** the card itself remains fully visible and interactive for other sessions
|
|
|
|
## MODIFIED Requirements
|
|
|
|
### Requirement: Deleted sessions disappear from UI immediately
|
|
**FROM:** The system SHALL update the frontend state immediately after a session is successfully deleted.
|
|
**TO:** The system SHALL remove the session from all visible lists optimistically when the delete API call succeeds, and reconcile via shared state.
|
|
|
|
#### Scenario: Delete session from any page
|
|
- **WHEN** the user deletes a session
|
|
- **THEN** the session is removed from the nav sidebar, dashboard, and sessions page without a reload
|
|
- **AND** a failure re-adds the session to the list and shows an error
|