From 8108799d9f8241c812d5d053737e996490591bd5 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 30 Jun 2026 04:58:41 +0000 Subject: [PATCH 1/2] feat(studio): make storyboard view default available (remove FF) Removes STUDIO_STORYBOARD_ENABLED. The storyboard view-mode toggle was gated behind a default-off feature flag (VITE_STUDIO_ENABLE_STORYBOARD) since #1529. With the storyboard experience now ready for broad exposure, drop the gating and make the toggle available unconditionally. Changes: - packages/studio/src/components/editor/manualEditingAvailability.ts: delete the STUDIO_STORYBOARD_ENABLED constant. - packages/studio/src/App.tsx: drop the import + FF arg to useViewModeState(). Hook is now called argument-free. - packages/studio/src/components/StudioHeader.tsx: drop the import + the conditional-render guard on . The toggle always renders in StudioHeader's center slot. - packages/studio/src/contexts/ViewModeContext.tsx: remove the enabled: boolean parameter from useViewModeState() and simplify. - packages/studio/fixtures/storyboard-sample/README.md: drop the VITE_STUDIO_ENABLE_STORYBOARD=1 prefix from the preview command. The VITE_STUDIO_ENABLE_STORYBOARD / VITE_STUDIO_STORYBOARD_ENABLED env vars become no-ops after this change. Co-Authored-By: Jerrai --- .../fixtures/storyboard-sample/README.md | 4 +-- packages/studio/src/App.tsx | 7 ++--- .../studio/src/components/StudioHeader.tsx | 5 ++-- .../editor/manualEditingAvailability.ts | 10 ------- .../studio/src/contexts/ViewModeContext.tsx | 29 +++++++------------ 5 files changed, 16 insertions(+), 39 deletions(-) diff --git a/packages/studio/fixtures/storyboard-sample/README.md b/packages/studio/fixtures/storyboard-sample/README.md index ab3df39d49..cf76a5b140 100644 --- a/packages/studio/fixtures/storyboard-sample/README.md +++ b/packages/studio/fixtures/storyboard-sample/README.md @@ -13,10 +13,10 @@ It exercises the storyboard contract end to end: - Frame 5 (`05-cta.html`) is intentionally **absent** and `status: outline`, so the grid has an outline placeholder to render. -Preview the storyboard view (flag-gated): +Preview the storyboard view: ```bash -VITE_STUDIO_ENABLE_STORYBOARD=1 npx hyperframes preview packages/studio/fixtures/storyboard-sample +npx hyperframes preview packages/studio/fixtures/storyboard-sample ``` Inspect just the parsed manifest the Studio consumes: diff --git a/packages/studio/src/App.tsx b/packages/studio/src/App.tsx index 897061e22e..83a52c7239 100644 --- a/packages/studio/src/App.tsx +++ b/packages/studio/src/App.tsx @@ -36,10 +36,7 @@ import { import type { DomEditSelection } from "./components/editor/domEditing"; import { StudioHeader } from "./components/StudioHeader"; import { useGestureCommit } from "./hooks/useGestureCommit"; -import { - STUDIO_KEYFRAMES_ENABLED, - STUDIO_STORYBOARD_ENABLED, -} from "./components/editor/manualEditingAvailability"; +import { STUDIO_KEYFRAMES_ENABLED } from "./components/editor/manualEditingAvailability"; import { GestureTrailOverlay } from "./components/editor/GestureTrailOverlay"; import { StudioLeftSidebar } from "./components/StudioLeftSidebar"; import { StudioPreviewArea } from "./components/StudioPreviewArea"; @@ -65,7 +62,7 @@ type CanvasRect = { left: number; top: number; width: number; height: number }; export function StudioApp() { const { projectId, resolving, waitingForServer } = useServerConnection(); const initialUrlStateRef = useRef(readStudioUrlStateFromWindow()); - const viewModeValue = useViewModeState(STUDIO_STORYBOARD_ENABLED); + const viewModeValue = useViewModeState(); // sessionStorage-backed: fires once per tab, survives HMR remounts useEffect(() => { diff --git a/packages/studio/src/components/StudioHeader.tsx b/packages/studio/src/components/StudioHeader.tsx index f998a8db25..d30b4fafb9 100644 --- a/packages/studio/src/components/StudioHeader.tsx +++ b/packages/studio/src/components/StudioHeader.tsx @@ -3,7 +3,6 @@ import { RotateCcw, RotateCw, Camera } from "../icons/SystemIcons"; import { STUDIO_INSPECTOR_PANELS_ENABLED, STUDIO_MANUAL_EDITING_DISABLED_TITLE, - STUDIO_STORYBOARD_ENABLED, } from "./editor/manualEditingAvailability"; import { getHistoryShortcutLabel } from "../utils/studioHelpers"; import { useStudioShellContext } from "../contexts/StudioContext"; @@ -204,8 +203,8 @@ export function StudioHeader({ {projectId} - {/* Center: storyboard / preview toggle (flag-gated) */} - {STUDIO_STORYBOARD_ENABLED && } + {/* Center: storyboard / preview toggle */} + {/* Right: toolbar buttons */}