Skip to content

feat(draftworkflow): improve workflow error displaying (#16572)#16757

Merged
frapuks merged 2 commits into
masterfrom
issue/16572
Jun 24, 2026
Merged

feat(draftworkflow): improve workflow error displaying (#16572)#16757
frapuks merged 2 commits into
masterfrom
issue/16572

Conversation

@frapuks

@frapuks frapuks commented Jun 23, 2026

Copy link
Copy Markdown
Member

Proposed changes

  • display error on click

Related issues

How to test this PR

  • Create a draft workflow in settings / customization / draft / workflow
  • Make an error (add a status without transition linked)
  • click on publish

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant use cases (coverage and e2e)
  • I added/updated the relevant documentation (either on GitHub or on Notion)
  • Where necessary, I refactored code to improve the overall quality

@frapuks frapuks self-assigned this Jun 23, 2026
Copilot AI review requested due to automatic review settings June 23, 2026 08:48
@frapuks frapuks added the filigran team Item from the Filigran team. label Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the draft workflow “Publish” UX so that when the workflow definition is invalid, users can click “Publish” to get validation feedback as a Filigran-style toaster (Snackbar/Alert) instead of relying on a non-matching panel/tooltip UI.

Changes:

  • Make the “Publish” button clickable even when validation errors exist, and show a toaster on click instead of blocking via a disabled button.
  • Add a custom toaster content component that groups workflow validation errors by type and renders details (message + optional affected entities).
  • Update unit tests to reflect the new clickable behavior and assert click handling.

Reviewed changes

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

File Description
opencti-platform/opencti-front/src/private/components/settings/sub_types/workflow/Workflow.tsx Triggers MESSAGING$.notifyError(...) with a React toast content component when publish is clicked while validation errors exist.
opencti-platform/opencti-front/src/private/components/settings/sub_types/workflow/PublishButton.tsx Changes the “has validation errors” publish button from disabled-with-tooltip to clickable-with-tooltip, delegating error display to the click handler.
opencti-platform/opencti-front/src/private/components/settings/sub_types/workflow/PublishButton.test.tsx Updates expectations for the red state to be enabled and adds a click test for the new behavior.

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 7.69231% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.09%. Comparing base (901d6dc) to head (4a2b4f1).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
...omponents/settings/sub_types/workflow/Workflow.tsx 7.69% 12 Missing ⚠️

❌ Your patch check has failed because the patch coverage (7.69%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #16757    +/-   ##
========================================
  Coverage   24.09%   24.09%            
========================================
  Files        3271     3271            
  Lines      173266   173357    +91     
  Branches    42956    43104   +148     
========================================
+ Hits        41744    41768    +24     
- Misses     131522   131589    +67     
Flag Coverage Δ
opencti-client-python 46.30% <ø> (ø)
opencti-front 5.61% <7.69%> (-0.01%) ⬇️
opencti-graphql 66.69% <ø> (+0.05%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@frapuks frapuks merged commit 1727083 into master Jun 24, 2026
44 checks passed
@frapuks frapuks deleted the issue/16572 branch June 24, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(scope): workflow validation publication error should be aligned with Filigran ui - toaster

3 participants