Skip to content

@remotion/studio-server: Fix getCompositionDefaultPropsLine ast-types visitor#6982

Merged
JonnyBurger merged 1 commit intomainfrom
fix-default-props-visitor-4oc
Apr 4, 2026
Merged

@remotion/studio-server: Fix getCompositionDefaultPropsLine ast-types visitor#6982
JonnyBurger merged 1 commit intomainfrom
fix-default-props-visitor-4oc

Conversation

@JonnyBurger
Copy link
Copy Markdown
Member

Summary

getCompositionDefaultPropsLine (added for path:line logging in default-props updates) used an ast-types visitJSXElement handler that did not call this.traverse(path) or return false after finding the matching <Composition> / <Still>. That violates ast-types’ visitor contract and caused every /api/update-default-props request to fail with:

Must either call this.traverse or return false in visitJSXElement

Changes

  • Call this.traverse(path) after resolving the line number.
  • Add a unit test that exercises getCompositionDefaultPropsLine on the existing snapshot fixture.

Testing

  • bun test packages/studio-server/src/test/update-default-props.test.ts
  • packages/example/e2e/suppress-rebuild.test.mts (POST to update-default-props API)

Made with Cursor

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Apr 4, 2026 9:03am
remotion Ready Ready Preview, Comment Apr 4, 2026 9:03am

Request Review

@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog bot commented Apr 4, 2026

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.

Pullfrog  | View workflow run | Triggered by Pullfrog | Using Big Pickle (free) | 𝕏

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Pullfrog  | View workflow run | Using Big Pickle (free) | 𝕏

@JonnyBurger JonnyBurger merged commit bcf39b0 into main Apr 4, 2026
19 checks passed
@JonnyBurger JonnyBurger deleted the fix-default-props-visitor-4oc branch April 4, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant