Compare commits

...

2 Commits

Author SHA1 Message Date
cesnimda 0410e8b981 docs: measure font request elimination and preserved typography 2026-11-17 20:24:53 +01:00
cesnimda ade8b08259 perf: stop requesting an unused external font stylesheet 2026-11-17 20:23:23 +01:00
23 changed files with 754 additions and 3 deletions
@@ -0,0 +1,13 @@
# PERF-16: remove unused font startup requests
Baseline `b1e79a56`, branch codex/perf-font-startup, E:/Storage/Projects/Active/temp docs/jobjakt-local-build/next-security-patch. Source `ade8b08`. Scope: three font link elements in root layout only. No dependency/file deletion, replacement font, CSS/theme/renderer redesign or new external service.
Repository source inventory found Archivo only in the root stylesheet URL, with no application font consumer. Current theme uses Trebuchet MS/system fonts; code/native controls retain their established stacks. A controlled built-app probe observed Trebuchet/system and Arial, never Archivo, across390/1440 widths, EN/NB, light/dark (eight states). All API responses were synthetic, external stylesheet intercepted with inert CSS; no request was sent to Google.
Removed the unused Archivo stylesheet and its Google API/static preconnect hints. Next also stops emitting its automatic stylesheet preload. Paired after-build probe PASSED eight states: one external stylesheet request per page becomes zero (eight to zero in the sample); four font-related head links become zero. Computed font-family sets, heading text/dimensions and overflow results are identical for every pair. This establishes request elimination and retained sampled typography, not real-network latency, saved live font bytes, European TTFB or a whole-product performance result. Initial probe incorrectly expected three generated links; corrected after inspecting Next's generated fourth preload, before changing application source.
PASSED: ordinary Next16.4.6 build/TypeScript/static export (also includes prior interview-add source), scoped layout lint, source diff check, paired browser assertions. Existing tracking pilot PASSED two EN/light journeys at320/1440, eight axe scans/captures, fixture previews/writes only. This is a canary, not a replacement for the preceding36/144 matrix or whole-application regression. Prior full Jest's two stale-label defects and focused correction remain recorded separately. No new backend/full-Jest/native-device/AT/provider/model/PDF/security/recovery/release qualification.
Earlier framework qualification described blocked Google Fonts as potential intended-font substitution. Current computed-font/source evidence narrows that interpretation: Archivo was unused, so blocking it did not change the observed application typography. Intended visual acceptance against A3 and native font availability still need their independent review. Physical document/PDF font rendering is untouched.
Evidence: [source and native receipts](evidence/SOURCE_RECEIPTS.json), paired probe source archived as text and assert-bearing before/after/comparison outputs. No production requests or deployment. Rollback is restoring these three layout links in a dedicated revert and rebuilding; existing theme/bootstrap/auth order remains unchanged. PERF-16 remains PARTIAL for other startup/loading/performance/device qualification, and final A3/security/release gates remain open.
@@ -0,0 +1,73 @@
{
"baseline": "b1e79a5679161f593263339dcc15ceb0ab92009a",
"sourceCommit": "ade8b08",
"sourceSha256Lf": {
"job-tracker-ui/app/layout.tsx": "d2e460998e4182f11657089850f9144059f453ebd9c4d1fbcd3f6aee25449843",
"job-tracker-ui/src/theme.ts": "6b3c28a2a920e53e01ed9ee12ee2f5cdaa0fe7c3752415a97ca544c82fce8cfa",
"job-tracker-ui/src/ThemeProvider.tsx": "1d25fd091ca632f7671e413db24e917d4ca4a375fddade0ca1ff397a8ae9f950",
"job-tracker-ui/src/index.css": "daf22c296c801d3d533083361cc59fbdc22e5bfe528aa4bad1973b54cc5448a4",
"job-tracker-ui/package-lock.json": "3e7d849d75a7bffdbdac30990d003ebe079f649679e3add210d6f0bb323a17b9"
},
"nativeReceipts": [
{
"path": "font-startup-probe.mjs.txt",
"lfSha256": "59bc6af451b5e22722f89f73bf9cea722fdd53a3b6f337705b6c5bf04092d316",
"rawSha256": "59bc6af451b5e22722f89f73bf9cea722fdd53a3b6f337705b6c5bf04092d316",
"gzipSha256": "d424e61aea36361407de2fc9d9de4ebc975b51713f60ef99b078b6a8b7166f28"
},
{
"path": "font-startup-before.json",
"lfSha256": "db7bd746ea6a5d3ee3e200b01c9d7a60fa99794be9ebb55ce85afbbea4b6b704",
"rawSha256": "db7bd746ea6a5d3ee3e200b01c9d7a60fa99794be9ebb55ce85afbbea4b6b704",
"gzipSha256": "d0bdbc996ecaed0e2302b263c549247f52500e2813c0af4b3347322d9ba8da4e"
},
{
"path": "font-startup-before.txt",
"lfSha256": "410b887c27f899cc8f88af8e64aac7c9fffca87d4149887f94db6146b3e27c93",
"rawSha256": "410b887c27f899cc8f88af8e64aac7c9fffca87d4149887f94db6146b3e27c93",
"gzipSha256": "36f2e2d6a949ccccf309bc13fd0a51a36699df993c3031b8d2542b66a140d708"
},
{
"path": "font-startup-after.json",
"lfSha256": "9e8c48e88a57c6938b84abbde290d3f52cc7a94359cdaca6b7fea48d6d0ae0a8",
"rawSha256": "9e8c48e88a57c6938b84abbde290d3f52cc7a94359cdaca6b7fea48d6d0ae0a8",
"gzipSha256": "291c40d49308bfc9713ae9c08e35059391c2da9d3971a57c6690fdbd23916a61"
},
{
"path": "font-startup-after.txt",
"lfSha256": "793d8785f1689d4da4da1eb53c6a34e7ddc2279ccac67ab7c5ad1558c04e3fa7",
"rawSha256": "793d8785f1689d4da4da1eb53c6a34e7ddc2279ccac67ab7c5ad1558c04e3fa7",
"gzipSha256": "78076081f5129cd7e64a4b24bba9d830494504b245aa1c88e30366a97cb84740"
},
{
"path": "font-startup-comparison.json",
"lfSha256": "f63c90ff0b65daf0f98d343e6aa0272f624dfd753a5daab7e4217b727f5641b1",
"rawSha256": "54e11edeaed7a1aee81d72ddba22a9a26c679aef229709daeba79de59c195671",
"gzipSha256": "7d4e734ea05501a38a3ef781a529587d068c130c476df1b1b242ec964623a428"
},
{
"path": "font-startup-build.txt",
"lfSha256": "528d1e031465906c2c432291b58ed38158c2f52a2055dbc13d4611a545afa8aa",
"rawSha256": "528d1e031465906c2c432291b58ed38158c2f52a2055dbc13d4611a545afa8aa",
"gzipSha256": "fbb85fb057debb7ef527dd456ce83946516e8496b70ad91a704a739d1016f9a9"
},
{
"path": "font-startup-lint.txt",
"lfSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"rawSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"gzipSha256": "46b50c321b39e89a491b6727a01628c34245605a30beb3e7414c5e01cff90e6e"
},
{
"path": "font-startup-tracking-canary.txt",
"lfSha256": "70bc6be58390a0d28b50ae1bd1fc3a49a1e7b4df8c6c56bb3bcb26bb41365b1c",
"rawSha256": "70bc6be58390a0d28b50ae1bd1fc3a49a1e7b4df8c6c56bb3bcb26bb41365b1c",
"gzipSha256": "d27db4e0c62fecb3d5a4ce6bb99f3cae760cd3d5b12cd100aaa77d2afabd6b1d"
},
{
"path": "font-startup-tracking-canary-PILOT.json",
"lfSha256": "a5a3f9bcbd4e351508dc29a1e82a16e29e91896c019abb30e94f544fa15c37ed",
"rawSha256": "a5a3f9bcbd4e351508dc29a1e82a16e29e91896c019abb30e94f544fa15c37ed",
"gzipSha256": "33c18eeaa61ff6367c7ceaae92f5320dd053d66b28bbe2e1293c188911b9b6ed"
}
]
}
@@ -0,0 +1,170 @@
{
"phase": "after",
"limits": [
"Synthetic API only",
"External font stylesheet replaced with inert CSS; no Google request sent",
"Request count and typography are observed; no live-network latency claim"
],
"states": [
{
"width": 390,
"language": "en",
"mode": "light",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [],
"heading": {
"text": "Discover jobs",
"width": 358,
"height": 35,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [],
"errors": [],
"writes": []
},
{
"width": 390,
"language": "en",
"mode": "dark",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [],
"heading": {
"text": "Discover jobs",
"width": 358,
"height": 35,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [],
"errors": [],
"writes": []
},
{
"width": 390,
"language": "nb",
"mode": "light",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [],
"heading": {
"text": "Finn jobber",
"width": 358,
"height": 35,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [],
"errors": [],
"writes": []
},
{
"width": 390,
"language": "nb",
"mode": "dark",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [],
"heading": {
"text": "Finn jobber",
"width": 358,
"height": 35,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [],
"errors": [],
"writes": []
},
{
"width": 1440,
"language": "en",
"mode": "light",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [],
"heading": {
"text": "Discover jobs",
"width": 1122,
"height": 40,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [],
"errors": [],
"writes": []
},
{
"width": 1440,
"language": "en",
"mode": "dark",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [],
"heading": {
"text": "Discover jobs",
"width": 1122,
"height": 40,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [],
"errors": [],
"writes": []
},
{
"width": 1440,
"language": "nb",
"mode": "light",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [],
"heading": {
"text": "Finn jobber",
"width": 1122,
"height": 40,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [],
"errors": [],
"writes": []
},
{
"width": 1440,
"language": "nb",
"mode": "dark",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [],
"heading": {
"text": "Finn jobber",
"width": 1122,
"height": 40,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [],
"errors": [],
"writes": []
}
]
}
@@ -0,0 +1,322 @@
{
"phase": "before",
"limits": [
"Synthetic API only",
"External font stylesheet replaced with inert CSS; no Google request sent",
"Request count and typography are observed; no live-network latency claim"
],
"states": [
{
"width": 390,
"language": "en",
"mode": "light",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [
{
"rel": "preload",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
},
{
"rel": "preconnect",
"href": "https://fonts.googleapis.com/"
},
{
"rel": "preconnect",
"href": "https://fonts.gstatic.com/"
},
{
"rel": "stylesheet",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
}
],
"heading": {
"text": "Discover jobs",
"width": 358,
"height": 35,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [
"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
],
"errors": [],
"writes": []
},
{
"width": 390,
"language": "en",
"mode": "dark",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [
{
"rel": "preload",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
},
{
"rel": "preconnect",
"href": "https://fonts.googleapis.com/"
},
{
"rel": "preconnect",
"href": "https://fonts.gstatic.com/"
},
{
"rel": "stylesheet",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
}
],
"heading": {
"text": "Discover jobs",
"width": 358,
"height": 35,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [
"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
],
"errors": [],
"writes": []
},
{
"width": 390,
"language": "nb",
"mode": "light",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [
{
"rel": "preload",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
},
{
"rel": "preconnect",
"href": "https://fonts.googleapis.com/"
},
{
"rel": "preconnect",
"href": "https://fonts.gstatic.com/"
},
{
"rel": "stylesheet",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
}
],
"heading": {
"text": "Finn jobber",
"width": 358,
"height": 35,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [
"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
],
"errors": [],
"writes": []
},
{
"width": 390,
"language": "nb",
"mode": "dark",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [
{
"rel": "preload",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
},
{
"rel": "preconnect",
"href": "https://fonts.googleapis.com/"
},
{
"rel": "preconnect",
"href": "https://fonts.gstatic.com/"
},
{
"rel": "stylesheet",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
}
],
"heading": {
"text": "Finn jobber",
"width": 358,
"height": 35,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [
"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
],
"errors": [],
"writes": []
},
{
"width": 1440,
"language": "en",
"mode": "light",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [
{
"rel": "preload",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
},
{
"rel": "preconnect",
"href": "https://fonts.googleapis.com/"
},
{
"rel": "preconnect",
"href": "https://fonts.gstatic.com/"
},
{
"rel": "stylesheet",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
}
],
"heading": {
"text": "Discover jobs",
"width": 1122,
"height": 40,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [
"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
],
"errors": [],
"writes": []
},
{
"width": 1440,
"language": "en",
"mode": "dark",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [
{
"rel": "preload",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
},
{
"rel": "preconnect",
"href": "https://fonts.googleapis.com/"
},
{
"rel": "preconnect",
"href": "https://fonts.gstatic.com/"
},
{
"rel": "stylesheet",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
}
],
"heading": {
"text": "Discover jobs",
"width": 1122,
"height": 40,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [
"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
],
"errors": [],
"writes": []
},
{
"width": 1440,
"language": "nb",
"mode": "light",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [
{
"rel": "preload",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
},
{
"rel": "preconnect",
"href": "https://fonts.googleapis.com/"
},
{
"rel": "preconnect",
"href": "https://fonts.gstatic.com/"
},
{
"rel": "stylesheet",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
}
],
"heading": {
"text": "Finn jobber",
"width": 1122,
"height": 40,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [
"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
],
"errors": [],
"writes": []
},
{
"width": 1440,
"language": "nb",
"mode": "dark",
"families": [
"\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
"Arial"
],
"links": [
{
"rel": "preload",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
},
{
"rel": "preconnect",
"href": "https://fonts.googleapis.com/"
},
{
"rel": "preconnect",
"href": "https://fonts.gstatic.com/"
},
{
"rel": "stylesheet",
"href": "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
}
],
"heading": {
"text": "Finn jobber",
"width": 1122,
"height": 40,
"family": "\"Trebuchet MS\", system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif"
},
"overflow": false,
"external": [
"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap"
],
"errors": [],
"writes": []
}
]
}
@@ -0,0 +1,9 @@
{
"states": 8,
"externalStylesheetRequestsBefore": 8,
"externalStylesheetRequestsAfter": 0,
"fontHeadLinksPerStateBefore": 4,
"fontHeadLinksPerStateAfter": 0,
"fontFamiliesAndHeadingGeometry": "identical",
"limits": "No measured live network latency or typography redesign claim"
}
@@ -0,0 +1,51 @@
import { createRequire } from 'node:module';
import path from 'node:path';
import fs from 'node:fs';
import assert from 'node:assert/strict';
const { chromium } = createRequire(path.join(process.cwd(), 'package.json'))('@playwright/test');
const [phase, output] = process.argv.slice(2);
assert.ok(['before', 'after'].includes(phase));
const states = [];
const browser = await chromium.launch();
try {
for (const width of [390, 1440]) for (const language of ['en', 'nb']) for (const mode of ['light', 'dark']) {
const context = await browser.newContext({ viewport: { width, height: 1000 }, reducedMotion: 'reduce' });
const page = await context.newPage();
const external = [], writes = [], errors = [];
page.on('pageerror', e => errors.push(e.message));
await page.addInitScript(({ language, mode }) => { localStorage.setItem('uiLanguage', language); localStorage.setItem('jobtracker.themeMode', mode); }, { language, mode });
await page.route('**/*', route => {
const request = route.request(), url = new URL(request.url());
if (!['localhost', '127.0.0.1'].includes(url.hostname)) {
external.push(url.href);
if (url.hostname === 'fonts.googleapis.com') return route.fulfill({ contentType: 'text/css', body: '/* synthetic unavailable font stylesheet: no remote font or provider access */' });
return route.abort();
}
if (!url.pathname.startsWith('/api/')) return route.continue();
if (request.method() !== 'GET') { writes.push(url.pathname); return route.abort(); }
const fixtures = {
'/api/auth/config': { requireAuth: true },
'/api/auth/me': { id: 'font-probe-owner', sessionContext: 'font-probe-session', firstName: 'Alex', displayName: 'Alex Sample', roles: [], uiLanguage: language === 'nb' ? 'nb-NO' : 'en' },
'/api/jobapplications/reminders': [], '/api/notifications/unread-count': { count: 0 }, '/api/job-discovery/saved-searches': [], '/api/companies': []
};
return route.fulfill({ status: Object.hasOwn(fixtures, url.pathname) ? 200 : 404, contentType: 'application/json', body: JSON.stringify(fixtures[url.pathname] ?? {}) });
});
await page.goto('http://localhost:4338/discover');
await page.locator('h1').waitFor();
await page.evaluate(() => document.fonts.ready);
const actual = await page.evaluate(() => ({
families: [...new Set([...document.querySelectorAll('body,h1,h2,button,input,label')].map(e => getComputedStyle(e).fontFamily))].sort(),
links: [...document.querySelectorAll('link[href*="fonts.googleapis.com"],link[href*="fonts.gstatic.com"]')].map(e => ({ rel: e.rel, href: e.href })),
heading: (() => { const h = document.querySelector('h1'), r = h.getBoundingClientRect(); return { text: h.textContent, width: r.width, height: r.height, family: getComputedStyle(h).fontFamily }; })(),
overflow: document.documentElement.scrollWidth > innerWidth + 1
}));
assert.ok(actual.families.every(f => !/archivo/i.test(f)), 'Archivo must be unreferenced by rendered app typography');
assert.equal(external.length, phase === 'before' ? 1 : 0);
assert.equal(actual.links.length, phase === 'before' ? 4 : 0);
assert.deepEqual(errors, []); assert.deepEqual(writes, []); assert.equal(actual.overflow, false);
states.push({ width, language, mode, ...actual, external, errors, writes });
await context.close();
}
} finally { await browser.close(); }
fs.writeFileSync(output, JSON.stringify({ phase, limits: ['Synthetic API only', 'External font stylesheet replaced with inert CSS; no Google request sent', 'Request count and typography are observed; no live-network latency claim'], states }, null, 2));
console.log(`${phase}: ${states.length} states, ${states.reduce((n,s)=>n+s.external.length,0)} intercepted external stylesheet requests`);
@@ -0,0 +1,116 @@
{
"screens": [
{
"width": 320,
"language": "en",
"mode": "light",
"state": "initial",
"violations": []
},
{
"width": 320,
"language": "en",
"mode": "light",
"state": "results",
"violations": []
},
{
"width": 320,
"language": "en",
"mode": "light",
"state": "review",
"violations": []
},
{
"width": 320,
"language": "en",
"mode": "light",
"state": "tracked",
"violations": []
},
{
"width": 1440,
"language": "en",
"mode": "light",
"state": "initial",
"violations": []
},
{
"width": 1440,
"language": "en",
"mode": "light",
"state": "results",
"violations": []
},
{
"width": 1440,
"language": "en",
"mode": "light",
"state": "review",
"violations": []
},
{
"width": 1440,
"language": "en",
"mode": "light",
"state": "tracked",
"violations": []
}
],
"journeys": [
{
"width": 320,
"language": "en",
"mode": "light",
"discoveryPreviewReviewTracked": "PASS",
"optionalAttachmentsSkippedWithExistingControls": "PASS",
"savedSearchMutations": "NOT RUN",
"externalAdvertAndProviderAccess": "NOT RUN"
},
{
"width": 1440,
"language": "en",
"mode": "light",
"discoveryPreviewReviewTracked": "PASS",
"optionalAttachmentsSkippedWithExistingControls": "PASS",
"savedSearchMutations": "NOT RUN",
"externalAdvertAndProviderAccess": "NOT RUN"
}
],
"errors": [],
"unexpectedWrites": [],
"mockedWrites": [
{
"width": 320,
"language": "en",
"mode": "light",
"action": "createTrackedJob"
},
{
"width": 1440,
"language": "en",
"mode": "light",
"action": "createTrackedJob"
}
],
"previewRequests": [
{
"width": 320,
"language": "en",
"mode": "light",
"url": "https://example.test/vacancy-0"
},
{
"width": 1440,
"language": "en",
"mode": "light",
"url": "https://example.test/vacancy-0"
}
],
"unavailableReads": [],
"blockedExternal": [],
"limits": [
"synthetic provider/API fixtures, not live NAV or backend qualification",
"no new providers/geography or native/security/release acceptance"
]
}
-3
View File
@@ -28,9 +28,6 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<html lang="en" suppressHydrationWarning>
<head>
<Script id="jobtracker-theme-bootstrap" strategy="beforeInteractive" dangerouslySetInnerHTML={{ __html: THEME_BOOTSTRAP_SCRIPT }} />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
<link href="https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>