> ## Documentation Index
> Fetch the complete documentation index at: https://docs.telepatia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Switching

> Dropdown with recent sessions. Optimistic switch with automatic rollback on error.

Dropdown with recent sessions. Optimistic switch with automatic rollback on error.

The session switcher dropdown lists the doctor's recent sessions, fetched via background worker IPC. Each row shows patient name (or "Paciente HH:mm" fallback) and creation time.

The switch is optimistic: storage is updated immediately for instant UI feedback. If the backend sync fails (timeout or error), the switch rolls back to the previous session and shows an error toast. Empty results ("no record yet") are NOT treated as failures — a brand-new session legitimately has no data yet.
