{"record":{"id":"ad128ec6df4cf82b","repo":"remotion-dev/remotion","slug":"no-changes-were-made-to-the-file","errorCode":null,"errorMessage":"No changes were made to the file","messagePattern":"No changes were made to the file","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/studio-server/src/preview-server/routes/apply-visual-control-change.ts","lineNumber":79,"sourceCode":"\t\t\tfileName,\n\t\t\taction: 'apply visual control change to',\n\t\t});\n\n\t\tconst fileContents = readFileSync(absolutePath, 'utf-8');\n\t\tconst ast = parseAst(fileContents);\n\t\tconst logLine =\n\t\t\tchanges.length > 0 ? getVisualControlChangeLine(ast, changes[0].id) : 1;\n\n\t\tconst {newContents: output, changesMade} = applyVisualControl({\n\t\t\tinput: fileContents,\n\t\t\ttransformation: {\n\t\t\t\ttype: 'apply-visual-control',\n\t\t\t\tchanges,\n\t\t\t},\n\t\t});\n\n\t\tif (changesMade.length === 0) {\n\t\t\tthrow new Error('No changes were made to the file');\n\t\t}\n\n\t\tpushToUndoStack({\n\t\t\tfilePath: absolutePath,\n\t\t\toldContents: fileContents,\n\t\t\tnewContents: null,\n\t\t\tlogLevel,\n\t\t\tremotionRoot,\n\t\t\tlogLine,\n\t\t\tdescription: {\n\t\t\t\tundoMessage: '↩️  Visual control change',\n\t\t\t\tredoMessage: '↪️  Visual control change',\n\t\t\t},\n\t\t\tentryType: 'visual-control',\n\t\t\tsuppressHmrOnFileRestore: true,\n\t\t\tnodePathRemappings: null,\n\t\t});\n\t\tsuppressUndoStackInvalidation(absolutePath);","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/studio-server/src/preview-server/routes/apply-visual-control-change.ts#L61-L97","documentation":"The apply-visual-control route sends a set of visual-control changes (type: 'apply-visual-control') to a codemod and collects which changes were actually made. If changesMade.length === 0, nothing in the file was modified, so the handler throws instead of pushing an empty undo entry and pretending success.","triggerScenarios":"POSTing to the apply-visual-control route with changes that don't apply — e.g. stale schema/control values that no longer match the target element, a nodePath that no longer exists after external edits, or a change set that is semantically a no-op.","commonSituations":"Studio UI controls applied after the file was edited in an external editor, or re-applying the same visual-control change twice so the second application has nothing left to change.","solutions":["Refresh/reload the composition so the control schema matches the current file","Verify the target element and nodePath still exist in the source file","Only send changes whose values actually differ from the current file content"],"exampleFix":"// before: re-applying identical values\napplyVisualControlChange({ changes: [{ nodePath, value: currentValue }] });\n// after: skip no-op changes first\nconst realChanges = changes.filter((c) => !deepEqual(c.value, currentValue[c.nodePath]));\nif (realChanges.length) applyVisualControlChange({ changes: realChanges });","handlingStrategy":"validation","validationCode":"// client-side: only send changes that differ\nconst applicable = changes.filter((c) => c.value !== currentValue);\nif (applicable.length === 0) return; // skip request","typeGuard":null,"tryCatchPattern":"try {\n  await applyVisualControlChange({changes});\n} catch (e) {\n  if (/No changes were made/.test(e.message)) {\n    // treat as no-op, refresh schema before retrying\n  }\n}","preventionTips":["Deduplicate/no-op-filter changes before sending","Refresh the control schema after any external file edit","Re-apply from the latest file state rather than a cached one"],"tags":["studio","codemod","no-op"],"backgroundTag":"empty-result-set","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-18T00:12:20.256Z","contentChangedAt":"2026-09-18T00:12:20.256Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}