fix: prevent white background flash on docs redirect pages#4356
fix: prevent white background flash on docs redirect pages#4356NicholasKissel wants to merge 2 commits intomainfrom
Conversation
Inline dark background color on the html element so it's applied immediately by the browser before stylesheets load. Add a post-build Astro integration to inject the same styling into generated redirect pages that only contain a meta-refresh tag. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
🚅 Deployed to the rivet-pr-4356 environment in rivet-frontend
|
PR Review: fix: prevent white background flash on docs redirect pagesOverall this is a clean, well-targeted fix for a real UX problem. The approach is correct - inlining the background color on the What is Good
IssuesMissing Even for a redirect page, a Hardcoded color value duplicated across two files The value No error handling in the integration If any file read/write fails in "Overview" label pointing to In
The OpenAPI and AsyncAPI links already had SummaryThe core fix is sound and the implementation is clean. The main actionable items are the missing |
…/docs links Replace the Astro config redirect for /docs with a real page that renders a dark background before redirecting, preventing white flash in both dev and production. Update all internal /docs links to point directly to /docs/actors to avoid the redirect entirely.
Description
Fixes white background flash that occurs when the browser follows a meta-refresh redirect on the statically-built documentation site. The fix inlines the dark background color directly on the
<html>element so it's applied immediately by the browser before stylesheets load. Additionally, a new post-build Astro integration injects the same styling into Astro's generated redirect HTML files that only contain a meta-refresh tag and aren't covered by the base layout.Type of change
How Has This Been Tested?
The fix can be tested by:
pnpm buildin the website directory)Checklist: