Header loading optimization #43

Merged
quoije merged 1 commits from cursor/header-loading-optimization-321c into 2026 2025-12-21 18:03:00 -05:00
quoije commented 2025-12-21 18:02:31 -05:00 (Migrated from github.com)

Eliminate header flickering by implementing early rendering of user data and stabilizing layout.

The header elements (username, admin link, logo) were appearing or shifting after the initial page load, causing a visible "flicker." This PR addresses this by preloading the logo, rendering user data from a cached JWT immediately, and reserving space for dynamic elements to prevent layout shifts. The initial blur overlay also briefly covered the navbar, which is now prevented by setting a default top value.


Open in Cursor Open in Web

Eliminate header flickering by implementing early rendering of user data and stabilizing layout. The header elements (username, admin link, logo) were appearing or shifting after the initial page load, causing a visible "flicker." This PR addresses this by preloading the logo, rendering user data from a cached JWT immediately, and reserving space for dynamic elements to prevent layout shifts. The initial blur overlay also briefly covered the navbar, which is now prevented by setting a default `top` value. --- <a href="https://cursor.com/background-agent?bcId=bc-a7fb2785-05d0-4994-9191-7b6278d73c40"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-a7fb2785-05d0-4994-9191-7b6278d73c40"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a>
cursor[bot] commented 2025-12-21 18:02:32 -05:00 (Migrated from github.com)

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Cursor Agent can help with this pull request. Just `@cursor` in comments and I'll start working on changes in this branch. <sub>[Learn more](https://cursor.com/docs/background-agent/web-and-mobile) about Cursor Agents</sub>
Sign in to join this conversation.