From 13d683b562969029ecfb8b944d41d2b11f4f42bc Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 10 Mar 2026 10:16:45 -0400 Subject: [PATCH 1/3] Fix one dollar stats tracking --- apps/web/package.json | 2 +- apps/web/src/routes/__root.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index e1276481..4ab2a407 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -7,7 +7,7 @@ "node": ">=22" }, "scripts": { - "dev": "BROWSERSLIST_IGNORE_OLD_DATA=true BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATA=true sh -c 'portless \"${PORTLESS_NAME:-openchat}\" vite dev'", + "dev": "BROWSERSLIST_IGNORE_OLD_DATA=true BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATA=true sh -c 'portless openchat vite dev'", "build": "sh -c 'vite build && mkdir -p .output/server && cp instrument.server.mjs sentry.server.shared.mjs .output/server/'", "build:vercel": "bun ./scripts/vercel-build.ts", "start": "node --import ./.output/server/instrument.server.mjs .output/server/index.mjs", diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsx index 5889c905..903f4d07 100644 --- a/apps/web/src/routes/__root.tsx +++ b/apps/web/src/routes/__root.tsx @@ -58,6 +58,10 @@ const SITE_URL = "https://osschat.dev"; const SITE_NAME = "osschat"; const SITE_DESCRIPTION = "Open source AI chat with 350+ models. Access GPT-4, Claude, Gemini, and more through one beautiful interface. Free tier available, no API key required."; const SITE_TAGLINE = "One interface. Every AI model."; +const ONEDOLLARSTATS_SCRIPT_SRC = "https://assets.onedollarstats.com/stonks.js"; +// Keep this in sync with the live vendor asset or browsers will block analytics entirely. +const ONEDOLLARSTATS_SCRIPT_INTEGRITY = + "sha384-8AkCgndzrFlpPb3Fu+twAznnWYX8ahMtoXcKtdsQnvnnalD9DTQdnU6gM5wJO5Pd"; export const Route = createRootRoute({ beforeLoad: async () => { @@ -158,10 +162,10 @@ export const Route = createRootRoute({ }, // Analytics { - src: "https://assets.onedollarstats.com/stonks.js", + src: ONEDOLLARSTATS_SCRIPT_SRC, defer: true, crossOrigin: "anonymous", - integrity: "sha384-JKNAwAZy8iZWcJrexWvQf3rNcosuH0th/rwqZoiM84ea7fMGTt2eq8ddZb//nd9H", + integrity: ONEDOLLARSTATS_SCRIPT_INTEGRITY, }, ], }), From 13efa2162de2828d70ab1bad013b30283fd626bd Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 10 Mar 2026 10:27:00 -0400 Subject: [PATCH 2/3] chore: restore configurable web dev script --- apps/web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/package.json b/apps/web/package.json index 4ab2a407..e1276481 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -7,7 +7,7 @@ "node": ">=22" }, "scripts": { - "dev": "BROWSERSLIST_IGNORE_OLD_DATA=true BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATA=true sh -c 'portless openchat vite dev'", + "dev": "BROWSERSLIST_IGNORE_OLD_DATA=true BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATA=true sh -c 'portless \"${PORTLESS_NAME:-openchat}\" vite dev'", "build": "sh -c 'vite build && mkdir -p .output/server && cp instrument.server.mjs sentry.server.shared.mjs .output/server/'", "build:vercel": "bun ./scripts/vercel-build.ts", "start": "node --import ./.output/server/instrument.server.mjs .output/server/index.mjs", From d9764d7ddc79252a86d8e923e3dbeb19cc9f6be4 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 10 Mar 2026 10:35:14 -0400 Subject: [PATCH 3/3] fix: avoid stale analytics SRI pinning --- apps/web/src/routes/__root.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsx index 903f4d07..3cb952f1 100644 --- a/apps/web/src/routes/__root.tsx +++ b/apps/web/src/routes/__root.tsx @@ -59,9 +59,6 @@ const SITE_NAME = "osschat"; const SITE_DESCRIPTION = "Open source AI chat with 350+ models. Access GPT-4, Claude, Gemini, and more through one beautiful interface. Free tier available, no API key required."; const SITE_TAGLINE = "One interface. Every AI model."; const ONEDOLLARSTATS_SCRIPT_SRC = "https://assets.onedollarstats.com/stonks.js"; -// Keep this in sync with the live vendor asset or browsers will block analytics entirely. -const ONEDOLLARSTATS_SCRIPT_INTEGRITY = - "sha384-8AkCgndzrFlpPb3Fu+twAznnWYX8ahMtoXcKtdsQnvnnalD9DTQdnU6gM5wJO5Pd"; export const Route = createRootRoute({ beforeLoad: async () => { @@ -165,7 +162,6 @@ export const Route = createRootRoute({ src: ONEDOLLARSTATS_SCRIPT_SRC, defer: true, crossOrigin: "anonymous", - integrity: ONEDOLLARSTATS_SCRIPT_INTEGRITY, }, ], }),