You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cancelled runs: Distinct status badge/color in runs table
Graphs with active runs: Warning indicator if deletion would affect active runs
Use Cases
Use Case 1: Remove Deprecated Graph
Scenario: User has an old graph template that's been replaced by a newer version.
User action:
Navigate to Graph Templates
Open the old graph template
Click "Delete" button
Review confirmation dialog showing "15 runs exist for this graph"
Confirm deletion
Graph is removed from the system
Expected outcome: Graph template is deleted. Historical runs remain for reference but no new executions can be triggered.
Use Case 2: Stop Long-Running Test Execution
Scenario: User triggered a test run that's taking too long or is no longer needed.
User action:
Navigate to Runs table
Find the running execution
Click "Cancel" button on the run row
Review confirmation showing "8 states pending"
Confirm cancellation
Run is cancelled
Expected outcome: Run status changes to "Cancelled". Pending states are marked as cancelled and won't be executed. Completed states remain visible for reference.
Use Case 3: Clean Up Failed Test Runs
Scenario: User has multiple failed test runs cluttering the runs table.
User action:
Navigate to Runs table
Filter or select multiple failed runs
Use bulk cancel/delete action (future enhancement)
Confirm bulk operation
Expected outcome: Selected runs are cancelled or marked for cleanup.
Use Case 4: Delete Graph with Active Executions
Scenario: User wants to delete a graph but there are currently running executions.
User action:
Navigate to Graph Templates
Attempt to delete graph with active runs
See warning: "Cannot delete: 3 active executions in progress"
Option to cancel active runs first, then delete
Or wait for executions to complete, then delete
Expected outcome: User is informed about active executions and guided on how to proceed.
Acceptance Criteria
Delete Graph Template
Delete button/action available in Graph Template UI
Confirmation dialog shows graph details and impact
Warning displayed if graph has active runs
Graph template is removed from system after confirmation
Success message displayed after deletion
Deleted graph no longer appears in graph lists
Historical runs remain accessible (not deleted)
Cancel Execution
Cancel button available in Runs Table for runs with pending states
Cancel button only shown for cancellable runs (has pending states)
Confirmation dialog shows run details and pending state count
Run status changes to "Cancelled" after confirmation
Pending states are marked as cancelled
Success message displayed after cancellation
Cancelled runs are clearly distinguished in UI
Completed states remain visible (not deleted)
UI/UX
Destructive actions (delete, cancel) use appropriate styling (red/warning colors)
Confirmation dialogs prevent accidental actions
Clear feedback messages for success and error cases
Loading states shown during operations
Error handling with user-friendly messages
Actions are accessible from relevant UI locations
Edge Cases
Handle deletion of graph with no runs
Handle cancellation of run with no pending states (button disabled)
Handle cancellation of already completed run (show appropriate message)
Handle network errors during deletion/cancellation
Handle concurrent operations (multiple users)
Non-Goals
Bulk operations – Single graph/run operations only (bulk can be future enhancement)
API-only operations – Focus on UI, API changes are implementation detail
Automatic cleanup – Manual user-initiated actions only
State-level cancellation – Cancel entire runs, not individual states
Recovery/undo – Deletions and cancellations are permanent (with appropriate warnings)
Open Questions
Soft delete vs hard delete: Should deleted graphs be recoverable, or permanently removed?
Run cleanup: Should cancelled runs be automatically cleaned up after some time, or remain forever?
Permissions: Should there be role-based access control for delete/cancel operations?
Audit trail: Should deletions and cancellations be logged/audited for compliance?
Cascading effects: If a graph is deleted, what happens to scheduled triggers (cron jobs)?
Partial cancellation: Can users cancel specific states within a run, or only the entire run?
Additional Notes
This feature focuses on user-facing functionality and UI/UX, not implementation details
Implementation should ensure data consistency and proper cleanup of resources
Add UI-based feature to cancel graph templates and pending executions.
Motivation
Current State
What Exists
Current Limitations
Proposed Solution
Feature 1: Delete Graph Template
Allow users to delete graph templates from the dashboard. This should:
Feature 2: Cancel Pending Executions
Allow users to cancel running or pending executions (runs) from the dashboard. This should:
User Experience
Delete Graph Template Flow
Cancel Execution Flow
Visual Indicators
Use Cases
Use Case 1: Remove Deprecated Graph
Scenario: User has an old graph template that's been replaced by a newer version.
User action:
Expected outcome: Graph template is deleted. Historical runs remain for reference but no new executions can be triggered.
Use Case 2: Stop Long-Running Test Execution
Scenario: User triggered a test run that's taking too long or is no longer needed.
User action:
Expected outcome: Run status changes to "Cancelled". Pending states are marked as cancelled and won't be executed. Completed states remain visible for reference.
Use Case 3: Clean Up Failed Test Runs
Scenario: User has multiple failed test runs cluttering the runs table.
User action:
Expected outcome: Selected runs are cancelled or marked for cleanup.
Use Case 4: Delete Graph with Active Executions
Scenario: User wants to delete a graph but there are currently running executions.
User action:
Expected outcome: User is informed about active executions and guided on how to proceed.
Acceptance Criteria
Delete Graph Template
Cancel Execution
UI/UX
Edge Cases
Non-Goals
Open Questions
Additional Notes