From f17d6dea17fd371bc00434d9f1e540696dab0cfd Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Fri, 2 Jan 2026 15:35:44 +0100 Subject: [PATCH] feat: enable custom tools in staging, add BlenderGen to context menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed feature flags to use VITE_WORKER_ENV instead of PROD - Staging environment now shows experimental tools (Drawfast, Calendar, Workflow) - Added BlenderGen to context menu "Create Tool" submenu - Tools now available in both toolbar and right-click menu 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/ui/CustomContextMenu.tsx | 13 ++++++++----- src/ui/CustomToolbar.tsx | 12 +++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/ui/CustomContextMenu.tsx b/src/ui/CustomContextMenu.tsx index 8a9cd3e..e4bc1ea 100644 --- a/src/ui/CustomContextMenu.tsx +++ b/src/ui/CustomContextMenu.tsx @@ -15,11 +15,13 @@ import { cameraHistory, } from "./cameraUtils" -// Feature flags - disable experimental features in production -const IS_PRODUCTION = import.meta.env.PROD -const ENABLE_DRAWFAST = !IS_PRODUCTION // Drawfast - dev only -const ENABLE_CALENDAR = !IS_PRODUCTION // Calendar - dev only -const ENABLE_WORKFLOW = !IS_PRODUCTION // Workflow - dev only +// Feature flags - enable experimental features in dev/staging, disable in production +// Use VITE_WORKER_ENV to determine environment (staging is NOT production) +const WORKER_ENV = import.meta.env.VITE_WORKER_ENV || 'production' +const IS_PRODUCTION_ONLY = WORKER_ENV === 'production' // Only true for actual production +const ENABLE_DRAWFAST = !IS_PRODUCTION_ONLY // Drawfast - dev/staging only +const ENABLE_CALENDAR = !IS_PRODUCTION_ONLY // Calendar - dev/staging only +const ENABLE_WORKFLOW = !IS_PRODUCTION_ONLY // Workflow - dev/staging only import { useState, useEffect } from "react" import { saveToPdf } from "../utils/pdfUtils" import { TLFrameShape } from "tldraw" @@ -135,6 +137,7 @@ export function CustomContextMenu(props: TLUiContextMenuProps) { + {ENABLE_DRAWFAST && } diff --git a/src/ui/CustomToolbar.tsx b/src/ui/CustomToolbar.tsx index 738afea..3f6e34d 100644 --- a/src/ui/CustomToolbar.tsx +++ b/src/ui/CustomToolbar.tsx @@ -17,11 +17,13 @@ import { FathomMeetingsPanel } from "../components/FathomMeetingsPanel" // Workflow Builder palette import WorkflowPalette from "../components/workflow/WorkflowPalette" -// Feature flags - disable experimental features in production -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 +// Feature flags - enable experimental features in dev/staging, disable in production +// Use VITE_WORKER_ENV to determine environment (staging is NOT production) +const WORKER_ENV = import.meta.env.VITE_WORKER_ENV || 'production' +const IS_PRODUCTION_ONLY = WORKER_ENV === 'production' // Only true for actual production +const ENABLE_WORKFLOW = !IS_PRODUCTION_ONLY // Workflow blocks - dev/staging only +const ENABLE_CALENDAR = !IS_PRODUCTION_ONLY // Calendar - dev/staging only +const ENABLE_DRAWFAST = !IS_PRODUCTION_ONLY // Drawfast - dev/staging only import { getFathomApiKey, saveFathomApiKey, removeFathomApiKey, isFathomApiKeyConfigured } from "../lib/fathomApiKey" import { getMyConnections, updateEdgeMetadata, createConnection, removeConnection, updateTrustLevel } from "../lib/networking/connectionService" import { TRUST_LEVEL_COLORS, type TrustLevel, type UserConnectionWithProfile, type EdgeMetadata } from "../lib/networking/types"