@@ -595,6 +595,10 @@ export const StateInspector = () => {
595595
596596 // Atoms for redirect logic debugging
597597 const pathname = usePathname ( ) ; // Get current pathname
598+ const pendingRedirectValue = useAtomValue ( pendingRedirectAtom ) ;
599+ const requiredSetupRedirectValue = useAtomValue ( requiredSetupRedirectAtom ) ;
600+ const loginActionInProgressValue = useAtomValue ( loginActionInProgressAtom ) ;
601+ const lastKnownPathValue = useAtomValue ( lastKnownPathBeforeAuthChangeAtom ) ;
598602 const restClientFromAtom = useAtomValue ( importedRestClientAtom ) ;
599603 const activityStandardFromAtom = useAtomValue ( activityCategoryStandardSettingAtomAsync ) ;
600604 const numberOfRegionsFromAtom = useAtomValue ( numberOfRegionsAtomAsync ) ;
@@ -660,6 +664,12 @@ export const StateInspector = () => {
660664 loading : workerStatusValue . loading ,
661665 error : workerStatusValue . error ,
662666 } ,
667+ navigationState : {
668+ pendingRedirect : pendingRedirectValue ,
669+ requiredSetupRedirect : requiredSetupRedirectValue ,
670+ loginActionInProgress : loginActionInProgressValue ,
671+ lastKnownPathBeforeAuthChange : lastKnownPathValue ,
672+ } ,
663673 redirectRelevantState : {
664674 authCheckDone : authLoadableValue . state !== 'loading' ,
665675 isRestClientReady : ! ! restClientFromAtom ,
@@ -765,9 +775,14 @@ export const StateInspector = () => {
765775 </ div >
766776
767777 < div >
768- < strong > Redirect Relevant State :</ strong >
778+ < strong > Navigation & Redirect Debugging :</ strong >
769779 < div className = "pl-4 mt-1 space-y-1" >
770780 < div > < strong > Pathname:</ strong > { pathname } </ div >
781+ < div > < strong > Pending Redirect:</ strong > { pendingRedirectValue || 'None' } </ div >
782+ < div > < strong > Required Setup Redirect:</ strong > { requiredSetupRedirectValue || 'None' } </ div >
783+ < div > < strong > Login Action in Progress:</ strong > { loginActionInProgressValue ? 'Yes' : 'No' } </ div >
784+ < div > < strong > Last Known Path (pre-auth):</ strong > { lastKnownPathValue || 'None' } </ div >
785+ < hr className = "my-1 border-gray-500" />
771786 < div > < strong > Auth Check Done:</ strong > { authLoadableValue . state !== 'loading' ? 'Yes' : 'No' } </ div >
772787 < div > < strong > REST Client Ready:</ strong > { restClientFromAtom ? 'Yes' : 'No' } </ div >
773788 < div > < strong > Activity Standard:</ strong > { activityStandardFromAtom === null ? 'Null' : JSON . stringify ( activityStandardFromAtom ) } </ div >
0 commit comments