feat(website): Add success toast notification when releasing sequences#6175
feat(website): Add success toast notification when releasing sequences#6175theosanderson merged 11 commits intomainfrom
Conversation
Show a success toast notification when sequences are released successfully via the approve/release button on the review page. https://claude.ai/code/session_01BtFqdwWDF1ndHnFZv5i9K1
Replace the simple success toast with a loading toast that appears immediately when release is triggered, then transitions to a success or error state when the mutation completes. https://claude.ai/code/session_01BtFqdwWDF1ndHnFZv5i9K1
…tent Change the release success toast to show a bigger celebratory message with emoji and disable auto-close so users can dismiss it manually. https://claude.ai/code/session_01BtFqdwWDF1ndHnFZv5i9K1
Only show the celebratory persistent toast when releasing all sequences. Single sequence releases get a simpler message with auto-close. https://claude.ai/code/session_01BtFqdwWDF1ndHnFZv5i9K1
Use type assertions instead of explicit parameter types to avoid incompatibility with the hook's expected callback signatures. https://claude.ai/code/session_01BtFqdwWDF1ndHnFZv5i9K1
… release The previous check used `variables.accessionVersionsFilter != null` to determine if a single sequence was released. However, when using the "Release all" button with only one sequence, `accessionVersionsFilter` is not passed (it's undefined), causing the batch emoji message to show even for a single sequence. Now checks `data.length > 1` from the response instead, which correctly reflects how many sequences were actually released. https://claude.ai/code/session_01BtFqdwWDF1ndHnFZv5i9K1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @theosanderson's task in 2m 11s —— View job Code Review
The implementation is clean and the loading → success/error toast pattern is a nice UX improvement. A few issues below.
On line 76, Unreachable Lines 96–98 ( Batch detection edge case
Test coverage The PR checklist marks tests as covered, but no new test files are included. The existing |
…ranch Both onSuccess and onError now defensively check for undefined context with optional chaining, matching react-query's type signature. Removed the unreachable else branch in onError since onMutate always provides context. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
maverbiest
left a comment
There was a problem hiding this comment.
Very nice!
One thing I noticed on the preview is that the 🎉 All sequences have been released successfully! toast doesn't go away unless I do a hard reload of the page, and it blocks some buttons in the UI. Shouldn't toasts close when you click them? (at least, that's what I'm used to from a user perspective)
tombch
left a comment
There was a problem hiding this comment.
I just realised I did not actually click send on my review - but I have the same comment as Max 😆
Since the batch release toast doesn't auto-close, add a close button so users can dismiss it manually. https://claude.ai/code/session_01BtFqdwWDF1ndHnFZv5i9K1
Description
Added a success toast notification that displays when sequences are successfully released through the approve processed data operation.
🚀 Preview: https://claude-add-release-toast.loculus.org