Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion frontend/scripts/smoke-clips-first-lifecycle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ const appSource = readSource('../src/App.tsx');
const panelSource = readSource('../src/components/AIPanel.tsx');
const aiStoreSource = readSource('../src/store/aiStore.ts');

assert.match(appSource, /label=\{editorWorkflow === 'short' \? 'Export Video' : 'Export'\}/);
assert.match(appSource, /const currentWorkflowIntent: WorkflowIntent = editorWorkflow === 'short' \? 'short' : 'full-video'/);
assert.match(appSource, /onClick=\{\(\) => void handleOpenFile\(currentWorkflowIntent\)\}/);
assert.match(appSource, /label=\{editorWorkflow === 'short' \? 'Export Full Video' : 'Export'\}/);
assert.match(appSource, /dataAction="full-video-export"/);
assert.match(appSource, /const resetMediaAIWorkspaceForNewMedia = useCallback/);
assert.match(appSource, /useAIStore\.getState\(\)\.resetMediaAIWorkspace\(\)/);
Expand Down
2 changes: 1 addition & 1 deletion frontend/scripts/smoke-editor-state.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ assert.equal(historyStore.temporal.getState().pastStates.length, 1, 'transient p

const appSource = readFileSync(resolve(__dirname, '../src/App.tsx'), 'utf8');
const editorStoreSource = readFileSync(resolve(__dirname, '../src/store/editorStore.ts'), 'utf8');
assert.match(appSource, /onClick=\{\(\) => void handleOpenFile\(\)\}/);
assert.match(appSource, /onClick=\{\(\) => void handleOpenFile\(currentWorkflowIntent\)\}/);
assert.doesNotMatch(appSource, /onClick=\{handleOpenFile\}/);
assert.match(editorStoreSource, /partialize:\s*partializeEditorHistory/);
assert.match(editorStoreSource, /equality:\s*editorHistoryEqual/);
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ export default function App() {
const sidePanelLabel = activePanel === 'ai'
? editorWorkflow === 'short' ? 'Create Clips' : 'AI tools'
: activePanel === 'export' ? 'Export' : 'Settings';
const currentWorkflowIntent: WorkflowIntent = editorWorkflow === 'short' ? 'short' : 'full-video';

const resolveAutosaveRestore = (restore: boolean) => {
const request = autosaveRestoreRequest;
Expand Down Expand Up @@ -771,7 +772,7 @@ export default function App() {
<ToolbarButton
icon={<FolderOpen className="w-4 h-4" />}
label="Open"
onClick={() => void handleOpenFile()}
onClick={() => void handleOpenFile(currentWorkflowIntent)}
disabled={isBrowserUploading}
/>
<ToolbarButton
Expand All @@ -797,7 +798,7 @@ export default function App() {
/>
<ToolbarButton
icon={<Download className="w-4 h-4" />}
label={editorWorkflow === 'short' ? 'Export Video' : 'Export'}
label={editorWorkflow === 'short' ? 'Export Full Video' : 'Export'}
active={activePanel === 'export'}
onClick={() => togglePanel('export')}
disabled={words.length === 0}
Expand Down