feat: disable Workflow, Calendar in production (dev only)

Added feature flags to conditionally disable experimental features:
- ENABLE_WORKFLOW: Workflow blocks (dev only)
- ENABLE_CALENDAR: Calendar shape/tool (dev only)
- Drawfast was already disabled

These features will only appear in development builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2025-12-26 16:38:42 -05:00
parent 57c49096de
commit 6a20897322
2 changed files with 34 additions and 19 deletions

View File

@ -50,6 +50,11 @@ import { VideoGenTool } from "@/tools/VideoGenTool"
// DISABLED: Drawfast tool needs debugging - see task-059 // DISABLED: Drawfast tool needs debugging - see task-059
// import { DrawfastShape } from "@/shapes/DrawfastShapeUtil" // import { DrawfastShape } from "@/shapes/DrawfastShapeUtil"
// import { DrawfastTool } from "@/tools/DrawfastTool" // import { DrawfastTool } from "@/tools/DrawfastTool"
// 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
import { LiveImageProvider } from "@/hooks/useLiveImage" import { LiveImageProvider } from "@/hooks/useLiveImage"
import { MultmuxTool } from "@/tools/MultmuxTool" import { MultmuxTool } from "@/tools/MultmuxTool"
import { MultmuxShape } from "@/shapes/MultmuxShapeUtil" import { MultmuxShape } from "@/shapes/MultmuxShapeUtil"
@ -176,9 +181,9 @@ const customShapeUtils = [
PrivateWorkspaceShape, // Private zone for Google Export data sovereignty PrivateWorkspaceShape, // Private zone for Google Export data sovereignty
GoogleItemShape, // Individual items from Google Export with privacy badges GoogleItemShape, // Individual items from Google Export with privacy badges
MapShape, // Open Mapping - OSM map shape MapShape, // Open Mapping - OSM map shape
WorkflowBlockShape, // Workflow Builder - Flowy-like blocks // Conditionally included based on feature flags:
CalendarShape, // Calendar - Unified with view switching (browser/widget/year) ...(ENABLE_WORKFLOW ? [WorkflowBlockShape] : []), // Workflow Builder - dev only
CalendarEventShape, // Calendar - Individual event cards ...(ENABLE_CALENDAR ? [CalendarShape, CalendarEventShape] : []), // Calendar - dev only
] ]
const customTools = [ const customTools = [
ChatBoxTool, ChatBoxTool,
@ -201,8 +206,9 @@ const customTools = [
PrivateWorkspaceTool, PrivateWorkspaceTool,
GoogleItemTool, GoogleItemTool,
MapTool, // Open Mapping - OSM map tool MapTool, // Open Mapping - OSM map tool
WorkflowBlockTool, // Workflow Builder - click-to-place // Conditionally included based on feature flags:
CalendarTool, // Calendar - Unified with view switching ...(ENABLE_WORKFLOW ? [WorkflowBlockTool] : []), // Workflow Builder - dev only
...(ENABLE_CALENDAR ? [CalendarTool] : []), // Calendar - dev only
] ]
// Debug: Log tool and shape registration info // Debug: Log tool and shape registration info

View File

@ -16,6 +16,11 @@ import { HolonData } from "../lib/HoloSphereService"
import { FathomMeetingsPanel } from "../components/FathomMeetingsPanel" import { FathomMeetingsPanel } from "../components/FathomMeetingsPanel"
// Workflow Builder palette // Workflow Builder palette
import WorkflowPalette from "../components/workflow/WorkflowPalette" 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
import { getFathomApiKey, saveFathomApiKey, removeFathomApiKey, isFathomApiKeyConfigured } from "../lib/fathomApiKey" import { getFathomApiKey, saveFathomApiKey, removeFathomApiKey, isFathomApiKeyConfigured } from "../lib/fathomApiKey"
import { getMyConnections, updateEdgeMetadata, createConnection, removeConnection, updateTrustLevel } from "../lib/networking/connectionService" import { getMyConnections, updateEdgeMetadata, createConnection, removeConnection, updateTrustLevel } from "../lib/networking/connectionService"
import { TRUST_LEVEL_COLORS, type TrustLevel, type UserConnectionWithProfile, type EdgeMetadata } from "../lib/networking/types" import { TRUST_LEVEL_COLORS, type TrustLevel, type UserConnectionWithProfile, type EdgeMetadata } from "../lib/networking/types"
@ -783,7 +788,7 @@ export function CustomToolbar() {
isSelected={tools["Map"].id === editor.getCurrentToolId()} isSelected={tools["Map"].id === editor.getCurrentToolId()}
/> />
)} )}
{tools["calendar"] && ( {ENABLE_CALENDAR && tools["calendar"] && (
<TldrawUiMenuItem <TldrawUiMenuItem
{...tools["calendar"]} {...tools["calendar"]}
icon="calendar" icon="calendar"
@ -791,13 +796,15 @@ export function CustomToolbar() {
isSelected={tools["calendar"].id === editor.getCurrentToolId()} isSelected={tools["calendar"].id === editor.getCurrentToolId()}
/> />
)} )}
{/* Workflow Builder - Toggle Palette */} {/* Workflow Builder - Toggle Palette (dev only) */}
<TldrawUiMenuItem {ENABLE_WORKFLOW && (
id="workflow-palette" <TldrawUiMenuItem
icon="sticker" id="workflow-palette"
label="Workflow Blocks" icon="sticker"
onSelect={() => setShowWorkflowPalette(!showWorkflowPalette)} label="Workflow Blocks"
/> onSelect={() => setShowWorkflowPalette(!showWorkflowPalette)}
/>
)}
{/* Refresh All ObsNotes Button */} {/* Refresh All ObsNotes Button */}
{(() => { {(() => {
const allShapes = editor.getCurrentPageShapes() const allShapes = editor.getCurrentPageShapes()
@ -825,12 +832,14 @@ export function CustomToolbar() {
/> />
)} )}
{/* Workflow Builder Palette */} {/* Workflow Builder Palette (dev only) */}
<WorkflowPalette {ENABLE_WORKFLOW && (
editor={editor} <WorkflowPalette
isOpen={showWorkflowPalette} editor={editor}
onClose={() => setShowWorkflowPalette(false)} isOpen={showWorkflowPalette}
/> onClose={() => setShowWorkflowPalette(false)}
/>
)}
</> </>
) )
} }