fix(nav): keep sign-in and sign-up in the header without JavaScript #154
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-web#154
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
With JavaScript disabled, the header contains no "Sign in" and no "Sign up". Measured on
/at375 px with JavaScript off:
src/components/secondary-navigation.astro:74renders<UserMenu server:defer>, and the onlything in the served HTML is the layout placeholder at
:75-78, which isaria-hidden="true"andcarries no links. The served HTML of
/docs/faq/contains no/auth/loginlink anywhere on thepage. The same hole opens with JavaScript enabled whenever the
/_server-islands/UserMenurequestfails, which has no error state.
/auth/*is still a scaffold today, so this is currently latent — which makes now the cheapesttime to fix it.
Constraint: keep the island
Pages set shared-cache headers (
src/pages/index.astro:13-14public, max-age=300, s-maxage=3600;src/pages/docs/index.astro:25-26max-age=86400; likewise/aboutand/pricing). The deferred island is what keeps a signed-in user's menu out of a shared cache.Rendering the menu inline would put it there. Do not do that.
Fix
Replace the
aria-hiddenplaceholder with the anonymous menu — "Sign in", plus "Sign up"gated on
signupsOpen()exactly assrc/components/user-menu.astro:76already gates it. Anonymouslinks are safe to cache; that is the state a shared cache should hold.
Done when
/,/en/and/docs/faq/shows Sign in and Sign up.flash first.
src/components/secondary-navigation.astro:35-71must still hold.publiccache header.Part of gitborg/gitborg-docs#67.
supernaut refererade till detta ärende från bitborg/bitborg-docs2026-08-02 12:32:47 +00:00