Funcionalidades
Cambio de Sesion
Dropdown con sesiones recientes. Cambio optimista con rollback automatico en caso de error.
Dropdown con sesiones recientes. Cambio optimista con rollback automatico en caso de 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.