Repository navigation
fix(client): self-host fonts and drop the Replit banner script - #244
Merged
Merged
Conversation
The start page blocked on a Google Fonts stylesheet and a synchronous replit.com script; when either host was slow, page load hung and the page stayed blank (flaky arduino-board-header E2E, filtered school networks). Inter and JetBrains Mono now ship with the bundle via @fontsource-variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Taken from the CI runner (identical on attempt and retry); only the JetBrains Mono glyphs differ, layout is unchanged. Approved by the owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 2 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
e2e/arduino-board-header.spec.ts:75failed intermittently:page.goto('/')waited 60 s for theloadevent, the server logged no request at all, and the screenshot showed an empty page. Cause:client/index.htmlloaded a render-blocking Google Fonts stylesheet (~25 families) and a synchronoushttps://replit.com/public/js/replit-dev-banner.js;index.cssimported a second Google Fonts stylesheet. Whenever one of these hosts answered slowly, the page stayed blank. The same happens to real users behind filtered school networks, and loading Google Fonts directly is also a privacy concern.Fix
@fontsource-variable/interand@fontsource-variable/jetbrains-mono(5.3.0, pinned). Font stacks now start with the variable families and keep the previous fallbacks.New regression test
e2e/self-contained-page-load.spec.tsfails when the start page requests a third-party host (RED with the old client: 9 requests to Google Fonts/Replit; GREEN now).Not included
The CSP in
server/index.tsstill allowsreplit.comand the Google Fonts hosts. Tightening it requires changing the existing assertion intests/server/dev-entrypoint.test.ts, so it is left for a follow-up after owner approval.Test plan
./run-tests.sh– all 11 stages green; E2E 28/28 without retries (incl. visual snapshot), E2E time 4.5 min → 1.6 min.woff2files (312 KB) and no reference tofonts.googleapis.com,fonts.gstatic.comorreplit.com🤖 Generated with Claude Code