Skip to content

fix(site): serve local fonts in legacy docs and standalone builders - #1185

Draft
testikun wants to merge 3 commits into
tt-a1i:devfrom
testikun:codex/site-language-font-timeout
Draft

testikun wants to merge 3 commits into
tt-a1i:devfrom
testikun:codex/site-language-font-timeout

Conversation

@testikun

@testikun testikun commented Nov 3, 2026 •

Copy link
Copy Markdown

Problem and value

Legacy docs/index.html and the Start/Guide/Gallery templates still request Google Fonts while the Astro site already uses checked-in local fonts. On current dev, native site-language integration reproducibly exceeds its 15-second Page.loadEventFired wait when the external font request stalls.

These pages now use assets/fonts.css. Existing copySiteAssets publishes the website's unchanged CSS, five WOFF2 files, four OFL notices and source/hash manifest through its existing atomic transaction. Default and custom standalone build destinations receive the same resources.

This draft requests scope review for an independent reliability issue found during #618 validation. Existing closed diagram-font work (#242/#277) does not cover these legacy page links. Reproduction, before/after screenshots, resource measurements and ablation.

AI assistance and accountability

  • AI use: implementation, investigation, tests, review and writing assistance.
  • Tools/model: Codex (GPT-6), under the contributor's direction; legacy page links/templates, asset publication, tests and browser evidence.
  • Accountable contributor: @testikun.
  • Problem origin: an actual native integration-test timeout, reproduced on unmodified dev and isolated to the external font dependency. Screenshot failure conditions are separately identified below.
  • I reviewed the submitted changes and explanation, understand their impact, and can answer questions about them. Validation results and gaps are recorded below.

Stability impact

Shared site asset publication and four legacy pages are affected. Font families, styles, weights, source bytes/licenses and Chinese system fallbacks remain unchanged. Canonical source remains website/public/fonts/. No timeout increase, retry, proxy, remote downloader or formal-test network override is added.

The existing publisher's preflight, inode identity, rollback and claimant protections remain. Focused simplification reuses that transaction rather than introducing another asset publisher. Ablation shows both the local page link and publication entries are needed. Existing success tests now compare emitted CSS/font/license bytes against the independent source manifest; existing failure tests remain. The real browser language gate is unchanged.

Tests run

Base: 63c9263e84bd3993cab8e09b3d69888857858635, fetched unchanged on 2026-11-03. Product commit: b7eb6c089480660ceafbe9241beb84e7a4677a45. Final head: 0d107d328fd131324d32c97d4fe154bb6d2f17cb adds evidence only. Runs used exact product bytes before commit; the manifest verifies all 21 product files. These are reused local results.

macOS arm64, official Node 22.23.2, Chrome 156.0.8078.74:

  • New expectations fail on the original implementation: missing published fonts and missing local stylesheet.
  • Native npm run test:webm: exit 0, export and three Story tests pass; site-language 7/7, no skips, with normal Chrome and no diagnostic preload.
  • Focused publication/site suites: 29 pass, 0 fail, 2 existing opt-in skips covered by the serialized integration run.
  • Existing website/test/local-fonts.test.mjs: 2 pass.
  • npm run test:full: 3,538 pass, 134 environment-dependent skips, 1 independently reproduced dev failure. The unchanged README motion receipt records 7f68d730… but the unchanged Sequence artifact hashes to ca273484…; tracked in existing fix(docs): recapture README animation after Sequence header centering #1174. This PR does not suppress or change that unrelated evidence.
  • Four pages at desktop/mobile plus Chinese homepage at both sizes: 10 states, all five font faces load in every state, zero remote font resources.
  • Product and evidence hashes verified; git diff --check passes.

Final-head CI run has started; as of 2026-11-03 01:44 UTC, scope, Node 18/20/24, ZIP freshness, published-manifest and Ubuntu/macOS package-smoke checks pass. Other jobs are running, so there is no final green result yet. No Safari/Firefox claim. The independent Reader proposal is #1186.

Visual evidence

Desktop/mobile pairs and Chinese/Gallery checks use the same browser, page, language and viewport. The capture harness makes Google Fonts immediately unavailable only for screenshots: before uses fallback fonts, after uses the intended local fonts. This is a deterministic unavailable-font comparison, not a latency benchmark or pixel-equality claim. Formal integration above uses no such override. Detailed screenshot comment.

Codex inspected English desktop/mobile, Chinese mobile and Gallery captures without finding new overlap/overflow. Human visual acceptance is pending.

Generated artifacts

Regenerated Start/Guide/Gallery pages and added 11 exact copies of the canonical local resources in docs/assets/. Diagram artifacts, Gallery diagram manifest, canonical font source and archify.zip are unchanged. An evidence-only commit publishes screenshots and measurements. No deployment, release or live installation is performed.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@testikun

testikun commented Nov 3, 2026 •

Copy link
Copy Markdown
Author

Reproduction and visible result

This fixes the legacy site's external font dependency discovered during #618 validation; the independent Reader change is #1186. Untouched dev@63c9263e can time out at the existing 15-second Page.loadEventFired wait. The product fix is b7eb6c08; published head 0d107d32 adds only evidence. Complete report, resource observations, hashes and ablation.

The before/after screenshots deliberately make Google Fonts immediately unavailable in the capture harness only, using the same browser, page, language and viewport. Before shows system fallback; after loads the intended font files locally. They demonstrate unavailable-font behavior, not network speed. The native passing tests below use no capture override.

Before: external font unavailable, 1440×900 After: local fonts, 1440×900
Desktop before Desktop after
Before: 390×844 After: 390×844
Mobile before Mobile after

Compatibility coverage

Chinese homepage: 390×844 Gallery: 1440×900
Chinese homepage after Gallery after

Four pages at desktop/mobile plus Chinese homepage at both sizes give 10 observed candidate states. All five font faces loaded in each, with zero remote font resources. Chinese keeps the existing system fallback. Font families, styles, weights and source bytes are unchanged; unavailable-font fallback and intended-font screenshots naturally differ in glyphs and wrapping.

The home page and three templates now point to assets/fonts.css. Existing atomic copySiteAssets publishes the canonical stylesheet, five WOFF2 files, four OFL notices and source manifest to default and custom build destinations. Its existing preflight/rollback/concurrency safeguards remain. Diagram artifacts, Gallery diagram manifest and canonical ZIP are untouched.

Ablation confirms that removing the copy entries leaves a custom build without fonts, while removing the local homepage link restores the failing baseline bytes. No new publication abstraction, longer timeout, retry or downloader is needed.

Actual test results

  • Native npm run test:webm exits 0: export and three Story tests pass, followed by all 7/7 language tests, no skips and no diagnostic preload/network blocking.
  • Focused publication/site suites: 29 pass, 0 fail, with two existing opt-in skips covered by the serialized integration above.
  • Existing canonical font tests: 2 pass; emitted CSS/font/license files match the independent source manifest.
  • Full suite: 3,538 pass, 134 skips, 1 existing dev failure. The unchanged README motion receipt references 7f68d730…, while the unchanged Sequence artifact is ca273484…. This failure was independently reproduced on untouched dev and is already tracked in fix(docs): recapture README animation after Sequence header centering #1174. It is not suppressed or bundled into this font fix.

Environment: macOS arm64, official Node 22.23.2, Chrome 156.0.8078.74. The manifest binds reused exact-product evidence; remote CI is recorded separately and not inferred from local runs.

Codex visually inspected English desktop/mobile, Chinese mobile and Gallery captures without finding new overlap/overflow. Human visual acceptance and Safari/Firefox remain unverified. This PR does not deploy the site.

CI snapshot, 2026-11-03 01:44 UTC: run 41561565355 is running against this head. Scope, Node 18/20/24, ZIP freshness, published-manifest and Ubuntu/macOS package-smoke checks have passed. Other jobs are running; this partial result does not establish full CI or browser compatibility on those platforms.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant