[PR #31] fix: Fix toast identity race handling #32

Open
opened 2026-03-02 05:16:39 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hiaaryan/sileo/pull/31
Author: @the-asad-iqbal
Created: 2/24/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

  • e45544d fix: Fix toast identity race handling

📊 Changes

1 file changed (+9 additions, -3 deletions)

View changed files

📝 src/toast.tsx (+9 -3)

📄 Description

This PR fixes two high-severity toast identity issues:

  • Unnamed toasts now get unique generated ids instead of sharing a constant default id.
  • Dismiss now targets the exact (id, instanceId) pair, so delayed removal cannot delete a newer toast with the same id.

Changes

  • Updated toast creation to use a unique id when id is not provided.
  • Updated dismiss flow to:
    • capture the current instanceId
    • mark exiting only for that specific instance
    • remove only that specific instance after exit timeout

Result

  • Multiple unnamed toasts no longer overwrite each other.
  • Recreated toasts with the same id are safe from stale dismiss timers.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hiaaryan/sileo/pull/31 **Author:** [@the-asad-iqbal](https://github.com/the-asad-iqbal) **Created:** 2/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`e45544d`](https://github.com/hiaaryan/sileo/commit/e45544db052e46f63ff18413915010914f705378) fix: Fix toast identity race handling ### 📊 Changes **1 file changed** (+9 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/toast.tsx` (+9 -3) </details> ### 📄 Description This PR fixes two high-severity toast identity issues: - Unnamed toasts now get unique generated ids instead of sharing a constant default id. - Dismiss now targets the exact `(id, instanceId)` pair, so delayed removal cannot delete a newer toast with the same id. ## Changes - Updated toast creation to use a unique id when `id` is not provided. - Updated dismiss flow to: - capture the current `instanceId` - mark exiting only for that specific instance - remove only that specific instance after exit timeout ## Result - Multiple unnamed toasts no longer overwrite each other. - Recreated toasts with the same `id` are safe from stale dismiss timers. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sileo#32
No description provided.