fix(routines): add missing feedback after trigger create/save#1908
fix(routines): add missing feedback after trigger create/save#1908LArtistaDMorte wants to merge 1 commit intopaperclipai:paperclip-routinesfrom
Conversation
- Add success toast to updateTrigger.onSuccess so users know the Save button worked (previously silent on success) - Add success toast and reset newTrigger form state in createTrigger.onSuccess so the Add trigger form clears after submission and confirms the action visually Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR adds two missing UX feedback signals in Key points:
Confidence Score: 5/5Safe to merge — changes are minimal, correct, and contained to two mutation callbacks. All findings are P2. The only code note is a deliberate-vs-accidental question about resetting the form for webhook triggers too; it does not break anything. The PR description is missing CONTRIBUTING.md's thinking path and screenshots, but that is a process note, not a code defect. 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/RoutineDetail.tsx
Line: 482
Comment:
**Form also resets for webhook triggers**
`setNewTrigger(...)` is now unconditionally called for both webhook and schedule trigger creation. For webhook triggers this means the form resets even though the user is shown the `secretMessage` banner (which is fine UX), but it is a behaviour change versus the pre-PR code. It's worth confirming this is intentional: should a webhook creator be able to create a second webhook immediately after without re-selecting the "webhook" kind from the dropdown? Currently the form snaps back to `kind: "schedule"` for both paths.
If the reset for webhook triggers is not desired, moving the call inside the `else` block is the minimal fix:
```suggestion
setNewTrigger({ kind: "schedule", cronExpression: "0 10 * * *", signingMode: "bearer", replayWindowSec: "300" });
```
(no change needed — just flagging so it's a conscious decision rather than an accidental side-effect)
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(routines): add missing feedback afte..." | Re-trigger Greptile |
| } else { | ||
| pushToast({ title: "Trigger added", tone: "success" }); | ||
| } | ||
| setNewTrigger({ kind: "schedule", cronExpression: "0 10 * * *", signingMode: "bearer", replayWindowSec: "300" }); |
There was a problem hiding this comment.
Form also resets for webhook triggers
setNewTrigger(...) is now unconditionally called for both webhook and schedule trigger creation. For webhook triggers this means the form resets even though the user is shown the secretMessage banner (which is fine UX), but it is a behaviour change versus the pre-PR code. It's worth confirming this is intentional: should a webhook creator be able to create a second webhook immediately after without re-selecting the "webhook" kind from the dropdown? Currently the form snaps back to kind: "schedule" for both paths.
If the reset for webhook triggers is not desired, moving the call inside the else block is the minimal fix:
| setNewTrigger({ kind: "schedule", cronExpression: "0 10 * * *", signingMode: "bearer", replayWindowSec: "300" }); | |
| setNewTrigger({ kind: "schedule", cronExpression: "0 10 * * *", signingMode: "bearer", replayWindowSec: "300" }); |
(no change needed — just flagging so it's a conscious decision rather than an accidental side-effect)
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/pages/RoutineDetail.tsx
Line: 482
Comment:
**Form also resets for webhook triggers**
`setNewTrigger(...)` is now unconditionally called for both webhook and schedule trigger creation. For webhook triggers this means the form resets even though the user is shown the `secretMessage` banner (which is fine UX), but it is a behaviour change versus the pre-PR code. It's worth confirming this is intentional: should a webhook creator be able to create a second webhook immediately after without re-selecting the "webhook" kind from the dropdown? Currently the form snaps back to `kind: "schedule"` for both paths.
If the reset for webhook triggers is not desired, moving the call inside the `else` block is the minimal fix:
```suggestion
setNewTrigger({ kind: "schedule", cronExpression: "0 10 * * *", signingMode: "bearer", replayWindowSec: "300" });
```
(no change needed — just flagging so it's a conscious decision rather than an accidental side-effect)
How can I resolve this? If you propose a fix, please make it concise.
Problem
Two silent-failure UX bugs in
RoutineDetail.tsxon thepaperclip-routinesbranch:Save trigger — clicking Save on an existing trigger updates the backend correctly but shows no confirmation toast. Users have no feedback that the save worked.
Add trigger — after clicking "Add trigger", the form stays populated (appears like nothing happened) and no toast is shown for schedule triggers. Webhook triggers correctly show the secret banner, but schedule triggers get nothing.
Fix
updateTrigger.onSuccess: addpushToast({ title: "Trigger saved", tone: "success" })createTrigger.onSuccess: add success toast for non-webhook triggers + resetnewTriggerstate back to defaults so the form visually clearsTesting