@remotion/studio: Request element install targets on demand#9025
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the change replaces the fixed 2-second polling of /api/update-element-install-target with a change-only dispatch, and extends the server-side install-target max age from 5 seconds to 5 minutes to match the focused-window TTL.
packages/studio/src/components/Canvas.tsx— addsareElementInstallTargetsEqualand alastSentElementInstallTargetRefso the API request is only issued when the payload actually changes; focus and pointerdown events trigger re-evaluation, and failed requests reset the ref so the next change resends.packages/studio-server/src/preview-server/element-install-state.ts— raisesELEMENT_INSTALL_TARGET_MAX_AGEto5 * 60 * 1000so the server-state TTL aligns with the focus-based TTL used inpackages/studio-server/src/routes.ts.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
@remotion/studio: Update element install target only on change@remotion/studio: Request element install targets on demand
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
/api/update-element-install-targetfrom Studio/api/element-install-targetrequest the current target from connected Studio clients over EventSourceTesting
bun test packages/studio-server/src/test/element-install-state.test.tsbun run --cwd packages/studio-shared makebun run --cwd packages/studio-server makebun run --cwd packages/studio makebun run buildbun run stylecheckbun run --cwd packages/studio formattingbun run --cwd packages/studio makeCloses #9023