remotion-monorepo: Preserve computed styles from object spreads - #9462
Conversation
…ctive-spread-values # Conflicts: # packages/studio-server/src/preview-server/routes/can-update-sequence-props.ts
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — The PR makes Studio's nested-prop editor treat object-spread-derived values as computed, preserving their runtime values while still allowing explicitly declared post-spread properties to be edited statically.
getNestedPropStatusnow scans object properties from right to left and bails tocomputedStatus()as soon as it hits aSpreadElement, so a value inherited from a spread is not misidentified as static.- Test coverage adds a case for
styleobjects with a spread before, after, and surrounding a nested property. - Docs and skill explain that computed values are left untouched and that declaring a property after the spread makes it editable.
Kimi K2 (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes since 4d779e8 — The follow-up commits merge origin/main and simplify both the object-spread guidance and the nested-property scan.
getNestedPropStatuswas refactored to a right-to-left loop usinggetObjectPropertyNameand the existingcssShorthandhelper.- Docs and skill were simplified to a blanket recommendation against object spreads.
Kimi K2 (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏
| Keep the input range and output range directly in the `interpolate()` call. | ||
| The input range must use hardcoded numbers, not variables or expressions such as `[sendStartFrame, sendStartFrame + duration]`. | ||
|
|
||
| Do not use object spreads for interactive props. |
There was a problem hiding this comment.
ℹ️ The code explicitly preserves computed values from spreads and still allows a property declared after a spread to be edited. A blanket "Do not use object spreads" may push users/agents to over-refactor shared-style patterns that the implementation supports. Consider retaining the nuance that inherited values stay computed and that post-spread declarations remain editable.
| To make an element or custom component interactive, use: | ||
| [Make a component interactive](https://www.remotion.dev/docs/studio/make-component-interactive.md) | ||
|
|
||
| ## Avoid object spreads |
There was a problem hiding this comment.
ℹ️ Same as the docs note: since getNestedPropStatus supports spreads by treating them as computed, the skill may be more useful if it states that inherited values are computed and that a property declared after the spread is still editable, rather than prohibiting spreads outright.

Summary
Test plan
bun test packages/studio-server/src/test/compute-sequence-props-status.test.tsbun run buildbun run stylecheckCloses #9450
Preview