refactor(workflow): migrate legacy toast usage to ui toast#34002
refactor(workflow): migrate legacy toast usage to ui toast#34002
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
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/useToastContextusage withtoast.*calls across workflow + workflow-tool components. - Updated affected unit/integration tests to mock the new toast module API.
- Removed/reduced
no-restricted-importseslint 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.
web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx
Outdated
Show resolved
Hide resolved
web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx
Outdated
Show resolved
Hide resolved
web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
Show resolved
Hide resolved
web/app/components/workflow/nodes/_base/hooks/use-one-step-run.ts
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
Outdated
Show resolved
Hide resolved
# Conflicts: # web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/opening-statement.spec.ts
There was a problem hiding this comment.
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.
web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx
Show resolved
Hide resolved
web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
Show resolved
Hide resolved
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…overlay-migration # Conflicts: # web/app/components/workflow/nodes/trigger-webhook/use-config.ts
There was a problem hiding this comment.
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.
web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
@/app/components/base/ui/toast