pysepal.solara.notifications.bus.NotificationBus#
- class pysepal.solara.notifications.bus.NotificationBus[source]#
Owns notification state for a single kernel/session.
All mutations produce new list copies (never mutate in place). Thread-safe via internal lock.
Initialize reactive state containers and thread lock.
Methods
Initialize reactive state containers and thread lock.
Add a tracked task.
Add a toast, applying dedup and queue limit rules.
Remove a tracked task by ID.
Remove a toast by ID.
Update a tracked task by ID.
- NotificationBus.add_task(task)[source]#
Add a tracked task. Prunes oldest finished tasks beyond MAX_TASK_HISTORY.
- Parameters:
task (TrackedTask)
- Return type:
None
- NotificationBus.add_toast(toast)[source]#
Add a toast, applying dedup and queue limit rules.
Error toasts replace previous errors (only the latest error is kept).
- Parameters:
toast (Toast)
- Return type:
None
- NotificationBus.remove_task(task_id)[source]#
Remove a tracked task by ID.
- Parameters:
task_id (str)
- Return type:
None