Skip to content

refactor(workflow): migrate legacy toast usage to ui toast#34002

Merged
lyzno1 merged 6 commits intomainfrom
chore/workflow-toast-overlay-migration
Mar 25, 2026
Merged

refactor(workflow): migrate legacy toast usage to ui toast#34002
lyzno1 merged 6 commits intomainfrom
chore/workflow-toast-overlay-migration

Conversation

@lyzno1
Copy link
Member

@lyzno1 lyzno1 commented Mar 24, 2026

Summary

  • migrate workflow and workflow-tool legacy toast usage to @/app/components/base/ui/toast
  • update affected workflow tests to mock the new toast API
  • keep the change scoped away from plugin paths

Copilot AI review requested due to automatic review settings March 24, 2026 05:43
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 24, 2026
@github-actions github-actions bot added the web This relates to changes on the web. label Mar 24, 2026
@dosubot dosubot bot added javascript Pull requests that update javascript code refactor labels Mar 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates workflow + workflow-tool components off the legacy toast/context APIs onto the newer @/app/components/base/ui/toast API, and updates associated tests/mocks and eslint suppression counts accordingly.

Changes:

  • Replaced legacy Toast.notify / ToastContext / useToastContext usage with toast.* calls across workflow + workflow-tool components.
  • Updated affected unit/integration tests to mock the new toast module API.
  • Removed/reduced no-restricted-imports eslint suppressions where legacy toast imports were eliminated.

Reviewed changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
web/eslint-suppressions.json Removes/reduces suppressions now that legacy toast imports are gone.
web/app/components/workflow/update-dsl-modal.tsx Switches DSL import notifications to toast API.
web/app/components/workflow/run/index.tsx Uses toast.error for run panel fetch errors.
web/app/components/workflow/panel/env-panel/variable-modal.tsx Migrates env var modal validation errors to toast.error.
web/app/components/workflow/panel/env-panel/tests/integration.spec.tsx Updates env-panel tests to mock/assert new toast calls.
web/app/components/workflow/panel/debug-and-preview/hooks.ts Replaces useToastContext().notify with toast.info.
web/app/components/workflow/panel/debug-and-preview/tests/hooks.spec.ts Updates hook tests to mock new toast module.
web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx Migrates chat variable modal errors to toast.error.
web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx Migrates object key validation toast usage.
web/app/components/workflow/panel/tests/inputs-panel.spec.tsx Updates inputs panel tests to mock new toast API.
web/app/components/workflow/nodes/variable-assigner/components/var-group-item.tsx Uses toast.error for invalid group names.
web/app/components/workflow/nodes/variable-assigner/tests/integration.spec.tsx Updates variable-assigner tests to mock/assert new toast calls.
web/app/components/workflow/nodes/trigger-webhook/use-config.ts Migrates webhook trigger config validation to toast.error.
web/app/components/workflow/nodes/trigger-webhook/panel.tsx Uses toast.success on copy.
web/app/components/workflow/nodes/tool/hooks/use-config.ts Uses toast.success after credential updates.
web/app/components/workflow/nodes/start/use-config.ts Migrates start-node config validation errors to toast.error.
web/app/components/workflow/nodes/start/components/var-list.tsx Migrates var list validation errors to toast.error.
web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/update.tsx Uses toast.error for validation and save failures.
web/app/components/workflow/nodes/parameter-extractor/tests/integration.spec.tsx Updates parameter-extractor tests to mock/assert new toast calls.
web/app/components/workflow/nodes/loop/components/loop-variables/item.tsx Migrates loop var validation errors to toast.error.
web/app/components/workflow/nodes/loop/tests/integration.spec.tsx Updates loop tests to mock new toast API.
web/app/components/workflow/nodes/llm/panel.tsx Migrates LLM panel warnings/errors to toast.warning/error.
web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/hooks.ts Migrates schema editor duplicate-name warnings to toast.error.
web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsx Uses toast.error when schema generation fails.
web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-config.tsx Uses toast.warning for unsaved schema edits warning.
web/app/components/workflow/nodes/iteration/node.tsx Migrates iteration warning toast to toast.warning.
web/app/components/workflow/nodes/iteration/tests/integration.spec.tsx Updates iteration tests to mock/assert new toast calls.
web/app/components/workflow/nodes/human-input/panel.tsx Uses toast.success for copy confirmation.
web/app/components/workflow/nodes/human-input/components/user-action.tsx Migrates validation toasts to toast.error.
web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx Migrates email config validation errors to toast.error.
web/app/components/workflow/nodes/http/components/curl-panel.tsx Uses toast.error for curl parse errors.
web/app/components/workflow/nodes/_base/hooks/use-one-step-run.ts Migrates multiple runtime errors to toast.error.
web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts Migrates unresolved checklist toast to toast.error.
web/app/components/workflow/nodes/_base/components/before-run-form/index.tsx Migrates file/json validation errors to toast.error.
web/app/components/workflow/nodes/_base/components/tests/file-support.spec.tsx Updates file-support tests to mock new toast module.
web/app/components/workflow/hooks/use-checklist.ts Migrates checklist errors to toast.error.
web/app/components/workflow/hooks/tests/use-checklist.spec.ts Updates checklist hook tests to mock new toast module.
web/app/components/workflow/header/run-mode.tsx Migrates checklist-tip error to toast.error.
web/app/components/workflow/header/header-in-restoring.tsx Migrates restore success/failure notifications to toast.success/error.
web/app/components/workflow/header/tests/run-mode.spec.tsx Updates run-mode tests to mock new toast module.
web/app/components/workflow/header/tests/header-layouts.spec.tsx Updates header layout tests to mock new toast module.
web/app/components/workflow/block-selector/tool-picker.tsx Migrates tool creation success toast to toast.success.
web/app/components/workflow/block-selector/tests/tool-picker.spec.tsx Updates tool-picker tests to mock new toast module.
web/app/components/tools/workflow-tool/index.tsx Migrates workflow-tool validation error to toast.error.
web/app/components/tools/workflow-tool/hooks/use-configure-button.ts Migrates configure-button success/error notifications to toast.success/error.
web/app/components/tools/workflow-tool/hooks/tests/use-configure-button.spec.ts Updates hook tests to mock new toast module.
web/app/components/tools/workflow-tool/tests/configure-button.spec.tsx Updates configure-button tests to mock new toast module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 38.46154% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.85%. Comparing base (508350e) to head (2ad7f53).

