Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7d8ec24
feat(firecrawl): add parse operation and revert short-input selection…
waleedlatif1 Apr 29, 2026
1a321c5
feat(fork): fork chat from any assistant message (#4343)
waleedlatif1 Apr 29, 2026
a9d4e2e
fix(trace): normalize keyed tool names and show credits in trace view…
waleedlatif1 Apr 29, 2026
6081670
fix(files): use incremental applyEdits to prevent streaming flicker i…
waleedlatif1 Apr 30, 2026
3674274
fix(cleanup): batch orphaned snapshot deletes to avoid slow-query spi…
waleedlatif1 Apr 30, 2026
0c69302
fix(integrations): harden jira, jsm, ashby, google drive, slack, conf…
waleedlatif1 Apr 30, 2026
541c1b5
fix(fork): scope task list invalidation to current workspace (#4350)
waleedlatif1 Apr 30, 2026
2bb5c91
improvement(kb-selector): add search to knowledge base selector subbl…
waleedlatif1 Apr 30, 2026
cb43b59
feat(fork): optimistic sidebar entry + Fork | prefix for forked tasks…
waleedlatif1 Apr 30, 2026
cb8ea3a
fix(fork): clear task selection before navigating to fork (#4356)
waleedlatif1 Apr 30, 2026
d94f4c9
feat(knowledge): add embedding model selection and Cohere reranker (#…
waleedlatif1 Apr 30, 2026
07e7670
improvement(sidebar): remove unnecessary useCallback and useMemo wrap…
waleedlatif1 Apr 30, 2026
7377a10
fix(custom-tool): include schema parameters in code wand prompt (#4360)
waleedlatif1 Apr 30, 2026
24de32b
fix(secrets): invalidate env queries so dropdown updates without refr…
waleedlatif1 Apr 30, 2026
b8959eb
improvement(repo): zod based client-server boundary (#4355)
icecrasher321 Apr 30, 2026
6b0de36
chore(skills): update checklist for boundary e2e checklist (#4363)
icecrasher321 Apr 30, 2026
d60747d
feat(mothership): draft persistence, new task eager creation, doc pre…
waleedlatif1 Apr 30, 2026
9109284
fix(settings): rename credentials to secrets, align role display (#4364)
waleedlatif1 Apr 30, 2026
49c1201
feat(ui): update context menu (#4362)
TheodoreSpeaks Apr 30, 2026
46d6b1d
fix(tasks): fix sidebar tasks skeleton hanging indefinitely (#4365)
waleedlatif1 Apr 30, 2026
dafeaaa
fix(ui): Add warning for organization-wide settings (#4366)
TheodoreSpeaks Apr 30, 2026
124fe17
improvement(toast): widen error toasts and bump line-clamp to 3 (#4370)
waleedlatif1 May 1, 2026
220f8c8
feat(knowledge): add chunking strategies and regex strict boundaries …
waleedlatif1 May 1, 2026
6080489
fix(ui): fix tasks loading being cancelled, disable fork button (#4371)
TheodoreSpeaks May 1, 2026
0c25fc4
fix(auth): resolve CORS errors for self-hosted deployments behind rev…
waleedlatif1 May 1, 2026
be9c959
improvement(types): enforce patterns outside just hooks directory and…
icecrasher321 May 1, 2026
8b6307a
feat(gmail): add edit draft and update label tools (#4374)
waleedlatif1 May 1, 2026
e2b3ae4
fix(terminal): correct error/cancel block status in logs panel (#4372)
waleedlatif1 May 1, 2026
ea2b6ab
improvement(trace): billing trace span typing (#4375)
icecrasher321 May 1, 2026
47208e0
improvement(repo): reorganize contracts directory (#4376)
icecrasher321 May 1, 2026
a9c12a2
feat(tables): add export, import column creation, infinite row pagina…
waleedlatif1 May 1, 2026
b10b447
improvement(repo): update ship skills, flatten internal tools contrac…
icecrasher321 May 1, 2026
a7a941f
improvement(invites): remove confusing copy (#4380)
icecrasher321 May 1, 2026
94dd2e1
improvement(workflow): narrow zustand selectors and optimize log tree…
waleedlatif1 May 1, 2026
bdaf112
improvement(tables): bump column auto-fit cap from 600px to 1000px (#…
waleedlatif1 May 1, 2026
add55b4
improvement(executor): correctness-by-construction for workflow logs …
waleedlatif1 May 1, 2026
38aa163
fix(oauth): trim Atlassian OAuth scopes to fix CloudFront 414 (#4388)
waleedlatif1 May 1, 2026
da09a2a
improvement(mothership): reuse logs detail panel in resource view (#4…
waleedlatif1 May 1, 2026
cc28ba8
fix(mail): use html-to-text for plaintext email fallback (#4392)
waleedlatif1 May 2, 2026
39c6aef
fix(files): unstick monaco find widget tooltips and surface logs in m…
TheodoreSpeaks May 2, 2026
5863276
fix(csp): allow https images in markdown preview and html sandbox (#4…
waleedlatif1 May 2, 2026
9655e8e
improvement(home): anchor @-mention popup at caret and right-size dro…
waleedlatif1 May 2, 2026
50e118a
fix(serializer): apply tools.config.params before validating required…
waleedlatif1 May 2, 2026
af859cd
feat(workflows): lock/duplicate improvements for workflows (#4387)
icecrasher321 May 2, 2026
dc195d3
fix(loading): cursor positioning, render-phase defaultValue sync, rem…
waleedlatif1 May 2, 2026
8366a84
improvement(home): consolidate chat context kind icon registry (#4397)
waleedlatif1 May 2, 2026
9eb55e2
revert(short-input): remove selection:text-transparent (#4318) (#4398)
waleedlatif1 May 2, 2026
b0881de
improvement(lock): lock icon next to entity (#4401)
icecrasher321 May 2, 2026
778f4a5
revert(executor): undo correctness-by-construction for workflow logs …
waleedlatif1 May 2, 2026
5f3baa4
fix(file): zero byte codegen file format + zoomable preview wrapper +…
icecrasher321 May 2, 2026
db05297
feat(files): embed sim files and render mermaid diagrams in markdown …
waleedlatif1 May 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(terminal): correct error/cancel block status in logs panel (#4372)
* fix(terminal): correct error/cancel block status in logs panel

Three bugs in the workflow editor's terminal/logs panel where block
status diverged from the engine's truth on error paths:

1. **Errored block shown as "canceled"** — when the SSE 'add' mode
   produced a duplicate entry on block error and `cancelRunningEntries`
   then swept the original placeholder.
2. **Upstream blocks stuck on "Running"** — terminal events arrived
   before the engine's last block events under reconnect/timeout, so
   the live panel never received the per-block terminal state.
3. **Phantom "Run Error" pseudo-row** — the failing block rendered as
   "canceled" while a synthetic row carried the real error text.

Fixes:

- **Fix B** (`addConsoleErrorEntry`): when a running placeholder exists
  for `(blockId, executionId)`, route through `updateConsoleErrorEntry`
  instead of creating a second entry. Aligns 'add' mode with the
  existing 'update' mode behavior.
- **Fix C** (`reconcileFinalBlockLogs`): terminal SSE events now carry
  `finalBlockLogs` (server-authoritative snapshot). On
  execution:error / execution:cancelled, reconcile any still-running
  entries with their server-side terminal state. Recovers correctness
  on network drop, server timeout/abort, and reconnect-resume paths
  where individual block:* events may not have reached the client.
- **Fix D** (`addExecutionErrorConsoleEntry`): cross-check
  `useTerminalConsoleStore` for entries with `error` set scoped to the
  executionId before emitting the synthetic "Run Error" row. Suppresses
  the phantom row when the failing block already carries the message.
- **Signature refactor**: `handleExecutionErrorConsole` /
  `handleExecutionCancelledConsole` now take a typed
  `ExecutionConsoleDeps` object instead of stacking positional deps —
  matches the existing `createBlockEventHandlers(config, deps)`
  precedent in the same file.

Tests:

- 12 tests in `workflow-execution-utils.test.ts` covering Fix B/C/D and
  the deps-object signature refactor.
- Centralized terminal-console store mock in `@sim/testing` so future
  tests can stub the store without per-file boilerplate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(terminal): wire copilot cancellation to finalBlockLogs reconciliation

Address Greptile review:

- `executeWorkflowWithFullLogging`'s `onExecutionCancelled` was `() => {}`
  and silently dropped the `finalBlockLogs` payload, so Bug 2's "upstream
  blocks stuck on Running" fix did not fire on copilot-initiated
  cancellations. Wire it through `handleExecutionCancelledConsole` to
  match the SSE-route `onExecutionCancelled` path.
- Test for the `blockType !== 'error'` filter used a different
  `executionId` than the seeded entry, so the executionId scope rejected
  the entry before the blockType predicate ran. Align executionIds so
  the test actually exercises the filter.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(terminal): pass durationMs in reconnect cancellation handler

Reconnect-resume `onExecutionCancelled` was forwarding `finalBlockLogs`
but not `data?.duration`, so the "Run Cancelled" entry rendered with a
0ms duration. Match the other two `handleExecutionCancelledConsole`
callsites.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
  • Loading branch information
waleedlatif1 and claude authored May 1, 2026
commit e2b3ae43e3413334ec67324a9676c609722c8976
3 changes: 3 additions & 0 deletions apps/sim/app/api/workflows/[id]/execute/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,7 @@ async function handleExecutePost(
data: {
error: timeoutErrorMessage,
duration: result.metadata?.duration || 0,
finalBlockLogs: result.logs,
},
})
finalMetaStatus = 'error'
Expand All @@ -1178,6 +1179,7 @@ async function handleExecutePost(
workflowId,
data: {
duration: result.metadata?.duration || 0,
finalBlockLogs: result.logs,
},
})
finalMetaStatus = 'cancelled'
Expand Down Expand Up @@ -1242,6 +1244,7 @@ async function handleExecutePost(
data: {
error: executionResult?.error || errorMessage,
duration: executionResult?.metadata?.duration || 0,
finalBlockLogs: executionResult?.logs,
},
})
finalMetaStatus = 'error'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,25 +218,31 @@ export function useWorkflowExecution() {
durationMs?: number
blockLogs: BlockLog[]
isPreExecutionError?: boolean
finalBlockLogs?: BlockLog[]
}) => {
if (!params.workflowId) return
sharedHandleExecutionErrorConsole(addConsole, cancelRunningEntries, {
...params,
workflowId: params.workflowId,
})
sharedHandleExecutionErrorConsole(
{ addConsole, updateConsole, cancelRunningEntries },
{ ...params, workflowId: params.workflowId }
)
},
[addConsole, cancelRunningEntries]
[addConsole, cancelRunningEntries, updateConsole]
)

const handleExecutionCancelledConsole = useCallback(
(params: { workflowId?: string; executionId?: string; durationMs?: number }) => {
(params: {
workflowId?: string
executionId?: string
durationMs?: number
finalBlockLogs?: BlockLog[]
}) => {
if (!params.workflowId) return
sharedHandleExecutionCancelledConsole(addConsole, cancelRunningEntries, {
...params,
workflowId: params.workflowId,
})
sharedHandleExecutionCancelledConsole(
{ addConsole, updateConsole, cancelRunningEntries },
{ ...params, workflowId: params.workflowId }
)
},
[addConsole, cancelRunningEntries]
[addConsole, cancelRunningEntries, updateConsole]
)

const buildBlockEventHandlers = useCallback(
Expand Down Expand Up @@ -1222,6 +1228,7 @@ export function useWorkflowExecution() {
durationMs: data.duration,
blockLogs: accumulatedBlockLogs,
isPreExecutionError,
finalBlockLogs: data.finalBlockLogs,
})

if (activeWorkflowId && !isExecutingFromChat) {
Expand All @@ -1248,6 +1255,7 @@ export function useWorkflowExecution() {
workflowId: activeWorkflowId,
executionId: executionIdRef.current,
durationMs: data?.duration,
finalBlockLogs: data?.finalBlockLogs,
})

if (activeWorkflowId && !isExecutingFromChat) {
Expand Down Expand Up @@ -1735,6 +1743,7 @@ export function useWorkflowExecution() {
error: data.error,
durationMs: data.duration,
blockLogs: accumulatedBlockLogs,
finalBlockLogs: data.finalBlockLogs,
})

setCurrentExecutionId(workflowId, null)
Expand All @@ -1747,6 +1756,7 @@ export function useWorkflowExecution() {
workflowId,
executionId: executionIdRef.current,
durationMs: data?.duration,
finalBlockLogs: data?.finalBlockLogs,
})

setCurrentExecutionId(workflowId, null)
Expand Down Expand Up @@ -1995,9 +2005,10 @@ export function useWorkflowExecution() {
executionId: capturedExecutionId,
error: data.error,
blockLogs: accumulatedBlockLogs,
finalBlockLogs: data.finalBlockLogs,
})
},
onExecutionCancelled: () => {
onExecutionCancelled: (data) => {
reconnectionComplete = true
activeReconnections.delete(reconnectWorkflowId)
if (!activated) {
Expand All @@ -2014,6 +2025,8 @@ export function useWorkflowExecution() {
handleExecutionCancelledConsole({
workflowId: reconnectWorkflowId,
executionId: capturedExecutionId,
durationMs: data?.duration,
finalBlockLogs: data?.finalBlockLogs,
})
},
},
Expand Down
Loading
Loading