Skip to content

fix(navbar): refresh auth state#1068

Draft
Sbragul26 wants to merge 4 commits into
layer5io:masterfrom
Sbragul26:fix/navbar-auth-avatar-refresh
Draft

fix(navbar): refresh auth state#1068
Sbragul26 wants to merge 4 commits into
layer5io:masterfrom
Sbragul26:fix/navbar-auth-avatar-refresh

Conversation

@Sbragul26
Copy link
Copy Markdown
Member

Notes for Reviewers

This PR fixes #1067
The navbar now updates the login state when the page is reopened or focused, so the user avatar shows automatically after sign-in.

Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds event listeners for 'focus' and 'pageshow' to trigger user authentication checks on the navbar. The reviewer correctly identified that these events, alongside 'visibilitychange', can trigger concurrent, redundant API requests in rapid succession. They provided a helpful suggestion to implement a flag guarding against concurrent executions.

Comment thread layouts/partials/navbar.html
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

🚀 Preview deployment: https://layer5io.github.io/docs/pr-preview/pr-1068/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

Sbragul26 added 2 commits May 30, 2026 02:45
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
@Sbragul26 Sbragul26 marked this pull request as draft May 30, 2026 07:01
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Navbar avatar not showing after sign-in

1 participant