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

__init__

Initialize reactive state containers and thread lock.

add_task

Add a tracked task.

add_toast

Add a toast, applying dedup and queue limit rules.

remove_task

Remove a tracked task by ID.

remove_toast

Remove a toast by ID.

update_task

Update a tracked task by ID.

NotificationBus.__init__()[source]#

Initialize reactive state containers and thread lock.

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

NotificationBus.remove_toast(toast_id)[source]#

Remove a toast by ID.

Parameters:

toast_id (str)

Return type:

None

NotificationBus.update_task(task_id, **changes)[source]#

Update a tracked task by ID. Unknown IDs are silently ignored.

Parameters:

task_id (str)

Return type:

None