René's URL Explorer Experiment


Title: fix(terminal): correct error/cancel block status in logs panel by waleedlatif1 · Pull Request #4372 · simstudioai/sim · GitHub

Open Graph Title: fix(terminal): correct error/cancel block status in logs panel by waleedlatif1 · Pull Request #4372 · simstudioai/sim

X Title: fix(terminal): correct error/cancel block status in logs panel by waleedlatif1 · Pull Request #4372 · simstudioai/sim

Description: Summary Three bugs in the workflow editor's terminal/logs panel where block status diverged from the engine's truth on error paths. Bugs Errored block shown as "canceled" — a block hit via an error edge that itself throws ended up canceled instead of errored. Upstream blocks stuck on "Running" — after a run ends, blocks like Start / KnowledgeBase kept showing "Running" until a hard refresh. Phantom "Run Error" pseudo-row — the failing block showed "canceled" while a separate synthetic "Run Error" row carried the real message. Fixes Fix B (addConsoleErrorEntry, bug 1): when a running placeholder exists for (blockId, executionId), route through updateConsoleErrorEntry instead of creating a duplicate entry. Aligns SSE add mode with update mode for the same key. The duplicate is what cancelRunningEntries was sweeping into a "canceled" state. Fix C (reconcileFinalBlockLogs, bug 2): terminal SSE events (execution:error / execution:cancelled) now carry finalBlockLogs — the server-authoritative snapshot. On the client, any still-running entry is reconciled against that snapshot. Recovers correctness on network drop, server timeout/abort, and reconnect-resume paths where individual block:* events may not have reached the client (Redis 1-hour replay buffer can't recover events that were never written there). Fix D (addExecutionErrorConsoleEntry, bug 3): 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 inline. Architectural cleanup handleExecutionErrorConsole / handleExecutionCancelledConsole now take a typed ExecutionConsoleDeps object instead of stacking positional deps. Matches the existing createBlockEventHandlers(config, deps) precedent in the same file. Why not Fix A / Fix E (considered, dropped) Earlier drafts included an "error-aware cancelRunningEntries" (Fix A) and a promise-tracker drain at the SSE terminal boundary (Fix E). Reverse-tracing the production code paths showed Fix A was guarding a state ({ isRunning: true, error: }) that doesn't naturally arise — onBlockStarted is the only writer of isRunning: true and it sets error: undefined. Fix E targeted a race that doesn't exist in the inline route callbacks (they're async with no internal await, so controller.enqueue(block:*) always fires before the terminal enqueue regardless of void discarding). Both reverted to keep the change set surgical. Test plan 12 new tests in workflow-execution-utils.test.ts cover Fix B/C/D and the deps-object refactor (placeholder reuse, finalBlockLogs reconciliation no-op on happy path, phantom-row suppression when block carries error inline, etc.). Existing terminal console store tests (4) preserved — cancelRunningEntries behavior unchanged. Centralized terminal-console.mock.ts in @sim/testing so future tests can stub the store without boilerplate. Manual: Start → Function2 (syntax error) -[error]→ Function1 (syntax error) — both blocks render errored (red), no "Cancelled". Manual: Start → KnowledgeBase (empty KB) → Function (throws) — Start and KnowledgeBase reach a terminal state without refresh. Manual: Function block fetching HTML and JSON.parse-ing — failing block shows the JSON-parse error inline; no "Run Error" row unless it's a true pre-execution validation failure. Manual reconnect: kill the SSE stream mid-run, wait for server, refresh — final state reconciles correctly.

Open Graph Description: Summary Three bugs in the workflow editor's terminal/logs panel where block status diverged from the engine's truth on error paths. Bugs Errored block shown as "canceled" — a blo...

X Description: Summary Three bugs in the workflow editor's terminal/logs panel where block status diverged from the engine's truth on error paths. Bugs Errored block shown as "canceled&a...

