Anexo76 no es independiente del Hub/Workspace — comparten el mismo
cliente de Keycloak (hub-frontend). anexo76-frontend no existe en KC.
- Dockerfile.prod: agrega ARG/ENV VITE_KEYCLOAK_CLIENT_ID=hub-frontend
- workspace-auth.ts: actualiza fallback de 'anexo76-frontend' a 'hub-frontend'
- .env.example: actualiza a hub-frontend
- Jenkinsfile: pasa --build-arg VITE_KEYCLOAK_CLIENT_ID=hub-frontend al build
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Introduced `permissionsHydrated` writable store to track if RBAC permissions are loaded for the active company.
- Added `markPermissionsHydrated` function to set the hydration state.
- Updated dashboard components to wait for permissions to be hydrated before rendering restricted content, enhancing user experience by avoiding "Access Denied" flashes.
- Refactored permission checks in `pedimento-permissions.ts` to consistently use `userHasPermission` for clarity and maintainability.
fetchBlob no implementaba silent refresh ni propagaba X-Tenant-Override,
por lo que reportes que descargan archivo (Descargos, Vencimientos) fallaban
con "token inválido o expirado" cuando el access_token estaba vencido,
mientras el resto del dashboard refrescaba sin problema.
- Extrae buildAuthHeaders compartido por fetchApi y fetchBlob.
- fetchBlob ahora hace silent refresh y reintenta una vez en 401.
- fetchBlob muestra toast consistente en 403.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Clic en fila hace toggle multi-select; el registro clickeado queda primero en el array para que el cuadro informativo siempre muestre su info
- Clic en checkbox mantiene comportamiento independiente para selección múltiple (eliminar)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Reduce ACCESS_TOKEN_MAX_SINGLE y ACCESS_TOKEN_CHUNK_SIZE de 3500 a 2800
para garantizar que cada cookie fragmentada no supere el límite de 4096 bytes
del navegador (incluye overhead del nombre, path, attrs).
- Agrega try/catch alrededor de response.json() en el load de /auth/sso para
evitar SyntaxError no manejado si el body no es JSON.
- Type guards explícitos en tokens.access_token, refresh_token y tenant_id
para detectar respuestas incompletas del hub antes de llamar cookies.set().
- .catch(() => ({})) en refreshRes.json() para que el refresh proactivo nunca
bloquee el flujo SSO aunque el body sea inesperado.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Changed the hub-net network configuration to external in docker-compose.
- Removed the Single Sign-On (SSO) service implementation and associated login form component.
- Enhanced authentication callback logic to improve error handling and redirect management.
- Updated various routes to streamline login and authentication processes, ensuring proper redirection to workspace login.
- Cleaned up unused code and improved overall structure for better maintainability.
- Updated sidebar component to merge user data from Keycloak and Workspace, including avatar URLs.
- Refactored nav-user component to utilize new avatar resolution logic and display user information more effectively.
- Introduced a new utility function to resolve user avatar URLs, prioritizing Workspace avatars.
- Implemented backend changes to support synchronization of user profile data, including avatar URLs from Workspace.
- Added database migration to include new fields for Workspace profile synchronization in user_tenants.
- Created a new client for fetching user profiles from Workspace.
- Updated dashboard components to reflect changes in user data structure and avatar handling.
- Removed avatar upload functionality from the profile update process, relying on Workspace for avatar management.
- Added tests for avatar resolution logic to ensure correct prioritization of avatar sources.