improvement(ui): remove anti-patterns, fix follow-up auto-scroll, move CopyCodeButton to emcn#4148
improvement(ui): remove anti-patterns, fix follow-up auto-scroll, move CopyCodeButton to emcn#4148waleedlatif1 merged 16 commits intostagingfrom
Conversation
…to-scroll, move CopyCodeButton to emcn
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Logs UI gets better cancellation feedback. The logs view introduces a UI cleanup / component moves. Reviewed by Cursor Bugbot for commit abf4b5a. Configure here. |
Greptile SummaryThis PR removes anti-patterns, fixes follow-up auto-scroll in the Mothership chat by reverting the streaming guard on Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant CancelRoute as POST /cancel
participant Redis as markExecutionCancelled
participant LocalAbort as abortManualExecution
participant DB as cancelPausedExecution
participant EventBuffer
Client->>CancelRoute: POST cancel
CancelRoute->>Redis: markExecutionCancelled(executionId)
CancelRoute->>LocalAbort: abortManualExecution(executionId)
CancelRoute->>DB: cancelPausedExecution(executionId)
Note over DB: Sets status=cancelled, endedAt=now
alt durablyRecorded
CancelRoute-->>Client: success (Redis path)
else locallyAborted
CancelRoute-->>Client: success (in-process path)
else pausedCancelled
CancelRoute->>EventBuffer: setExecutionMeta + write execution:cancelled
CancelRoute-->>Client: success (DB direct path)
else none succeeded
CancelRoute-->>Client: "success=false"
end
Reviews (8): Last reviewed commit: "fix(hitl): add .catch() to fire-and-forg..." | Re-trigger Greptile |
…p scroll root cause
|
@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 77f2b27. Configure here.
|
@greptile |
|
@cursor review |
…y override ghost variant
|
@greptile |
|
@greptile |
|
@cursor review |
Paused HITL executions are idle in the DB — they don't poll Redis or run in-process, so the existing cancel signals had no effect. The DB status stayed 'pending', causing the optimistic 'cancelling' update to revert on refetch. - Add PauseResumeManager.cancelPausedExecution: atomically sets paused_executions.status and workflow_execution_logs.status to 'cancelled' inside a FOR UPDATE transaction - Guard enqueueOrStartResume against resuming a cancelled execution - Include pausedCancelled in the cancel route success check
- Mock PauseResumeManager.cancelPausedExecution to prevent DB calls - Add pausedCancelled to all expected response objects - Add test for HITL paused execution cancellation path - Add missing auth/authz tests - Switch to vi.hoisted pattern for all mocks
|
@greptile |
|
@cursor review |
Without endedAt, the logs API running filter (isNull(endedAt)) would keep cancelled paused executions in the running view indefinitely.
|
@greptile |
|
@cursor review |
apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts
Outdated
Show resolved
Hide resolved
…aused execution Paused HITL executions have no active SSE stream, so the canvas never received the cancellation event. Now writes execution:cancelled to the event buffer and updates the stream meta so the canvas reconnect path picks it up and shows 'Execution Cancelled'.
…ellation Wrap cancelPausedExecution in try/catch so a DB error does not mask a prior successful Redis or in-process cancellation. Also move the resource-collapse side effect in home.tsx to a useEffect to avoid the stale closure on the resources array.
|
@greptile |
|
@cursor review |
apps/sim/app/api/workflows/[id]/executions/[executionId]/cancel/route.ts
Show resolved
Hide resolved
|
@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 abf4b5a. Configure here.
Summary
use-auto-scrollto catch the DOM expansionCopyCodeButtonfromcomponents/uiintocomponents/emcn/components/code, exported from the emcn barrel, nudged slightly right in code block headersType of Change
Testing
Tested manually
Checklist