fix(ui): show success toast when saving agent configuration#1931
fix(ui): show success toast when saving agent configuration#1931bluzername wants to merge 1 commit intopaperclipai:masterfrom
Conversation
When user save agent configuration, the onError handler show a toast with "Save failed" but the onSuccess handler had zero feedback. The form just silently go back to non-dirty state and user have to guess if the save actually worked. Added a simple "Agent saved" success toast in onSuccess. Now the feedback is symmetrical - error show red toast, success show green toast.
Greptile SummaryThis PR adds a single success toast (
Confidence Score: 5/5Safe to merge — the one-line change is correct, consistent with existing patterns, and carries no risk. No logic, syntax, or runtime issues found. The only finding is a P2 style/process note about the PR description format and missing screenshots per CONTRIBUTING.md guidelines, which does not block merge. No files require special attention. Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: ui/src/pages/AgentDetail.tsx
Line: 1450
Comment:
**PR description missing "thinking path" and screenshots**
Per `CONTRIBUTING.md`, a good PR message should include:
1. A **"thinking path"** that explains the reasoning from the top of the project down to the specific fix (see examples in `CONTRIBUTING.md`).
2. **Before/after screenshots** for any visible UI change — this PR introduces a new success toast, which is a visual change.
The current description explains the problem and the fix well, but it doesn't follow the structured thinking-path format, and no screenshots are included to show what the new success toast looks like.
Could you update the PR description to add a thinking path and include before/after screenshots of the success toast?
**Context Used:** CONTRIBUTING.md has a guide for a good PR message ... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(ui): show success toast when agent c..." | Re-trigger Greptile |
| queryClient.invalidateQueries({ queryKey: queryKeys.agents.detail(agent.urlKey) }); | ||
| queryClient.invalidateQueries({ queryKey: queryKeys.agents.configRevisions(agent.id) }); | ||
| queryClient.invalidateQueries({ queryKey: queryKeys.agents.list(agent.companyId) }); | ||
| pushToast({ title: "Agent saved", tone: "success" }); |
There was a problem hiding this comment.
PR description missing "thinking path" and screenshots
Per CONTRIBUTING.md, a good PR message should include:
- A "thinking path" that explains the reasoning from the top of the project down to the specific fix (see examples in
CONTRIBUTING.md). - Before/after screenshots for any visible UI change — this PR introduces a new success toast, which is a visual change.
The current description explains the problem and the fix well, but it doesn't follow the structured thinking-path format, and no screenshots are included to show what the new success toast looks like.
Could you update the PR description to add a thinking path and include before/after screenshots of the success toast?
Context Used: CONTRIBUTING.md has a guide for a good PR message ... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/pages/AgentDetail.tsx
Line: 1450
Comment:
**PR description missing "thinking path" and screenshots**
Per `CONTRIBUTING.md`, a good PR message should include:
1. A **"thinking path"** that explains the reasoning from the top of the project down to the specific fix (see examples in `CONTRIBUTING.md`).
2. **Before/after screenshots** for any visible UI change — this PR introduces a new success toast, which is a visual change.
The current description explains the problem and the fix well, but it doesn't follow the structured thinking-path format, and no screenshots are included to show what the new success toast looks like.
Could you update the PR description to add a thinking path and include before/after screenshots of the success toast?
**Context Used:** CONTRIBUTING.md has a guide for a good PR message ... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Problem
When you edit agent configuration (name, instructions, adapter settings, etc) and click Save, the form just quietly go back to normal state. There is no toast, no message, no visual confirmation that the save was successful.
But when the save FAIL, you get a red "Save failed" toast with the error message (line 1459). So the feedback is asymmetrical - you only hear from the system when something go wrong, never when it go right.
This made me click Save multiple times sometimes because I was not sure if it actually work. The button text change from "Saving..." back to "Save" but that transition is easy to miss if you look away for a moment.
What I changed
Added one line in the
updateAgentmutationonSuccesscallback:Now user see a brief green toast confirming the save. Same pattern used in Routines page when creating a routine (line 132-136) and in many other mutation success handlers across the app.
How to test
1 file, 1 line added.