You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In client/src/pages/PromptManager.jsx, stage mutation flows lack success notifications, and the stage creation workflow fails to select or reveal the newly created stage:
Save stage lacks success toast (client/src/pages/PromptManager.jsx:202-208):
constok=awaitsavePrompt(selectedStage,payload,{silent: true}).then(()=>true).catch((err)=>{toast.error('Failed to save stage: '+err.message);returnfalse;});if(!ok){setSaving(false);return;}setSaving(false);awaitloadData();
Create stage neither toasts nor selects the new stage (client/src/pages/PromptManager.jsx:270-287):
constok=awaitcreatePrompt(payload,{silent: true}).then(()=>true).catch((err)=>{setSaving(false);toast.error(err.message||'Failed to create stage');returnfalse;});if(!ok)return;setSaving(false);setCreatingStage(false);setNewStageForm({ ... });awaitloadData();
When createPrompt succeeds, it returns { success: true, stageName }. On success, no toast is displayed, the modal closes, and setSelectedStage(payload.stageName) is NEVER called. The user remains parked on whatever stage was previously selected (or empty). Because the 120+ stages are partitioned across collapsible accordion groups, the newly created stage is buried out of sight in a collapsed group.
Delete stage lacks success toast (client/src/pages/PromptManager.jsx:308-317): deletePrompt resolves, the modal closes, and selection clears if matching, but no confirmation toast confirms the deletion.
Trigger
In /prompts (Stages tab), edit a template or config and click "Save". The button disables and re-enables; no notification appears.
Click "+" ("New Stage"), fill out key my-stage and name Pipeline — My Stage, and click "Create Stage". The modal closes, no notification appears, and the editor continues displaying the old stage or placeholder while the new stage sits unseen inside a collapsed group.
Click "Delete", confirm in the modal. The modal closes with no confirmation feedback.
Impact
Invisible mutation state: Users cannot distinguish a completed server save from a dropped or lagged request.
Dead end / disorientation: Creating a stage leaves the user searching through 120+ stages and accordions just to locate and begin editing the template of the stage they just created.
Fix
In client/src/pages/PromptManager.jsx:
In saveStage: on success, call toast.success(Stage "${stages[selectedStage]?.name || selectedStage}" saved).
In createStage: on success, close the modal, reset the form, call setSelectedStage(payload.stageName) to deep-link to the new stage (which automatically triggers selectedGroupKey to expand its parent accordion group), and call toast.success(Stage "${payload.name || payload.stageName}" created).
In confirmDeleteStage: on success, call toast.success(Stage "${stageName}" deleted).
Rejected alternative: Leaving stage creation unselected and relying on manual user search. Rejected per client/src/AGENTS.md ("ID-based deep linking for every selectable UI element - any view that opens/selects a specific record MUST encode that selection in the URL").
Dispatch rationale: model:light + effort:low — mechanical addition of success toasts and setting selectedStage on creation, with companion unit test assertions in PromptManager.test.jsx.
Files to touch:
client/src/pages/PromptManager.jsx
client/src/pages/PromptManager.test.jsx
Acceptance criteria
Saving a prompt stage displays a success toast confirming the stage was saved.
Creating a new prompt stage displays a success toast with the stage name.
Creating a new prompt stage automatically selects it in the URL (?stage=<stageName>) and expands its parent group accordion in the sidebar list so the editor immediately opens the new stage.
Deleting a prompt stage displays a success toast confirming deletion.
All existing test suites in PromptManager.test.jsx pass.
Problem
In
client/src/pages/PromptManager.jsx, stage mutation flows lack success notifications, and the stage creation workflow fails to select or reveal the newly created stage:Save stage lacks success toast (
client/src/pages/PromptManager.jsx:202-208):{ silent: true }suppresses the default toast fromrequest(). While failures toast viatoast.error, successful saves call no toast. The Save button simply re-enables. (In contrast,saveJobSkillin line 370 callstoast.success('Job skill saved'), added in [UX Audit] [PromptManager] Job skill save failures are swallowed silently with no user error toast #3937).Create stage neither toasts nor selects the new stage (
client/src/pages/PromptManager.jsx:270-287):When
createPromptsucceeds, it returns{ success: true, stageName }. On success, no toast is displayed, the modal closes, andsetSelectedStage(payload.stageName)is NEVER called. The user remains parked on whatever stage was previously selected (or empty). Because the 120+ stages are partitioned across collapsible accordion groups, the newly created stage is buried out of sight in a collapsed group.Delete stage lacks success toast (
client/src/pages/PromptManager.jsx:308-317):deletePromptresolves, the modal closes, and selection clears if matching, but no confirmation toast confirms the deletion.Trigger
/prompts(Stages tab), edit a template or config and click "Save". The button disables and re-enables; no notification appears.my-stageand namePipeline — My Stage, and click "Create Stage". The modal closes, no notification appears, and the editor continues displaying the old stage or placeholder while the new stage sits unseen inside a collapsed group.Impact
Fix
client/src/pages/PromptManager.jsx:saveStage: on success, calltoast.success(Stage "${stages[selectedStage]?.name || selectedStage}" saved).createStage: on success, close the modal, reset the form, callsetSelectedStage(payload.stageName)to deep-link to the new stage (which automatically triggersselectedGroupKeyto expand its parent accordion group), and calltoast.success(Stage "${payload.name || payload.stageName}" created).confirmDeleteStage: on success, calltoast.success(Stage "${stageName}" deleted).client/src/AGENTS.md("ID-based deep linking for every selectable UI element - any view that opens/selects a specific record MUST encode that selection in the URL").Dispatch rationale:
model:light+effort:low— mechanical addition of success toasts and settingselectedStageon creation, with companion unit test assertions inPromptManager.test.jsx.Files to touch:
client/src/pages/PromptManager.jsxclient/src/pages/PromptManager.test.jsxAcceptance criteria
?stage=<stageName>) and expands its parent group accordion in the sidebar list so the editor immediately opens the new stage.PromptManager.test.jsxpass.