This pull request introduces improvements to both the frontend and backend, focusing on session/authentication debugging in the frontend and efficient caching for remote path mappings in the backend. The main changes add session debugging utilities, enhance error handling for authentication, and implement per-client caching for remote path mappings to reduce database load and improve performance.
Frontend (Session Debugging and Authentication Handling):
- Added comprehensive session debugging utilities (
logSessionState,clearAllAuthData) infe/src/utils/sessionDebug.ts, allowing developers to inspect and clear all authentication-related data, and made these utilities globally available in development mode. - Improved authentication error handling in
fe/src/App.vueandfe/src/stores/auth.tsby logging session state before and after authentication attempts, verifying session health, and proactively clearing stale authentication data (tokens, cookies, local/session storage) on authentication failures (401/403). [1] [2]
Backend (Remote Path Mapping Caching):
- Introduced per-client caching for remote path mappings in
listenarr.api/Services/RemotePathMappingService.csusingIMemoryCache, reducing redundant database queries and improving performance for repeated lookups. [1] [2] - Ensured cache invalidation by evicting cached entries whenever a remote path mapping is created, updated, or deleted, keeping the cache consistent with the database. [1] [[2]](diffhunk://#diff-03c9f460cac...
Automated canary build