Skip to content

Update OpenFilm MiniApp to OpenFilm 0.3.0 - #112

Merged
MyPrototypeWhat merged 1 commit into
MiniMax-AI:mainfrom
cristinamadureira353-svg:add-openfilm-miniapp
Nov 9, 2026
Merged

MyPrototypeWhat merged 1 commit into
MiniMax-AI:mainfrom
cristinamadureira353-svg:add-openfilm-miniapp

Conversation

@cristinamadureira353-svg

@cristinamadureira353-svg cristinamadureira353-svg commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #73 (merged): brings the OpenFilm Mini App to the current upstream release, 0.3.0, and fixes what only showed up once it was actually driven from inside MiniMax Code.

What and why

  • Start Studio the way the desktop app does. The panel used to run npx openfilm open. With 0.3.0 that path reuses whichever Studio the machine already has, checks for updates, and can try to launch an Electron app whose helper is not there. It now calls upstream's startStudio from the clone named by openfilmRepo (advertise: true, no browser opener), and only falls back to the pinned openfilm@0.3.0 from npm when there is no clone.
  • Let the OS pick the port. A fixed port collided with whatever OpenFilm was already running (EADDRINUSE). Studio now starts with port: 0; the real origin and film origin are read back from the run.json it writes, which is what reuse and the preview proxy already used.
  • Run the worker as Node, not as a second Electron. The panel's own process is Electron, so process.execPath is the helper binary; spawning it printed Unable to find helper app. The worker now gets ELECTRON_RUN_AS_NODE=1 (ignored when the parent really is node).
  • Merge project lists instead of replacing them. The bundled Studio reads its own studio.json; the panel now merges its own entries with the ones it reads in the user's OpenFilm home, so projects created in the panel survive a restart. The user's file is only read — disclosed in ## Data & access.
  • 0.3.0 IPC. desktop:chat:undo now validates turnId, desktop:agents:refresh is registered, and upstream's trash.mjs is passed to the chat handler because "undo a turn" moves the files that turn added to the trash. Installer, sign-in and automatic are still not registered.
  • Smaller hardening from a self-review: local agent starts are limited to project folders; when the spawned Studio dies the panel now reports it instead of showing a blank editor; dispose kills only the process this instance started (a run.json may have been rewritten by a newer Studio that is not ours); the npm fallback is resolved asynchronously so a slow npx cannot freeze the panel.
  • Proxy allowlist updated for the routes the 0.3.0 editor uses (canvas, library, locations, pick-folder/pick-files, diagnostics, …). /api/get (generates media, may cost) and /api/providers (your service keys) are still not proxied, as before.

Attribution is unchanged: OpenFilm is by the authors of openfilm/openfilm; this package only drives it at runtime and contains none of its source.

Testing

  • node test/accept-miniapp.mjs — 49 checks, all pass: boot on the real 0.3.0 (version asserted), desktop IPC, project tree, chat history, agent roster (11 agents), SSE, web fallback, missing-shell error, two panels → one Studio, dispose with open SSE streams, the review-hardening assertions (no key in the page, route/IPC allowlists, payload validation, reveal restriction, agent cwd restriction), the project-list merge, and the preview path (film page proxied, editor origin rewritten, bridge same-origin allowed, media served).
  • npm run check in this repository: plugins/cristinamadureira353-svg/openfilm: OK, # pass 87, # fail 0.
  • Manual, in MiniMax Code on macOS: the panel loads the 0.3.0 desktop UI (it shows the 0.3.0 what's-new dialog and the canvas button), the chat column and composer render, Settings opens (General / Agents / Services / Shortcuts / Advanced / Developer), and the console shows no errors and no failed requests.

Not verified: a full agent turn end to end — two chat-side fetches (/api/turns/<id>/progress, /api/uploads/blob/…) have no matching Studio route, so those specific requests cannot succeed through the proxy; Windows/Linux; the npm fallback when there is no local clone; and the preview with a non-empty project (the preview pane and the film proxy are covered by the acceptance checks, but the project open during the manual run was empty).

- Pin the npm fallback to openfilm@0.3.0 and start Studio by calling upstream's
  startStudio from the local clone instead of `openfilm open` (that path reuses a
  machine-wide Studio and can launch an incomplete Electron app).
- Let the OS pick the Studio port (port: 0) and read the real origin and film
  origin back from the run.json it writes; a fixed port collided.
- Spawn the worker with ELECTRON_RUN_AS_NODE: the panel runs inside Electron, so
  process.execPath is the helper binary, not node.
- Merge the panel's own project list with the user's instead of overwriting it.
- Register the 0.3.0 IPC additions (chat:undo with turnId, agents:refresh) and pass
  upstream's trash into the chat handler.
- Restrict local agent starts to project folders.
- Fail visibly when the spawned Studio dies; kill only the process we started.
- Resolve the npm fallback asynchronously; update README/NOTICE/SKILL for 0.3.0.
- Acceptance script: 49 checks.
@MyPrototypeWhat
MyPrototypeWhat merged commit 9b27e90 into MiniMax-AI:main Nov 9, 2026
1 check passed
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.

2 participants