Skip to content

fix(web): keep error feedback at business boundaries - #45151

Merged
hyoban merged 17 commits into
mainfrom
fix/web-business-error-feedback
Oct 30, 2026
Merged

hyoban merged 17 commits into
mainfrom
fix/web-business-error-feedback

Conversation

@hyoban

@hyoban hyoban commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Part of #43802.

Failed Web actions could display both request-layer and business-layer errors. Make requests silent where the business flow already owns a toast or inline error, and forward optional context through shared service helpers.

Keep actionable information at that business boundary: use localized messages for known domain errors (including workspace skill limits), preserve specific server reasons, and use generic failures as a fallback. This covers tag conflicts, remote upload failures, publishing, app/dataset operations and the other affected flows. Template selection also handles the query's returned error before continuing.

Plugin release/upload helpers propagate failures to their business callers. Snippet imports report request errors in the dialog; Agent V2 draft operations report once; trigger single-run errors are reported before Webhook cancellation.

Update toast ownership guidance and regression coverage. CI integration assertions now account for silent request context, and error assertions check the retained reason. The Build retry test waits for the asynchronously loaded Markdown answer.

Screenshots

Before After
A failure can produce two toasts; keeping only a generic handler can hide the cause. One business-owned toast or inline error retains the useful reason and recovery guidance.

Validation

  • GitHub CI on 48b882822b: all four Web unit shards, Web Browser Tests, TS Common, Web Static Checks, and Codecov project/patch passed.
  • Targeted local reruns cover the previously failing CI cases and affected owners' error branches, plus 8 focused message/retry regressions and 2 browser scenarios.
  • pnpm exec vp run -w check: passed (formatting and lint, zero errors). Subsequent test-only edits also passed targeted static checks.
  • pnpm exec vp staged: passed; unrelated existing style autofixes were restored before validating the final changes.
  • Local pnpm --dir web run type-check reports only the existing generated .next/types/validator.ts:2368 layout mismatch: MainNavLayoutProps requires initialDetailSidebarMode, which the generated layout props do not supply. That layout is unchanged.

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've verified the change and added or updated tests where meaningful regression risk justifies coverage.
  • I've updated the documentation accordingly.
  • I ran the applicable frontend staged and repository checks.

@github-actions github-actions Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. web This relates to changes on the web. labels Oct 30, 2026
@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.90119% with 127 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.62%. Comparing base (4612a80) to head (90b8f6f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
web/service/datasets.ts 55.00% 9 Missing ⚠️
...ronment-access-points/environment-web-app-card.tsx 0.00% 8 Missing ⚠️
...cess-point/built-in-access-points/web-app-card.tsx 37.50% 5 Missing ⚠️
...nts/workflow/panel/version-history-panel/index.tsx 54.54% 5 Missing ⚠️
.../documents/row-actions/use-document-row-actions.ts 50.00% 5 Missing ⚠️
web/features/skills/detail/sidebar-actions.tsx 37.50% 5 Missing ⚠️
...nment-access-points/environment-access-control.tsx 0.00% 4 Missing ⚠️
...count-setting/workflow-log-archives-page/index.tsx 0.00% 4 Missing ⚠️
...eatures/new-rag/documents/bulk/use-bulk-actions.ts 42.85% 4 Missing ⚠️
web/features/skills/page.tsx 50.00% 4 Missing ⚠️
... and 44 more

❌ Your project check has failed because the head coverage (68.62%) is below the adjusted base coverage (88.83%). You can increase the head coverage or adjust the Removed Code Behavior.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #45151       +/-   ##
===========================================
- Coverage   89.82%   68.62%   -21.21%     
===========================================
  Files        6244     6088      -156     
  Lines      397218   368484    -28734     
  Branches    80002    78184     -1818     
===========================================
- Hits       356807   252875   -103932     
- Misses      34116   112808    +78692     
+ Partials     6295     2801     -3494     
Flag Coverage Δ
dify-ui 92.64% <ø> (ø)
web 89.82% <74.90%> (-0.01%) ⬇️

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:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hyoban
hyoban force-pushed the fix/web-business-error-feedback branch from 77d48be to bc48948 Compare October 30, 2026 09:36
@hyoban
hyoban force-pushed the fix/web-business-error-feedback branch from bc48948 to 48b8828 Compare October 30, 2026 09:47
@hyoban
hyoban marked this pull request as ready for review October 30, 2026 14:56
@hyoban
hyoban requested a review from JzoNgKVO as a code owner October 30, 2026 14:56
@hyoban
hyoban added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit c3221f5 Oct 30, 2026
53 of 55 checks passed
@laipz8200 laipz8200 mentioned this pull request Nov 3, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ 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.

2 participants