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:
parent
c87604fa6e
commit
3ac4d9317c
|
|
@ -50,6 +50,11 @@ import { VideoGenTool } from "@/tools/VideoGenTool"
|
|||
// DISABLED: Drawfast tool needs debugging - see task-059
|
||||
// import { DrawfastShape } from "@/shapes/DrawfastShapeUtil"
|
||||
// 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 { MultmuxTool } from "@/tools/MultmuxTool"
|
||||
import { MultmuxShape } from "@/shapes/MultmuxShapeUtil"
|
||||
|
|
@ -176,9 +181,9 @@ const customShapeUtils = [
|
|||
PrivateWorkspaceShape, // Private zone for Google Export data sovereignty
|
||||
GoogleItemShape, // Individual items from Google Export with privacy badges
|
||||
MapShape, // Open Mapping - OSM map shape
|
||||
WorkflowBlockShape, // Workflow Builder - Flowy-like blocks
|
||||
CalendarShape, // Calendar - Unified with view switching (browser/widget/year)
|
||||
CalendarEventShape, // Calendar - Individual event cards
|
||||
// Conditionally included based on feature flags:
|
||||
...(ENABLE_WORKFLOW ? [WorkflowBlockShape] : []), // Workflow Builder - dev only
|
||||
...(ENABLE_CALENDAR ? [CalendarShape, CalendarEventShape] : []), // Calendar - dev only
|
||||
]
|
||||
const customTools = [
|
||||
ChatBoxTool,
|
||||
|
|
@ -201,8 +206,9 @@ const customTools = [
|
|||
PrivateWorkspaceTool,
|
||||
GoogleItemTool,
|
||||
MapTool, // Open Mapping - OSM map tool
|
||||
WorkflowBlockTool, // Workflow Builder - click-to-place
|
||||
CalendarTool, // Calendar - Unified with view switching
|
||||
// Conditionally included based on feature flags:
|
||||
...(ENABLE_WORKFLOW ? [WorkflowBlockTool] : []), // Workflow Builder - dev only
|
||||
...(ENABLE_CALENDAR ? [CalendarTool] : []), // Calendar - dev only
|
||||
]
|
||||
|
||||
// Debug: Log tool and shape registration info
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ import { HolonData } from "../lib/HoloSphereService"
|
|||
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
|
||||
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"
|
||||
|
|
@ -783,7 +788,7 @@ export function CustomToolbar() {
|
|||
isSelected={tools["Map"].id === editor.getCurrentToolId()}
|
||||
/>
|
||||
)}
|
||||
{tools["calendar"] && (
|
||||
{ENABLE_CALENDAR && tools["calendar"] && (
|
||||
<TldrawUiMenuItem
|
||||
{...tools["calendar"]}
|
||||
icon="calendar"
|
||||
|
|
@ -791,13 +796,15 @@ export function CustomToolbar() {
|
|||
isSelected={tools["calendar"].id === editor.getCurrentToolId()}
|
||||
/>
|
||||
)}
|
||||
{/* Workflow Builder - Toggle Palette */}
|
||||
<TldrawUiMenuItem
|
||||
id="workflow-palette"
|
||||
icon="sticker"
|
||||
label="Workflow Blocks"
|
||||
onSelect={() => setShowWorkflowPalette(!showWorkflowPalette)}
|
||||
/>
|
||||
{/* Workflow Builder - Toggle Palette (dev only) */}
|
||||
{ENABLE_WORKFLOW && (
|
||||
<TldrawUiMenuItem
|
||||
id="workflow-palette"
|
||||
icon="sticker"
|
||||
label="Workflow Blocks"
|
||||
onSelect={() => setShowWorkflowPalette(!showWorkflowPalette)}
|
||||
/>
|
||||
)}
|
||||
{/* Refresh All ObsNotes Button */}
|
||||
{(() => {
|
||||
const allShapes = editor.getCurrentPageShapes()
|
||||
|
|
@ -825,12 +832,14 @@ export function CustomToolbar() {
|
|||
/>
|
||||
)}
|
||||
|
||||
{/* Workflow Builder Palette */}
|
||||
<WorkflowPalette
|
||||
editor={editor}
|
||||
isOpen={showWorkflowPalette}
|
||||
onClose={() => setShowWorkflowPalette(false)}
|
||||
/>
|
||||
{/* Workflow Builder Palette (dev only) */}
|
||||
{ENABLE_WORKFLOW && (
|
||||
<WorkflowPalette
|
||||
editor={editor}
|
||||
isOpen={showWorkflowPalette}
|
||||
onClose={() => setShowWorkflowPalette(false)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue