Skip to content

fix: workflow-id links keep file names out of error reports and yield to newer links - #23271

Closed
vqt123 wants to merge 1 commit into
mainfrom
fix/workflow-link-report-and-ownership
Closed

vqt123 wants to merge 1 commit into
mainfrom
fix/workflow-link-report-and-ownership

Conversation

@vqt123

@vqt123 vqt123 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

TL;DR: Three fixes to ?workflowId= links, following #23051 and #23245.

  1. A linked file whose read fails with a 500 no longer sends its name to Sentry or Datadog.
  2. A link replaced while its workflow loads no longer opens under the newer link's address.
  3. A newer link held by a navigation guard is no longer cancelled by the Settings loader or another later URL loader.

Why / Before / After

  • File name in error reports. Today a link resolves to workflows/Customer Jane Doe.json and its file read returns 500. The workflow load queue reports Failed to load file 'workflows/Customer Jane Doe.json': 500 Internal Server Error to Sentry and Datadog. The link loader's fixed message comes after it. After: the loader passes reportLoadFailure: false to openWorkflow, and the queue skips its report for that open. The only report is "Could not open workflow link". Other callers of openWorkflow report as before, since src/AGENTS.md allows file names in error messages.
  • A replaced link still opens. Today you open link A, a workflow with a Load3D node. While Load3D's beforeConfigureGraph hook waits for its imports, you go to link B. A still lands on the canvas and becomes the active tab, with B in the address bar. After: openWorkflow passes its isCurrent check to loadGraphData. The load stops before rootGraph.configure and again before the workflow is activated. The tab you had is repainted and stays active. The fetched copy of A is dropped, as it already was when the check failed before the graph load.
  • Settings cancels the newer link. Today link A is ?workflowId=A&settings=plan-credits. While A's URL cleanup waits, you go to link B, and a sign-in guard holds B. The Settings loader then replaces the URL with A's query minus settings, and that replace cancels B. After: while a newer link waits, no URL loader after the workflow-id loader runs, the final sweep included. The loaders before it (deployment, workspace) still run: at boot after sign-in, the stash can hold a link the loader has not started yet.

The ADR is updated to match. loadGraphDataNow and buildUrlActionSteps lose their existing comments, per AGENTS.md "Delete the existing comments in any function you modify". The graph-load call in openWorkflow moves into loadWorkflowGraph, so the queued open stays below its old complexity.

Seen in production by: not seen; found by reading the code path from the link loader through the workflow service, app.loadGraphData and the URL loaders.

Rule bent: none.

Verification

Each new test fails on main:

  • useWorkflowLinkUrlLoader.fileRead.test.ts opens a link through the real workflow service with a 500 file read and expects exactly one report, the fixed one. On main the queue reports the error that names the file first.
  • app.test.ts: isCurrent turns false while beforeConfigureGraph waits; the load resolves false without configuring or activating. The same while afterConfigureGraph waits, without activating. On main the option is ignored.
  • workflowService.test.ts: a graph load that gives up makes openWorkflow return false, repaint the current workflow and drop the fetched file. On main isCurrent never reaches the graph load.
  • useWorkflowLinkUrlLoader.test.ts now runs the real Settings loader (only the Settings dialog is mocked) on a memory router with guards; B lands. On main the Settings replace cancels B and the URL ends empty.
  • useUrlActionLoaders.test.ts: the in-flight case now expects the top-up loader not to run, and the workspace loader still to run.

Not run: unit tests, typecheck, lint and e2e, which CI runs. pnpm test:browser --project=cloud browser_tests/tests/workflow/cloudWorkflowLink.spec.ts covers open, refusal and sign-in, not these races.

A linked file read that failed was reported by the workflow load queue
with the original error, whose message names the file, before the link
loader reported its own fixed message. The loader now tells the workflow
service it reports the failure itself, so the queue skips its report for
that open. Other callers keep the queue's report.

The ownership check a link passes to openWorkflow stopped at the graph
load. A link replaced while an extension hook such as Load3D's
beforeConfigureGraph was still running would still configure and
activate its workflow under the newer link's URL. openWorkflow now
passes the check to loadGraphData, which gives the load up before
configuring the graph and again before activating the workflow; the
service then repaints the retained workflow and drops the fetched file.
The graph-load call moves into loadWorkflowGraph so the queued open does
not grow, and loadGraphDataNow loses its comments per AGENTS.md.

While a navigation guard holds a newer link, only the final sweep made
no replace. The Settings loader, and every other loader after the
workflow-id link, still replaced the committed query, cancelling the
newer navigation. Those steps now do not run while a newer link is in
flight. Steps before the workflow-id link still run, since at boot the
stash can hold a link the loader has not reached yet.
@vqt123
vqt123 requested a review from a team November 11, 2026 04:13
@vqt123 vqt123 added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch cloud/1.59 Backport PRs for cloud 1.59 cloud/1.60 Backport PRs for cloud 1.60 labels Nov 11, 2026
@vqt123
vqt123 requested a review from dante01yoon November 11, 2026 04:13
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 3277 passed, 0 failed

