@remotion/studio-server: Migrate Studio API routes#7884
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
ℹ️ Route migration looks solid — one scope question below.
Reviewed changes — Migrated four ad-hoc Studio server routes (/api/composition-component-info, /api/open-in-editor, /api/register-client-render, /api/unregister-client-render) into the central allApiRoutes registry, switched clients from raw fetch to callApi(), and extracted shared request/response types into @remotion/studio-shared.
- Add new route handlers —
composition-component-info.ts,open-in-editor.ts,register-client-render.ts,unregister-client-render.tsall correctly implementApiHandlerand preserve same-origin validation for render registration. - Register routes in
allApiRoutes— New entries wired into the central registry; old manualhandleRoutesbranches removed cleanly. - Add shared types to
studio-shared—OpenInEditorRequest,OpenInEditorResponse,CompositionComponentInfoRequest,CompositionComponentInfoResponseexported from the shared package. - Update client callers —
save-render-output.ts,open-in-editor.ts,MenuBuildIndicator.tsx,use-menu-structure.tsx, andOpenInEditor.tsxall switched tocallApi(), removing redundant.then(res => res.json())chains. - Remove UV overlay code — ~500 lines of UV handle rendering, drag interaction, projective transform math, and associated tests deleted from
SelectedOutlineOverlay.tsx.
ℹ️ UV handle code removal seems unrelated to route migration
This PR deletes all UV coordinate overlay handles, projective-transform math, bilinear interpolation, drag interaction, and the associated unit tests from SelectedOutlineOverlay.tsx. That code was just introduced in the parent commit (a4f2d3a, #7875). Since the PR description and title focus exclusively on API route migration, it's unclear whether this removal is intentional. If it is, a brief note in the description would help reviewers understand the scope.
Technical details
# UV handle code removal seems unrelated to route migration
## Affected sites
- `packages/studio/src/components/SelectedOutlineOverlay.tsx` — ~500 lines removed (UV handle types, `parseUvCoordinate`, `getUvHandlePosition`, `getUvCoordinateForPoint`, `SelectedUvHandleCircle`, drag handlers, projective/bilinear math)
- `packages/studio/src/test/timeline-selection.test.ts` — 4 test cases removed (`UV handles project semantic outline corners`, `UV handles use projective projection for perspective quads`, `UV handle pointer position maps back to UV coordinates`, `UV handles are requested for selected effect children`)
## Required outcome
- Clarify whether the UV overlay handle removal is intentional and permanent, or a temporary revert.
- If intentional, update the PR description to mention the removal.
- If unintentional, restore the deleted code before merging.
## Open questions for the human
- Was the UV overlay handle feature (#7875) meant to be reverted?
- If only the overlay handles are being removed, should `TimelineUvCoordinateField.tsx` also be removed or updated?Kimi K2 | 𝕏

Summary
Verification
Closes #7876