Skip to content

@remotion/studio: Support custom editors - #9950

Merged
JonnyBurger merged 2 commits into
mainfrom
codex/custom-editors
Jul 30, 2026
Merged

@remotion/studio: Support custom editors#9950
JonnyBurger merged 2 commits into
mainfrom
codex/custom-editors

Conversation

@JonnyBurger

Copy link
Copy Markdown
Member

Summary

  • accept custom editor definitions in Config.setDefaultEditor()
  • resolve and launch custom executables server-side without a shell
  • expose only an opaque editor ID and display name to Studio
  • document placeholders, platform behavior, and the security model

Test plan

  • bun test packages/cli/src/test/config-reset.test.ts packages/cli/src/test/config-reload.test.ts packages/studio-server/src/test/custom-editor.test.ts packages/studio-server/src/test/editor-registry.test.ts packages/studio-server/src/test/default-editor-route.test.ts
  • bun run build
  • bun run stylecheck
  • bunx turbo run prewarm-twoslash --filter=docs --no-update-notifier

Stack

Closes #9342

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview Jul 30, 2026 5:22pm
remotion Ready Ready Preview Jul 30, 2026 5:22pm

Request Review

Base automatically changed from codex/configure-default-editor-menu to main July 30, 2026 13:39
@JonnyBurger
JonnyBurger changed the base branch from main to codex/configure-default-editor-menu July 30, 2026 13:40
@JonnyBurger
JonnyBurger force-pushed the codex/custom-editors branch from aec0a7b to 395c4a5 Compare July 30, 2026 14:43
@JonnyBurger
JonnyBurger force-pushed the codex/custom-editors branch from 395c4a5 to 1fbda73 Compare July 30, 2026 15:00
@JonnyBurger
JonnyBurger marked this pull request as ready for review July 30, 2026 16:40
auto-merge was automatically disabled July 30, 2026 16:53

Pull Request is not mergeable

auto-merge was automatically disabled July 30, 2026 16:53

Pull Request is not mergeable

auto-merge was automatically disabled July 30, 2026 16:53

Pull Request is not mergeable

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • CustomEditor type and option validation — adds CustomEditor type with type, name, executable, and arguments fields; validates placeholders (%TARGET_PATH% required), argument types, and empty-name checks in default-editor.tsx. Renames the old DefaultEditor to BuiltInEditor and makes the new DefaultEditor = BuiltInEditor | CustomEditor.
  • Server-side resolution and launchingresolveCustomEditorExecutable searches PATH, handles absolute paths, Mac .app bundles (via open -a), Windows .exe/.com filtering, and symlinks. launchCustomEditor spawns with shell: false, detached: true, stdio: 'ignore' — no shell injection surface.
  • WSL path normalizationnormalizeCustomEditorTargetPath converts absolute /mnt/ paths to relative paths when running under WSL, mirroring the existing behavior in launchEditor for built-in editors.
  • Sanitized API surfaceGetDefaultEditorInfoResponse and UpdateDefaultEditorRequest use EditorPickerId = BuiltInEditor | 'custom'. The browser never sees the custom editor's executable path, arguments, or config object — only the opaque 'custom' ID and display name. updateDefaultEditorHandler rejects any custom editor payload sent from the browser and preserves the server-side config as-is when 'custom' is selected.
  • Test coveragecustom-editor.test.ts validates resolution on Linux/Windows/macOS, placeholder expansion, WSL normalization, and a full end-to-end spawn. default-editor-route.test.ts covers info-exposure, config preservation on 'custom' select, and browser-submitted rejection. editor-registry.test.ts covers custom editor resolution, fallback on missing executable, and warning deduplication.
  • Docs and UI — new docs/studio/open-in-editor.mdx page documents custom editor config, placeholders, platform support, and security model. ConfigureDefaultEditorModal shows the custom editor with an icon in the dropdown.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

auto-merge was automatically disabled July 30, 2026 16:54

Pull Request is not mergeable

@JonnyBurger
JonnyBurger force-pushed the codex/custom-editors branch from 98fbe3b to ec3ff2b Compare July 30, 2026 17:06
@JonnyBurger
JonnyBurger changed the base branch from codex/configure-default-editor-menu to main July 30, 2026 17:14
@JonnyBurger
JonnyBurger force-pushed the codex/custom-editors branch from ec3ff2b to 011dd5b Compare July 30, 2026 17:15
@JonnyBurger
JonnyBurger merged commit a50cb6f into main Jul 30, 2026
18 checks passed
@JonnyBurger
JonnyBurger deleted the codex/custom-editors branch July 30, 2026 17:26
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.

Studio: Support custom editors in Open in Editor

1 participant