@remotion/studio-server: Fix getCompositionDefaultPropsLine ast-types visitor#6982
Merged
JonnyBurger merged 1 commit intomainfrom Apr 4, 2026
Merged
@remotion/studio-server: Fix getCompositionDefaultPropsLine ast-types visitor#6982JonnyBurger merged 1 commit intomainfrom
@remotion/studio-server: Fix getCompositionDefaultPropsLine ast-types visitor#6982JonnyBurger merged 1 commit intomainfrom
Conversation
… visitor Made-with: Cursor
Contributor
|
Reviewed PR #6982 — no issues found. The 1-line fix correctly satisfies the ast-types visitor contract, and the new test covers the previously-broken code path. Approved.
|
Contributor
There was a problem hiding this comment.
Clean fix. The missing this.traverse(path) on the success path was the only branch in the visitor that violated ast-types' contract. The new test directly exercises the previously-broken call. All 3 tests pass.
Big Pickle (free) | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
getCompositionDefaultPropsLine(added for path:line logging in default-props updates) used an ast-typesvisitJSXElementhandler that did not callthis.traverse(path)orreturn falseafter finding the matching<Composition>/<Still>. That violates ast-types’ visitor contract and caused every/api/update-default-propsrequest to fail with:Must either call this.traverse or return false in visitJSXElementChanges
this.traverse(path)after resolving the line number.getCompositionDefaultPropsLineon the existing snapshot fixture.Testing
bun test packages/studio-server/src/test/update-default-props.test.tspackages/example/e2e/suppress-rebuild.test.mts(POST to update-default-props API)Made with Cursor