A LiveComponent that renders the sessions sidebar.
Permanently mounted as a left sidebar over the main chat interface.
Lists every persisted session plus any currently-running session that
hasn't been persisted yet, with running sessions sorted to the top.
Updates live in response to Omni.Session.Manager events.
Assigns from parent
id— required Phoenix component idcurrent_id— the currently active session id (for row highlighting)manager— theOmni.Session.Managermodule to query
Live updates
Manager events are not delivered to LiveComponents directly — the parent
LiveView receives {:manager, _, _, _} messages and forwards them with
send_update/2, passing the event under a manager_event: assign that
this component pattern-matches:
def handle_info({:manager, _, _, _} = msg, socket) do
send_update(Omni.UI.SessionsComponent, id: "sessions", manager_event: msg)
{:noreply, socket}
endEvents bubbled to the parent LiveView (not phx-target-ed)
open_sessionwithsession-id— parent shouldpush_patchto the session URLnew_session— parent shouldpush_patchto/:active_session_deleted— sent as a process message when the user deletes the currently active session