From 00aa0828c4fa201acfaf79ed3694e3339e35a1db Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sat, 3 Jan 2026 08:32:46 +0100 Subject: [PATCH] fix: guard Drawfast tool with feature flag in overrides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drawfast was always included in overrides.tsx but is conditional in Board.tsx (dev-only). This caused "l is not a function" errors when users tried to select tools in production since the Drawfast tool wasn't registered. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/ui/overrides.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ui/overrides.tsx b/src/ui/overrides.tsx index 1a8ff90..52cb96e 100644 --- a/src/ui/overrides.tsx +++ b/src/ui/overrides.tsx @@ -34,6 +34,7 @@ import { llm, getApiKey } from "@/utils/llmUtils" const IS_PRODUCTION = import.meta.env.PROD const ENABLE_WORKFLOW = !IS_PRODUCTION // Workflow blocks - dev only const ENABLE_CALENDAR = !IS_PRODUCTION // Calendar - dev only +const ENABLE_DRAWFAST = !IS_PRODUCTION // Drawfast - dev only export const overrides: TLUiOverrides = { tools(editor, tools) { @@ -227,14 +228,17 @@ export const overrides: TLUiOverrides = { readonlyOk: true, onSelect: () => editor.setCurrentTool("VideoGen"), }, - Drawfast: { - id: "Drawfast", - icon: "tool-pencil", - label: "Drawfast (AI Sketch)", - kbd: "ctrl+shift+d", - readonlyOk: true, - onSelect: () => editor.setCurrentTool("Drawfast"), - }, + // Drawfast - only available in dev (must match ENABLE_DRAWFAST flag in Board.tsx) + ...(ENABLE_DRAWFAST ? { + Drawfast: { + id: "Drawfast", + icon: "tool-pencil", + label: "Drawfast (AI Sketch)", + kbd: "ctrl+shift+d", + readonlyOk: true, + onSelect: () => editor.setCurrentTool("Drawfast"), + }, + } : {}), Multmux: { id: "Multmux", icon: "terminal",