Problema:
La verificación de sesión usaba HEAD /api/music que no es confiable
porque:
- Los headers de Authentik solo están disponibles en el servidor
- El Service Worker puede servir respuestas cacheadas
- No había headers no-cache para evitar respuestas obsoletas
Solución:
Implementar verificación correcta basada en plantillaNuxtAuthentikProxy:
1. Nuevo endpoint /api/auth/status.get.ts
- Lee headers de Authentik directamente desde el servidor
- Headers no-cache para verificación en tiempo real
- Retorna estado autenticado + info de usuario
2. Actualizar useAuth.ts
- checkAuth() ahora usa /api/auth/status
- fetchUserInfo() también usa el nuevo endpoint
- Lógica simplificada y más confiable
Con esto, la verificación de sesión es precisa y en tiempo real,
consultando directamente los headers de Authentik en el servidor.
- Created /api/auth/userinfo endpoint to fetch user data from Authentik headers
- Added userInfo state and fetchUserInfo() function to useAuth composable
- Implemented compact user info header in dropdown with avatar, name, and email
- Avatar shows user initials with gradient background
- Styled with glassmorphism design matching app aesthetic
- Agrega @pinia/nuxt, idb y store central (stores/music.ts)
- Cacheo manual desde menú contextual y borrado (TrackContextMenu)
- Ícono verde para canciones cacheadas, sin auto-cache al reproducir
- Toasts de feedback (stores/toast.ts, ToastContainer)
- Fallback offline de listado a IndexedDB; fix MUSIC_DIR absoluto en preview/prod
- Ajustes PWA: navigateFallback '/', devOptions, workbox condicional
- Estilos y animación del context menu (tema light/dark, blur fuerte)
- Correcciones de sintaxis y posicionamiento exacto al cursor
- Fix path traversal security check by using absolute paths
- Remove problematic fetch override that forced JSON headers on all API requests
- Add error tracking and visual indicators for failed tracks
- Correct music directory resolution for both relative and absolute paths
The main issue was the security validation comparing relative paths incorrectly,
causing legitimate music file requests to be rejected with 403 errors.
- Add PWA icons in multiple sizes (192px, 512px, maskable)
- Configure manifest.webmanifest with proper icon references
- Implement PWA install prompt with custom notification
- Add manual manifest route for development compatibility
- Update meta tags for iOS and Android PWA support
- Configure service worker with music and image caching
- Enable auto-updates and offline functionality
PWA now fully installable on all platforms with proper branding.