From b125f9a723fe6cb1c45ae045434340cf73114ca2 Mon Sep 17 00:00:00 2001 From: Tony James Date: Sun, 31 May 2026 23:13:22 +0100 Subject: [PATCH] fix(mock): allow mock Tesla in production builds (already owner-gated for real data) --- client/src/lib/teslaMock.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/lib/teslaMock.ts b/client/src/lib/teslaMock.ts index f8679c1..b0bc244 100644 --- a/client/src/lib/teslaMock.ts +++ b/client/src/lib/teslaMock.ts @@ -24,7 +24,9 @@ export function isMockEnabled(): boolean { export function getMockScenario(): MockScenario | null { if (typeof window === 'undefined') return null; - if (import.meta.env.PROD) return null; // never in prod build + // Mock is allowed in production too: it only paints the UI with fake data, + // it never reaches the (owner-gated) Fleet API. The visible MOCK chip in + // the top bar makes the state obvious. const urlParam = new URLSearchParams(window.location.search).get('mockTesla'); if (urlParam === 'off') {