Rename system to SIB: update translations, logos, views, stores and logs
This commit is contained in:
@ -40,12 +40,12 @@ async function dispatchRefocus(reason: string) {
|
||||
// Debounce: no disparar dos eventos seguidos en menos de 1 segundo
|
||||
if (refocusDebounceTimer) return
|
||||
refocusDebounceTimer = setTimeout(() => { refocusDebounceTimer = null }, 1000)
|
||||
console.log(`SIBU | App.vue dispatching auth check and refocus — motivo: ${reason}`)
|
||||
console.log(`SIB | App.vue dispatching auth check and refocus — motivo: ${reason}`)
|
||||
|
||||
// 🛡 HIGIENE TRANSACCIONAL: Solo verificamos sesión si el usuario estaba logueado.
|
||||
// Si Guest, omitimos el Refresh para no fallar
|
||||
if (authStore.isAuthenticated) {
|
||||
console.log(`SIBU | Verificando sanidad de sesión Supabase...`)
|
||||
console.log(`SIB | Verificando sanidad de sesión Supabase...`)
|
||||
const timeoutMs = 5000
|
||||
|
||||
const refreshWithTimeout = Promise.race([
|
||||
@ -58,12 +58,12 @@ async function dispatchRefocus(reason: string) {
|
||||
try {
|
||||
await refreshWithTimeout
|
||||
} catch (err: any) {
|
||||
console.warn("SIBU | Error al verificar sesión en refocus (timeout o red).", err)
|
||||
console.warn("SIB | Error al verificar sesión en refocus (timeout o red).", err)
|
||||
// FIX CRÍTICO: Si el error es de timeout (5s), la persona estaba eligiendo ruta o
|
||||
// subiendo archivo y la red tardó. NUNCA expulsarla automáticamente en timeout.
|
||||
// El caché local de Supabase ya mantiene su sesión válida bajo el capó.
|
||||
if (err.message === "Auth refresh timeout") {
|
||||
console.log("SIBU | Ignorando timeout, manteniendo sesión optimista.")
|
||||
console.log("SIB | Ignorando timeout, manteniendo sesión optimista.")
|
||||
} else {
|
||||
// Solo si hay un error real de Auth (sesión vencida rechazada por Supabase)
|
||||
// se cierra sesión, pero no haremos signOut agresivo sin confirmar.
|
||||
@ -96,9 +96,9 @@ function forceResetAllLoadingStates() {
|
||||
if (authStore.isAuthenticated) {
|
||||
useFavoritesStore().$patch({ isLoading: false })
|
||||
}
|
||||
console.log('SIBU | ✅ Loading states reseteados tras regreso del background')
|
||||
console.log('SIB | ✅ Loading states reseteados tras regreso del background')
|
||||
} catch (e) {
|
||||
console.warn('SIBU | No se pudo resetear loading states:', e)
|
||||
console.warn('SIB | No se pudo resetear loading states:', e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user