Files with missing lines Patch % Lines
web/app/components/workflow/hooks/use-checklist.ts 0.00% 9 Missing ⚠️
...ts/json-schema-config-modal/visual-editor/hooks.ts 0.00% 5 Missing ⚠️
web/app/components/workflow/nodes/llm/panel.tsx 0.00% 2 Missing ⚠️
...onents/workflow/panel/env-panel/variable-modal.tsx 50.00% 2 Missing ⚠️
...components/workflow/header/header-in-restoring.tsx 50.00% 1 Missing ⚠️
...ts/json-schema-config-modal/json-schema-config.tsx 0.00% 1 Missing ⚠️
...chema-config-modal/json-schema-generator/index.tsx 0.00% 1 Missing ⚠️
...flow/nodes/loop/components/loop-variables/item.tsx 0.00% 1 Missing ⚠️
...components/workflow/nodes/tool/hooks/use-config.ts 0.00% 1 Missing ⚠️
...omponents/workflow/nodes/trigger-webhook/panel.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #34002      +/-   ##
==========================================
- Coverage   78.85%   78.85%   -0.01%     
==========================================
  Files        4578     4578              
  Lines      181310   181306       -4     
  Branches    35352    35352              
==========================================
- Hits       142974   142970       -4     
  Misses      35123    35123              
  Partials     3213     3213              
Flag Coverage Δ
web 80.11% <38.46%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 24, 2026 05:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 47 out of 47 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lyzno1 lyzno1 marked this pull request as draft March 24, 2026 06:22
# Conflicts:
#	web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/opening-statement.spec.ts
Copilot AI review requested due to automatic review settings March 24, 2026 06:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 53 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lyzno1 lyzno1 marked this pull request as ready for review March 24, 2026 06:48
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@lyzno1 lyzno1 marked this pull request as draft March 24, 2026 09:26
…overlay-migration

# Conflicts:
#	web/app/components/workflow/nodes/trigger-webhook/use-config.ts
@lyzno1 lyzno1 marked this pull request as ready for review March 25, 2026 04:26
Copilot AI review requested due to automatic review settings March 25, 2026 04:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 54 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 25, 2026
@lyzno1 lyzno1 merged commit d7e49c3 into main Mar 25, 2026
21 checks passed
@lyzno1 lyzno1 deleted the chore/workflow-toast-overlay-migration branch March 25, 2026 04:42
CodingOnStar pushed a commit that referenced this pull request Mar 25, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code lgtm This PR has been approved by a maintainer refactor size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants