Uh oh!
There was an error while loading. Please reload this page.
improvement(ui): remove anti-patterns, fix follow-up auto-scroll, move CopyCodeButton to emcn - #4148
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 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…p scroll root cause
waleedlatif1
commented
Apr 14, 2026
waleedlatif1
commented
Apr 14, 2026
@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.
waleedlatif1
commented
Apr 14, 2026
waleedlatif1
commented
Apr 14, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
…y override ghost variant
waleedlatif1
commented
Apr 14, 2026
waleedlatif1
commented
Apr 14, 2026
waleedlatif1
commented
Apr 14, 2026
@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
waleedlatif1
commented
Apr 14, 2026
waleedlatif1
commented
Apr 14, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Without endedAt, the logs API running filter (isNull(endedAt)) would keep cancelled paused executions in the running view indefinitely.
waleedlatif1
commented
Apr 14, 2026
waleedlatif1
commented
Apr 14, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
…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.
waleedlatif1
commented
Apr 14, 2026
waleedlatif1
commented
Apr 14, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Apr 14, 2026
waleedlatif1
commented
Apr 14, 2026
@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.
Uh oh!
There was an error while loading. Please reload this page.
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