Session 41: P0 audit fixes — MLB stat_types, broken routes, tier mismatch, self-hosted fonts (1940 tests)
- Backend: whitelist MLB stat_types in analyze.js + scan.js gates (mirrors python validation.py); fixes MLB scans 400ing. - Routes: /settings -> /profile, /report -> /blog redirect pages. - Profile: read tier from useAuth().tier (nav's source) to kill the Free-vs-DESK mismatch. - Fonts: self-host Inter/JetBrains Mono/IBM Plex Mono via next/font, drop the 503ing fonts.googleapis.com <link>; rewire literal font-family refs to vars. - Kept /settings/security (real MFA page) intact — NOT clobbered to a redirect. - +33 tests (1907 -> 1940), 149 suites; web build clean (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-11
@@ -1,4 +1,5 @@
|
||||
import type { Metadata, Viewport } from 'next';
|
||||
import { Inter, JetBrains_Mono, IBM_Plex_Mono } from 'next/font/google';
|
||||
import PostHogProvider from '@/components/PostHogProvider';
|
||||
import AuthProvider from '@/contexts/AuthContext';
|
||||
import ParlayProvider from '@/contexts/ParlayContext';
|
||||
@@ -21,6 +22,22 @@ import { headers } from 'next/headers';
|
||||
import { LOCALE_HEADER, COUNTRY_HEADER, isLocale, DEFAULT_LOCALE, LOCALE_META } from '@/lib/locales';
|
||||
import './globals.css';
|
||||
|
||||
// Session 41 — self-hosted via next/font (downloaded at build time, served
|
||||
// from our origin). Replaces the runtime fonts.googleapis.com <link>, which
|
||||
// returned 503 in production and added ~4s to page load. §2 brand fonts:
|
||||
// Inter for chrome/UI (--font-sans), JetBrains Mono for ALL data (--font-mono).
|
||||
// IBM Plex Mono (--font-ibm) kept for the wordmark + legacy mono surfaces while
|
||||
// pages migrate. globals.css :root maps --sans/--mono onto these variables.
|
||||
const inter = Inter({ subsets: ['latin'], variable: '--font-sans', display: 'swap' });
|
||||
const jetbrainsMono = JetBrains_Mono({ subsets: ['latin'], variable: '--font-mono', display: 'swap' });
|
||||
const ibmPlexMono = IBM_Plex_Mono({
|
||||
subsets: ['latin'],
|
||||
weight: ['400', '500', '600', '700'],
|
||||
variable: '--font-ibm',
|
||||
display: 'swap',
|
||||
});
|
||||
const fontVars = `${inter.variable} ${jetbrainsMono.variable} ${ibmPlexMono.variable}`;
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || 'https://vyndr.app'),
|
||||
title: {
|
||||
@@ -110,17 +127,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
||||
const country = hdrs.get(COUNTRY_HEADER) || '';
|
||||
|
||||
return (
|
||||
<html lang={locale} dir={dir} className="dark">
|
||||
<head>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
|
||||
{/* VYNDR 2.0 (§2): Inter for chrome/UI, JetBrains Mono for ALL data.
|
||||
IBM Plex Mono + Instrument Sans kept while pages migrate session-by-session. */}
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600;700;800&family=Instrument+Sans:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</head>
|
||||
<html lang={locale} dir={dir} className={`dark ${fontVars}`}>
|
||||
<body className="antialiased tex-grain">
|
||||
<LocaleProvider locale={locale} country={country}>
|
||||
<PostHogProvider>
|
||||
|
||||
Reference in New Issue
Block a user