This repository was archived by the owner on Jun 15, 2026. It is now read-only.
fix: prevent premature route resolution before initial auth check completes#45
Merged
Merged
Conversation
…lution Agent-Logs-Url: https://github.com/RMCampos/tasknote/sessions/8b02c4fd-b37e-4d34-8910-6d075bde6b4b Co-authored-by: RMCampos <2219519+RMCampos@users.noreply.github.com>
Co-authored-by: RMCampos <2219519+RMCampos@users.noreply.github.com>
Agent-Logs-Url: https://github.com/RMCampos/tasknote/sessions/8b02c4fd-b37e-4d34-8910-6d075bde6b4b Co-authored-by: RMCampos <2219519+RMCampos@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix home page loading issue when reopening tab with valid session
fix: prevent premature route resolution before initial auth check completes
May 7, 2026
RMCampos
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On page load/refresh,
AuthProviderinitializes withsigned: falsewhile the async session check runs inApp'suseEffect. The router renders immediately with the unauthenticated config, redirecting logged-in users away from/homebefore the check resolves.Changes
AuthContext.ts: Addedloading: booleantoAuthContextDatainterfaceAuthProvider.tsx: Addedloadingstate (defaulttrue); moved the initialcheckCurrentAuthUsercall here (fromApp.tsx) in a mount-onlyuseEffect; setsloading = falsevia.catch().finally()after the check settlesApp.tsx: Readsloadingfrom context; suppressesRouterProvideruntilloadingisfalse; removes the now-redundantcheckCurrentAuthUseruseEffectauthContextMock.ts: Addedloading: falseto the test mockAuthProvider.test.tsx: Added tests assertingloadingtransitions tofalseafter mount (both with and without a valid token)Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node node dist/index.js --exec install(dns block)If you need me to access, download, or install something from one of these locations, you can either: