Skip to content

refactor(web): remove success toasts for results visible in place - #43801

Merged
lyzno1 merged 1 commit into
mainfrom
fix/remove-noise-success-toasts
Oct 10, 2026
Merged

lyzno1 merged 1 commit into
mainfrom
fix/remove-noise-success-toasts

Conversation

@lyzno1

@lyzno1 lyzno1 commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Part of #43802

A toast should report a result the user cannot see where they acted. Many success toasts in web/ fire from a mutation callback even though the control that triggered the mutation already shows the new value, so the toast only adds noise. This PR removes the clearest cases and records the rule.

Success toasts removed where the control already shows the result

  • Document enable/disable switch (status item and document list operations) and the single-segment enable switch. Menu actions and batch actions that share those handlers keep their toast for now.
  • Annotation reply switch (disable path) and the built-in metadata switch.
  • Language and timezone selects in Preferences.
  • Model provider usage priority selector and credential selection.
  • Like/dislike rating in chat, embedded chatbot, app logs, and agent logs.

Copy feedback moved into the button

  • The copy icon button on chat questions, chat answers, and saved text-generation results now uses the existing CopyFeedback: the icon, tooltip, and accessible name change to the copied state instead of a "Copied successfully" toast. This adds a tooltip to those three buttons.

Rule

  • web/docs/toasts.md defines when a toast is appropriate for success and error feedback, and web/AGENTS.md links to it.
  • The how-to-write-component and frontend-code-review references carry the principle only.

Not in this PR

  • Error toasts are unchanged, including caller-side toasts that duplicate the request layer's toast and validation reported through toasts.
  • Success toasts after a dialog submits and closes.
  • Copy buttons that are not a drop-in match for CopyFeedback (different variant or size, a disabled state, lazily computed content, text buttons, menu items) and the image preview copy button, whose copied state is colour-only and never resets.
  • The generic i18n keys (api.actionSuccess, actionMsg.modifiedSuccessfully, api.success) stay until their remaining call sites are migrated.

From Claude Code

Drop the success toast after a switch, select, or rating control changes a value the control already shows, and move copy feedback for chat and saved-result icon buttons into the button through CopyFeedback. Record the toast usage rule in web/docs/toasts.md.
@ghfind-review ghfind-review Bot added the review: top ghfind author score; see https://ghfind.com label Oct 10, 2026
@github-actions github-actions Bot added size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Oct 10, 2026
@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.71%. Comparing base (f508ed2) to head (b185c60).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #43801      +/-   ##
==========================================
- Coverage   88.71%   88.71%   -0.01%     
==========================================
  Files        5208     5208              
  Lines      327159   327136      -23     
  Branches    65511    65512       +1     
==========================================
- Hits       290248   290225      -23     
  Misses      31668    31668              
  Partials     5243     5243              
Flag Coverage Δ
dify-ui 92.04% <ø> (ø)
web 89.07% <100.00%> (-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.

@lyzno1
lyzno1 enabled auto-merge October 10, 2026 04:25
@github-actions github-actions Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 10, 2026
@lyzno1
lyzno1 added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit ce23dbc Oct 10, 2026
51 checks passed
@lyzno1
lyzno1 deleted the fix/remove-noise-success-toasts branch October 10, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: top ghfind author score; see https://ghfind.com 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.

2 participants