gate the folder keep-all escape hatch behind config.folderKeepAll
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+7
-4
@@ -485,10 +485,10 @@ const FolderSummary = ({ folder, keepAll = false, onKeepAllChange }: FolderSumma
|
||||
<div className="px-5 py-3 border-b border-duck-dark/10 flex flex-col gap-1.5">
|
||||
<span className="flex items-center gap-2 text-sm text-amber-600 dark:text-amber-500">
|
||||
<AlertCircle className="h-4 w-4 shrink-0" />
|
||||
{majorityCount} of {fileCount} videos share this layout and will be converted.
|
||||
{majorityCount} of {fileCount} videos share this layout and will be processed.
|
||||
</span>
|
||||
<div className="text-xs text-duck-dark/50 dark:text-foreground/50">
|
||||
<span>Different layout — convert these separately:</span>
|
||||
<span>Different layout — run these separately:</span>
|
||||
<ul className="mt-1 max-h-24 overflow-y-auto flex flex-col gap-0.5 pl-1">
|
||||
{skipped.map((f) => (
|
||||
<li key={f} className="truncate">
|
||||
@@ -567,11 +567,14 @@ const ScriptRunner = ({ taskDirName, autoInputs, context, cwd, entryType, filePa
|
||||
const [includeFiles, setIncludeFiles] = useState('');
|
||||
// Mixed-layout escape hatch: convert every video keeping all tracks (no picking, nothing skipped).
|
||||
const [keepAll, setKeepAll] = useState(false);
|
||||
// Task opts into the folder "keep every track, run over all" escape hatch via config.folderKeepAll.
|
||||
const [folderKeepAll, setFolderKeepAll] = useState(false);
|
||||
|
||||
// Fetch task detail to get input definitions
|
||||
useEffect(() => {
|
||||
client.get<{ inputs?: Record<string, TaskInputDef> }>(`/tasks/${taskDirName}`).then((task) => {
|
||||
client.get<{ inputs?: Record<string, TaskInputDef>; config?: { folderKeepAll?: boolean } }>(`/tasks/${taskDirName}`).then((task) => {
|
||||
const defs: Record<string, TaskInputDef> = task.inputs ?? {};
|
||||
setFolderKeepAll(task.config?.folderKeepAll === true);
|
||||
setInputDefs(defs);
|
||||
// Initialize from autofill context, then defaults
|
||||
const initial: Record<string, string> = {};
|
||||
@@ -717,7 +720,7 @@ const ScriptRunner = ({ taskDirName, autoInputs, context, cwd, entryType, filePa
|
||||
<FolderSummary
|
||||
folder={folder}
|
||||
keepAll={keepAll}
|
||||
onKeepAllChange={hasSelectablePickers && folder.skipped.length > 0 ? setKeepAll : undefined}
|
||||
onKeepAllChange={folderKeepAll && hasSelectablePickers && folder.skipped.length > 0 ? setKeepAll : undefined}
|
||||
/>
|
||||
)}
|
||||
{inputDefs && (
|
||||
|
||||
Reference in New Issue
Block a user