Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
79b19b5
fix(studio): guard Zustand no-op setters and fix useConsoleErrorCaptu…
miguel-heygen Jun 13, 2026
5c7c091
fix(studio): delete dead files and unused exports
miguel-heygen Jun 13, 2026
09c85cb
fix(studio): eliminate effect-chain state mirroring for lint findings…
miguel-heygen Jun 13, 2026
dbc95a5
fix(studio): memoize renderQueue, toolbar, and canvas rect to prevent…
miguel-heygen Jun 13, 2026
c6f0c2e
refactor(studio): consolidate GSAP shared primitives — defaults, ifra…
miguel-heygen Jun 13, 2026
8073ff6
fix(studio): remove dead store fields, dead file, duplicate helper, a…
miguel-heygen Jun 13, 2026
217c22b
refactor(studio): deduplicate selector helpers, rounding utils, perce…
miguel-heygen Jun 13, 2026
fcfcf38
Merge branch 'fix/studio-app-rerender-cascade' into refactor/studio-s…
miguel-heygen Jun 13, 2026
666a87f
Merge branch 'refactor/studio-gsap-dedup' into refactor/studio-simpli…
miguel-heygen Jun 13, 2026
a0fd32f
Merge branch 'fix/studio-effect-chain-elimination' into refactor/stud…
miguel-heygen Jun 13, 2026
2537911
Merge branch 'fix/studio-zustand-guards-memleak' into refactor/studio…
miguel-heygen Jun 13, 2026
2094631
Merge branch 'fix/studio-second-pass-cleanup' into refactor/studio-si…
miguel-heygen Jun 13, 2026
425d9f9
Merge branch 'refactor/studio-dedup-sweep' into refactor/studio-simpl…
miguel-heygen Jun 13, 2026
40b3946
fix(studio): split StudioContext into Shell + Playback to prevent cas…
miguel-heygen Jun 13, 2026
49f4ed0
refactor(studio): decompose useGsapScriptCommits into focused mutatio…
miguel-heygen Jun 13, 2026
b543ed9
refactor(studio): decompose useFileManager into focused file operatio…
miguel-heygen Jun 13, 2026
07e5e16
refactor(studio): decompose useDomEditCommits into focused commit hooks
miguel-heygen Jun 13, 2026
bebca32
refactor(studio): simplify useAppHotkeys with declarative command table
miguel-heygen Jun 13, 2026
5190126
refactor(studio): simplify useAppHotkeys with declarative command table
miguel-heygen Jun 13, 2026
bf25099
fix(studio): remove unused getDomEditTargetKey import
miguel-heygen Jun 13, 2026
8bb330d
refactor(studio): decompose useDomEditSession into focused editing hooks
miguel-heygen Jun 13, 2026
c3d6ab6
style(studio): fix formatting in 5 files
miguel-heygen Jun 13, 2026
3b41904
fix(studio): trim App.tsx to 598 lines (under 600 limit)
miguel-heygen Jun 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .fallowrc.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
"packages/studio/src/components/nle/TimelineEditorNotice.tsx",
// Zoom hook extracted for downstream razor-blade PRs (#1330, #1331).
"packages/studio/src/player/components/useTimelineZoom.ts",
// Preview helper consumed dynamically from the studio iframe bridge.
"packages/studio/src/hooks/gsapRuntimePreview.ts",
],
"ignorePatterns": [
"docs/**",
Expand Down
14 changes: 14 additions & 0 deletions lefthook-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
commit-msg:
commands:
coauthor:
run: |
MSG_FILE="{1}"
TRAILER1="Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>"
if ! grep -qF "$TRAILER1" "$MSG_FILE"; then
# Ensure blank line before trailers
if [ -n "$(tail -c1 "$MSG_FILE")" ]; then
echo "" >> "$MSG_FILE"
fi
echo "" >> "$MSG_FILE"
echo "$TRAILER1" >> "$MSG_FILE"
fi
344 changes: 174 additions & 170 deletions packages/studio/src/App.tsx

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions packages/studio/src/captions/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const initialState = {
sourceFilePath: null,
};

export const useCaptionStore = create<CaptionState>((set) => ({
export const useCaptionStore = create<CaptionState>((set, get) => ({
...initialState,

// Basic
Expand All @@ -82,15 +82,11 @@ export const useCaptionStore = create<CaptionState>((set) => ({
return { selectedSegmentIds: new Set([id]), selectedGroupId: null };
}),

selectGroup: (id) =>
set((state) => {
const group = state.model?.groups.get(id);
if (!group) return {};
return {
selectedSegmentIds: new Set(group.segmentIds),
selectedGroupId: id,
};
}),
selectGroup: (id) => {
const group = get().model?.groups.get(id);
if (!group) return;
set({ selectedSegmentIds: new Set(group.segmentIds), selectedGroupId: id });
},

selectAll: () =>
set((state) => {
Expand All @@ -101,7 +97,11 @@ export const useCaptionStore = create<CaptionState>((set) => ({
};
}),

clearSelection: () => set({ selectedSegmentIds: new Set(), selectedGroupId: null }),
clearSelection: () => {
const { selectedSegmentIds, selectedGroupId } = get();
if (selectedSegmentIds.size === 0 && selectedGroupId === null) return;
set({ selectedSegmentIds: new Set(), selectedGroupId: null });
},

// Segment mutations
updateSegmentStyle: (segmentId, style) =>
Expand Down
8 changes: 4 additions & 4 deletions packages/studio/src/components/StudioHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
STUDIO_MANUAL_EDITING_DISABLED_TITLE,
} from "./editor/manualEditingAvailability";
import { getHistoryShortcutLabel } from "../utils/studioHelpers";
import { useStudioContext } from "../contexts/StudioContext";
import { useStudioShellContext } from "../contexts/StudioContext";
import { usePanelLayoutContext } from "../contexts/PanelLayoutContext";
import { useDomEditContext } from "../contexts/DomEditContext";
import { useDomEditActionsContext } from "../contexts/DomEditContext";
import { trackStudioEvent } from "../utils/studioTelemetry";

export interface StudioHeaderProps {
Expand Down Expand Up @@ -150,9 +150,9 @@ export function StudioHeader({
inspectorPanelActive,
onExport,
}: StudioHeaderProps) {
const { projectId, editHistory, handleUndo, handleRedo } = useStudioContext();
const { projectId, editHistory, handleUndo, handleRedo } = useStudioShellContext();
const { rightCollapsed, setRightCollapsed, setRightPanelTab } = usePanelLayoutContext();
const { clearDomSelection } = useDomEditContext();
const { clearDomSelection } = useDomEditActionsContext();

return (
<div className="flex items-center justify-between h-10 px-3 bg-neutral-900 border-b border-neutral-800 flex-shrink-0">
Expand Down
4 changes: 2 additions & 2 deletions packages/studio/src/components/StudioLeftSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LeftSidebar, type LeftSidebarHandle } from "./sidebar/LeftSidebar";
import { MediaPreview } from "./MediaPreview";
import { isMediaFile } from "../utils/mediaTypes";
import { usePanelLayoutContext } from "../contexts/PanelLayoutContext";
import { useStudioContext } from "../contexts/StudioContext";
import { useStudioShellContext } from "../contexts/StudioContext";
import { useFileManagerContext } from "../contexts/FileManagerContext";
import { getPersistedRenderSettings } from "./renders/renderSettings";
import type { BlockPreviewInfo } from "./sidebar/BlocksTab";
Expand Down Expand Up @@ -39,7 +39,7 @@ export function StudioLeftSidebar({
handlePanelResizeMove,
handlePanelResizeEnd,
} = usePanelLayoutContext();
const { projectId, renderQueue, waitForPendingDomEditSaves } = useStudioContext();
const { projectId, renderQueue, waitForPendingDomEditSaves } = useStudioShellContext();
const {
compositions,
assets,
Expand Down
Loading
Loading