Opengraph URL: https://github.com/simstudioai/sim/pull/4372

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:bd4cada6-0752-bd61-8f64-b59012111432
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8956:1BC3DC:B04813:F8F8AD:6AFB5AA0
html-safe-nonce32cb97c17ed5d0a3964c7f73c3a69b000f38dff093ab6b05a229e885901708c6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTU2OjFCQzNEQzpCMDQ4MTM6RjhGOEFEOjZBRkI1QUEwIiwidmlzaXRvcl9pZCI6IjQ5OTQwMDU4MzY5MDU1MzYxNjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc7c506e6e904a0e31563ecb24893b966ae9d6b0b9ab0f888381fcacd32249bad
hovercard-subject-tagpull_request:3612444840
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/4372/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Three bugs in the workflow editor's terminal/logs panel where block status diverged from the engine's truth on error paths. Bugs Errored block shown as "canceled" — a blo...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/4372/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4372%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4372%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/4372/files
Reloadhttps://github.com/simstudioai/sim/pull/4372/files
Reloadhttps://github.com/simstudioai/sim/pull/4372/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
waleedlatif1/exec-state-bugshttps://github.com/simstudioai/sim/tree/waleedlatif1/exec-state-bugs
Conversation 14 https://github.com/simstudioai/sim/pull/4372
Commits 3 https://github.com/simstudioai/sim/pull/4372/commits
Checks 13 https://github.com/simstudioai/sim/pull/4372/checks
Files changed https://github.com/simstudioai/sim/pull/4372/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4372/files
fix(terminal): correct error/cancel block status in logs panel https://github.com/simstudioai/sim/pull/4372/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/4372/files
58e86c5 fix(terminal): correct error/cancel block status in logs panel waleedlatif1 May 1, 2026 https://github.com/simstudioai/sim/pull/4372/commits/58e86c5d40e4a25fc245e284a76e75a23328217c
dc6e3f3 fix(terminal): wire copilot cancellation to finalBlockLogs reconcilia… waleedlatif1 May 1, 2026 https://github.com/simstudioai/sim/pull/4372/commits/dc6e3f3ce9f0f41066a07b1eaf15c3f57f2eeeac
ddcab29 fix(terminal): pass durationMs in reconnect cancellation handler waleedlatif1 May 1, 2026 https://github.com/simstudioai/sim/pull/4372/commits/ddcab29bb49ea906487f2b17252994dbd2630e06
Clear filters https://github.com/simstudioai/sim/pull/4372/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4372/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4372/files
route.ts https://github.com/simstudioai/sim/pull/4372/files#diff-66f204feb589208a932d4b6c514237d545b8f1e9746092bbc35345f49570a9be
use-workflow-execution.ts https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
workflow-execution-utils.test.ts https://github.com/simstudioai/sim/pull/4372/files#diff-0bb6b9c24801c3f51438797381c33a956293f613599bd1263b7c780dab8c797a
workflow-execution-utils.ts https://github.com/simstudioai/sim/pull/4372/files#diff-022741a49bd24846cb2fe5f8b909c47bcc61bcfe5aeadcefa74a738700f83596
execution-events.ts https://github.com/simstudioai/sim/pull/4372/files#diff-8f165b95e5278d98c27f5777c4173efe2bfbbf1df9b76de333a94de1d9c998ce
store.test.ts https://github.com/simstudioai/sim/pull/4372/files#diff-763135cc379bff65ddc2ba651f87a689c488fa335dab71e16725c2cf2011d1ec
vitest.setup.ts https://github.com/simstudioai/sim/pull/4372/files#diff-1c83d21da09a2c5f53044c10fa0e0a257cccd112a3f4a1156f9e258554abbb3c
index.ts https://github.com/simstudioai/sim/pull/4372/files#diff-38963b775b9a08da9c40dbdf25380b1bd038aa3f9f93e9c657ef549fb39f512c
terminal-console.mock.ts https://github.com/simstudioai/sim/pull/4372/files#diff-36ab458450e9e2eb324920a3723ba39e3274c8b5aba3c6342cd3b39cbf388a5e
apps/sim/app/api/workflows/[id]/execute/route.tshttps://github.com/simstudioai/sim/pull/4372/files#diff-66f204feb589208a932d4b6c514237d545b8f1e9746092bbc35345f49570a9be
View file https://github.com/simstudioai/sim/blob/ddcab29bb49ea906487f2b17252994dbd2630e06/apps/sim/app/api/workflows/%5Bid%5D/execute/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4372/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4372/files#diff-66f204feb589208a932d4b6c514237d545b8f1e9746092bbc35345f49570a9be
https://github.com/simstudioai/sim/pull/4372/files#diff-66f204feb589208a932d4b6c514237d545b8f1e9746092bbc35345f49570a9be
https://github.com/simstudioai/sim/pull/4372/files#diff-66f204feb589208a932d4b6c514237d545b8f1e9746092bbc35345f49570a9be
https://github.com/simstudioai/sim/pull/4372/files#diff-66f204feb589208a932d4b6c514237d545b8f1e9746092bbc35345f49570a9be
https://github.com/simstudioai/sim/pull/4372/files#diff-66f204feb589208a932d4b6c514237d545b8f1e9746092bbc35345f49570a9be
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.tshttps://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
View file https://github.com/simstudioai/sim/blob/ddcab29bb49ea906487f2b17252994dbd2630e06/apps/sim/app/workspace/%5BworkspaceId%5D/w/%5BworkflowId%5D/hooks/use-workflow-execution.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4372/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
Please reload this pagehttps://github.com/simstudioai/sim/pull/4372/files
https://github.com/simstudioai/sim/pull/4372/files#diff-26a2ffd51d627fc3dadc9abff80196d5f5f7421369413728dbcfe6f72c46e4e6
Please reload this pagehttps://github.com/simstudioai/sim/pull/4372/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4372/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.