feat(logs): add cancel execution to log row context menu#4130
feat(logs): add cancel execution to log row context menu#4130waleedlatif1 merged 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Wires the logs page to a new Reviewed by Cursor Bugbot for commit 1dce08a. Configure here. |
Greptile SummaryThis PR adds a "Cancel Execution" option to the log row context menu, visible only for Confidence Score: 5/5Safe to merge — all P0/P1 concerns from prior reviews are resolved; only a P2 UX suggestion remains. Both prior review issues (silent success-false passthrough and overly broad cache invalidation) have been addressed. The single remaining finding is a P2 style suggestion about adding an onError toast — it does not affect correctness or data integrity. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
actor User
participant Menu as LogRowContextMenu
participant Logs as logs.tsx
participant Hook as useCancelExecution
participant API as /api/workflows/{id}/executions/{id}/cancel
participant QC as QueryClient
User->>Menu: Right-click running log
Menu->>Menu: isRunning check (status=running + executionId + workflowId)
Menu-->>User: Show Cancel Execution item
User->>Menu: Click Cancel Execution
Menu->>Logs: onCancelExecution()
Logs->>Hook: cancelExecution.mutate({ workflowId, executionId })
Menu-->>User: Menu closes (Radix default)
Hook->>API: POST /cancel
alt res.ok && data.success
API-->>Hook: { success: true }
Hook->>QC: onSettled - invalidate lists, details, stats
QC-->>Logs: Refetch - log status updated
else failure
API-->>Hook: !res.ok or { success: false }
Hook->>QC: onSettled - invalidate lists, details, stats (still fires)
Note over Logs,User: No error feedback shown to user
end
Reviews (2): Last reviewed commit: "fix(logs): check success response and us..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 64424a0. Configure here.
Summary
/api/workflows/{id}/executions/{executionId}/cancel) to the logs UIuseCancelExecutionmutation hook with full log cache invalidationType of Change
Testing
Tested manually
Checklist