feat(studio): make storyboard view default available (remove FF) (#1794)

* 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 <ViewModeToggle />. 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 <noreply@anthropic.com>

* docs(skills): drop stale VITE_STUDIO_ENABLE_STORYBOARD reference

The Storyboard view is now available by default (the FF removed in this PR);
storyboard-format.md no longer points at the dead env var, and skills-manifest
is regenerated for the hyperframes-core hash. Closes the Via/Magi review nit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Jerrai <noreply@anthropic.com>
This commit is contained in:
James Russo
2026-06-29 22:32:52 -07:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 812a5d4246
commit f24a1a9ce7
7 changed files with 18 additions and 41 deletions
@@ -44,14 +44,11 @@ export interface ViewModeValue {
}
/**
* Owns the view-mode state. When `enabled` is false (storyboard flag off) the
* mode is pinned to `timeline` and the URL is left untouched, so the feature is
* fully inert until the flag is on.
* Owns the view-mode state — initial read from `?view=`, toggling, popstate sync.
* Storyboard mode is always available; no flag gating.
*/
export function useViewModeState(enabled: boolean): ViewModeValue {
const [viewMode, setMode] = useState<StudioViewMode>(() =>
enabled ? readViewModeFromUrl() : "timeline",
);
export function useViewModeState(): ViewModeValue {
const [viewMode, setMode] = useState<StudioViewMode>(() => readViewModeFromUrl());
// Reflect genuine browser back/forward between history entries with a different
// `?view=`. Note: our own writes use `replaceState` (below), which does NOT fire
@@ -60,23 +57,17 @@ export function useViewModeState(enabled: boolean): ViewModeValue {
// the mount-time read); a scripted `pushState`/`replaceState` to `?view=` would not be
// reflected here, by design.
useEffect(() => {
if (!enabled) return;
const onPopState = () => setMode(readViewModeFromUrl());
window.addEventListener("popstate", onPopState);
return () => window.removeEventListener("popstate", onPopState);
}, [enabled]);
}, []);
const setViewMode = useCallback(
(mode: StudioViewMode) => {
if (!enabled) return;
setMode(mode);
writeViewModeToUrl(mode);
},
[enabled],
);
const setViewMode = useCallback((mode: StudioViewMode) => {
setMode(mode);
writeViewModeToUrl(mode);
}, []);
const effectiveMode = enabled ? viewMode : "timeline";
return useMemo(() => ({ viewMode: effectiveMode, setViewMode }), [effectiveMode, setViewMode]);
return useMemo(() => ({ viewMode, setViewMode }), [viewMode, setViewMode]);
}
const ViewModeContext = createContext<ViewModeValue | null>(null);