From 264a930c6ab2d6fb82e286fb1fd045aeed2af534 Mon Sep 17 00:00:00 2001 From: pac7 <47831526-pac7@users.noreply.replit.com> Date: Sun, 12 Oct 2025 17:06:29 +0000 Subject: [PATCH] Fix authentication loading state issue by simplifying auth hook Resolved perpetual loading state issue in auth buttons by simplifying useAuth hook's loading state management, removing blocking conditional logic, adding explicit setLoading(false) calls in all code paths, and ensuring pending email state cleanup occurs before early returns. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e7030bef-c72b-4948-9378-ee5e345d91ce Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/e7030bef-c72b-4948-9378-ee5e345d91ce/iYcvvsb --- replit.md | 1 + 1 file changed, 1 insertion(+) diff --git a/replit.md b/replit.md index 9390357e..00cdf687 100644 --- a/replit.md +++ b/replit.md @@ -5,6 +5,7 @@ ThrillWiki is a community-driven web application for discovering, reviewing, and ## Recent Changes **October 2025 - Critical Bug Fixes & Stability Improvements (Latest)** +- **Auth Loading State Fix**: Resolved perpetual loading state issue in auth buttons by simplifying useAuth hook's loading state management, removing blocking conditional logic, adding explicit setLoading(false) calls in all code paths, and ensuring pending email state cleanup occurs before early returns - **React Hooks Violation Fix**: Resolved critical hooks ordering issue in useSearch that caused app crashes during hot module reload (HMR) by using stable useMemo with entire options object as dependency - **Race Condition Prevention**: Fixed stale data issues in useEntityVersions by capturing request IDs before async operations and using them consistently in error handlers - **Enhanced Error Handling**: Improved notificationService with comprehensive error logging, validation, and consistent error message extraction across all edge function invocations