mirror of
https://github.com/hiaaryan/sileo.git
synced 2026-04-26 23:45:50 +03:00
[PR #25] fix: auto-generate unique IDs so multiple toasts display simultaneously #28
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sileo#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hiaaryan/sileo/pull/25
Author: @lubauss
Created: 2/21/2026
Status: 🔄 Open
Base:
main← Head:fix/unique-toast-ids📝 Commits (1)
741c3f9fix: auto-generate unique IDs so multiple toasts display simultaneously📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
src/toast.tsx(+1 -1)📄 Description
Summary
Change the default toast ID from the hardcoded
"sileo-default"to an auto-generated unique ID, so multiple toasts can display simultaneously.Problem
In
createToast(), when noidis provided, it defaults to"sileo-default":This means every toast without an explicit
idshares the same identifier. Callingsileo.success(...)twice in quick succession replaces the first toast instead of showing two separate notifications.This is unexpected — most toast libraries (Sonner, react-hot-toast, etc.) show each call as a separate notification.
Solution
Use the existing
generateId()helper (already defined in the file) as the default:generateId()produces IDs like"3-m1abc2d-x7k9f2"(counter + timestamp + random), ensuring uniqueness.Files Changed
src/toast.tsx(line 134)"sileo-default"withgenerateId()Backward Compatibility
idusage still works exactly as before (deduplicated)idis providedid:Testing
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
typetosileo.show()for dynamic toast state #30