📊 Browser Reports
  • chromium: View Report (✅ 2381 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-2x: View Report (✅ 3 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • cloud: View Report (✅ 857 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • desktop: View Report (✅ 11 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 19 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-safari: View Report (✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 11/11/2026, 04:15:41 AM UTC

Links

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

No verdict is available. Open the workflow run to confirm the check was intentionally skipped, or fix the collection failure and re-run it.

Findings and check details

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

The matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped.

Full docs: scripts/registry-census/README.md

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

🌾 Fallow: ✅ Passed

Findings and check details

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Full docs: ADR-DEVEX-LINT-0015

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 62580009f52f2f06f5534b1e11225ab054294224

🏛️ Architecture: ✅ Passed

Findings and check details

Warnings (436)

  • billing path matches no source files: src/platform/billing/composables/activateBillingScope.testUtils.ts. Remove or update it in docs/architecture/domains/records/billing.domain.json.
  • error-handling path matches no source files: src/utils/errorUtil.ts. Remove or update it in docs/architecture/domains/records/error-handling.domain.json.
  • graph-model path matches no source files: src/types/linkTopology.ts. Remove or update it in docs/architecture/domains/records/graph-model.domain.json.
  • graph-model path matches no source files: src/types/nodeState.ts. Remove or update it in docs/architecture/domains/records/graph-model.domain.json.
  • job-queue path matches no source files: src/platform/remote/comfyui/jobs/**. Remove or update it in docs/architecture/domains/records/job-queue.domain.json.
  • linear-mode path matches no source files: src/utils/appMode.ts. Remove or update it in docs/architecture/domains/records/linear-mode.domain.json.
  • link-connection path matches no source files: src/lib/litegraph/src/infrastructure/LinkConnectorEventMap.ts. Remove or update it in docs/architecture/domains/records/link-connection.domain.json.
  • node-widgets path matches no source files: src/types/widgetState.ts. Remove or update it in docs/architecture/domains/records/node-widgets.domain.json.
  • subgraphs path matches no source files: src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts. Remove or update it in docs/architecture/domains/records/subgraphs.domain.json.
  • vue-node-widgets path matches no source files: src/types/positionConfig.ts. Remove or update it in docs/architecture/domains/records/vue-node-widgets.domain.json.
  • workspace path matches no source files: src/platform/workspace/fixtures/**. Remove or update it in docs/architecture/domains/records/workspace.domain.json.
  • packages/api-client/src/abortSignal.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/abortSignal.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchRouteTemplate.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchWithRetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchWithRetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/retryPolicy.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/retryPolicy.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/statusRetryTelemetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/statusRetryTelemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/generated/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/generated/types.gen.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/comfyui-api-types/src/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/formatUtil.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/formatUtil.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/geometry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/loadExternalScript.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/networkUtil.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/telemetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/telemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/urlSafety.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/urlSafety.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/tailwind-utils/src/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/TopbarActions.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/searchbox/v2/filterChip.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatClipStrip.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatClipTile.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPanel.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPanel.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPlaybackBar.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/WidgetVideoConcat.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/WidgetVideoConcat.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/__fixtures__/clipTiles.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/graph/menuOption.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionActions.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionActions.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionNotices.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionNotices.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • …and 386 more

Full docs: Frontend domain catalog

Reproduce locally
pnpm architecture:check

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@vqt123

vqt123 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #23269, which fixes the same three things.

@vqt123 vqt123 closed this Nov 11, 2026
@vqt123
vqt123 removed the request for review from dante01yoon November 11, 2026 04:14
@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Nov 11, 2026
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #23271      +/-   ##
==========================================
- Coverage   87.65%   87.55%   -0.11%     
==========================================
  Files        3094     2987     -107     
  Lines      165998   162701    -3297     
  Branches    42313    41188    -1125     
==========================================
- Hits       145508   142448    -3060     
+ Misses      19539    19460      -79     
+ Partials      951      793     -158     
Flag Coverage Δ
billing-web-unit ?
unit 86.99% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/composables/useUrlActionLoaders.ts 100.00% <100.00%> (ø)
...platform/workflow/core/services/workflowService.ts 96.38% <100.00%> (+0.06%) ⬆️
...management/composables/useWorkflowLinkUrlLoader.ts 100.00% <ø> (ø)
src/scripts/app.ts 88.52% <100.00%> (+0.05%) ⬆️

... and 116 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloud/1.59 Backport PRs for cloud 1.59 cloud/1.60 Backport PRs for cloud 1.60 needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants