Removes all third-party CDN dependencies#181
Conversation
- React app: install @fontsource/inter + @fontsource/jetbrains-mono; import weights 400-700 (Inter) and 400-500 (JetBrains Mono) in main.tsx — Vite bundles the WOFF2 files at build time - client/index.html: remove Google Fonts preconnect + stylesheet links - fonts/: add self-hosted WOFF2 files (Inter 400-900, JetBrains Mono 400-700) and fonts.css with @font-face declarations for static pages - index.html (landing page): swap Google Fonts link for fonts/fonts.css - wiki/index.html: swap Google Fonts link for ../fonts/fonts.css; replace CDN mermaid script with local wiki/mermaid.min.js - vscode-extension/extension.js: remove Google Fonts loader from the 'Dashboard Offline' error page; fall back to system font stack No external network calls are made on page load after this change.
|
✅ All contributors have signed the CLA. Thank you! |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Code Review
This pull request replaces external Google Fonts and CDN dependencies with self-hosted alternatives across the client, wiki, and VS Code extension. Specifically, it introduces @fontsource packages for Inter and JetBrains Mono in the client, adds a local fonts.css stylesheet with @font-face definitions, and switches the wiki's Mermaid JS script to a local file. I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…redesign + tooltips; PR hoangsonww#181 CDN fixes Branding splash: - New SplashScreen overlay shown once per session on load: time-aware greeting, localized tagline + subtexts, animated node-graph mark. Opaque from the first paint (no app flash-through), ~2.5s hold then fade-out, click-to-skip, prefers-reduced-motion aware. New `splash` i18n namespace (en/zh/vi). Analytics: - The chart region now shows pulsing skeletons while loading (it previously rendered empty/zero charts); the shared <Skeleton> already pulses, this fills the Analytics gap. Compaction Impact (Workflows): - Redesigned the confusing chart into a "sessions by compaction count" histogram with real axis titles, meaningful stat tiles (total / sessions affected / avg / peak), an explanatory help line, and a plain-English summary. Removed the broken `sortedByCompaction` key and the misleading "0 tokens recovered" headline (now a footnote shown only when > 0). - Added rich hover tooltips matching the app's other charts, with a full-height hit-area per column and a hover highlight. Workflows section headers: - Clamp the right-aligned subtitle to a single line (ellipsis + hover title) so a long translation no longer wraps and unbalances the header row. Tabby companion: - Remove em dashes from Tabby's spoken quips / intents (e.g. "your turn - a session's waiting") and the remaining Tabby files. PR hoangsonww#181 (remove external CDNs) fixes: - Re-vendored the genuine minified mermaid@10.9.6 (3.2 MB, was a 7.3 MB pretty-printed blob) with a provenance banner. - Trimmed @fontsource imports to the latin subset (6 bundled woff2, not 36). Co-Authored-By: jr692 <204519893+jr692@users.noreply.github.com>
Document the external-CDN removal across the README trio (en/zh/vi), ARCHITECTURE, and the landing page: fonts (Inter + JetBrains Mono) bundled via @fontsource for the React app and self-hosted via fonts/fonts.css for the static pages + wiki; Mermaid vendored locally (wiki/mermaid.min.js, mermaid@10.9.6); VS Code extension error page on a system font stack. No fonts.googleapis.com / gstatic / jsDelivr calls remain. Co-Authored-By: jr692 <204519893+jr692@users.noreply.github.com>
…+ tooltips Document the UI features added in this PR across the README trio (en/zh/vi), ARCHITECTURE, and the landing page: - Session splash screen on app load (time-aware greeting, localized tagline, animated node-graph mark, opaque-from-first-paint, ~2.5s, click-to-skip). - Analytics now shows pulsing skeleton placeholders for the chart region while loading, not just the stat tiles. - Compaction Impact redesigned into a 'sessions by compaction count' histogram with axis titles, stat tiles, a help line, and per-bar hover tooltips. - Workflows section subtitles clamp to a single line so long translations no longer wrap the header. Co-Authored-By: jr692 <204519893+jr692@users.noreply.github.com>
…rnal-assets # Conflicts: # README-CN.md # client/src/components/workflows/CompactionImpact.tsx
Summary
Removes all third-party CDN dependencies that caused network calls on every page load. After this change, no external requests are made for fonts or scripts.
Changes
@fontsource/inter+@fontsource/jetbrains-mono; imported per-weight CSS inmain.tsxso Vite bundles the WOFF2 files intodist/assets/at build time with content hashes. Removed Google Fonts<link>tags fromclient/index.html.index.html,wiki/index.html): addedfonts/directory at the project root with self-hosted WOFF2 files and afonts.css@font-facestylesheet. Relative paths resolve correctly under GitHub Pages. Also fixed a pre-existing gap: JetBrains Mono weight 700 was not included in the original Google Fonts request (font-synthesis was silently used for the API method badges in the wiki); the real glyph file is now served.mermaid@10bundle towiki/mermaid.min.js; updated<script src>to point locally.getErrorHtml()template; falls back to system font stack..prettierignore: excludedwiki/mermaid.min.js(vendored minified bundle) andfonts/*.woff2(binary) from Prettier.Type of Change
How to Test
npm run setup && npm run build— confirm build succeeds andclient/dist/assets/containsinter-latin-*.woff2andjetbrains-mono-latin-*.woff2filesnpm startand openhttp://localhost:4820— open DevTools → Network → filter byfonts.googleapis.comorfonts.gstatic.com; confirm zero requestsindex.htmlandwiki/index.htmldirectly in a browser with network throttling / offline mode — fonts render correctly from local filesnpm run format:check— passes with no warningsChecklist
🖋️ CLA Assistantbot will prompt me on my first PR)npm test) — both the server (better-sqlite3native binding /NODE_MODULE_VERSIONmismatch) and client (TabbylocalStorage/ jsdom issue, one obsolete snapshot) suites have pre-existing failures onmasterthat are unrelated to this change;npm run buildcompletes cleanlynpm run format:check)Screenshots
Dashboard running with locally-served Inter font (no requests to
fonts.googleapis.com):