- Shipped
- 24 жовтня 2025 р. о 21:53 UTC
- Author
- snadjafinia
- Commit
- 93b5085
1. God Mode State (useUserInfo hook): - Move isGodMode to GLOBAL state in hook (not local to NavTop) - Export isGodMode, setIsGodMode for all components - isGodModeActive() = isGod (permission) AND isGodMode (state) - Auto-loads/saves to localStorage in hook 2. NavTop Component: - Remove local godModeActive state - Use global isGodMode from hook - Completely isolated from acceptingLeads toggle - Toggle calls setIsGodMode() from hook 3. Session Warning at Zero: - When countdown reaches 0, verify actual Redis TTL - If TTL > 300s: Close popup (extended by another app) - If TTL > 0 but < 300s: Update timer with new TTL - If TTL = 0 or 404: Redirect to /logout (truly expired) - Prevents false expiration when another app extended session Architecture: - isGod: Permission from session (read-only) - isGodMode: Global UI state (user-controlled) - isGodModeActive(): Secure check (both required) This fixes: - God mode toggle interference with accepting leads - Session popup stuck at 0:00 when session still valid - Proper logout when session actually expires