OpenReel Video - Professional browser-based video editor. Open source CapCut alternative. 100% browser-based, no installation, no cloud uploads, no watermarks.
Desktop Phase 3 — Resolve Editor (functional Edit/Color/Deliver) Implementation Plan
Architecture update (2026-07-31): The cloud GPU render queue referenced in this historical plan has been removed. Deliver/export is local-only.
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Make the desktop app a usable, DaVinci-Resolve-style editor: a project-start surface, then Edit (media pool · viewer · timeline · inspector), Color (viewer · scopes · grading), and Deliver (export + render queue) pages — each a bespoke desktop layout that reuses the existing engine-bound panels (Preview, Timeline, AssetsPanel, InspectorPanel) and shared stores, themed charcoal/teal.
Architecture: Reuse the heavy self-wired panels wholesale (they take zero props and bind to Zustand stores; the .openreel-desktop token layer already restyles them). Build the bespoke shell: a project gate + start screen, a reused editor engine/bridge bootstrap, and Resolve-style docked page layouts under apps/web/src/desktop/. No engine/renderer rewrite; desktop performance comes from the already-wired native FFmpeg sidecar + GPU cloud jobs.
Tech Stack: React 18 + Zustand + Tailwind (apps/web), the existing core engines/bridges, Vitest/RTL.
Reference spec: docs/superpowers/specs/2026-06-02-desktop-native-pro-redesign-design.md (§5 Resolve UI). Builds on Phases 1–2 (shell, theme, boot) already merged.
Conventions (CLAUDE.md): no line comments / no JSDoc except public API; explicit return types; avoid any; defensive guards; Conventional Commits; run typecheck + tests before each commit. The desktop shell lives in apps/web/src/desktop/ and is gated on window.openreel?.platform === "desktop"; the web app and the web EditorInterface are NOT modified except to extract shared, reused logic (and only in a behavior-preserving way).
Key facts (verified by recon 2026-06-02)
- Reusable panels (zero props, store-bound, drop into any layout):
Preview(components/editor/Preview.tsx:435— the viewer canvas + WebGPU compositor + master-clock playback loop),Timeline(components/editor/Timeline.tsx:56),AssetsPanel(components/editor/AssetsPanel.tsx:582— the media library),InspectorPanel(components/editor/InspectorPanel.tsx:75),AIPanel,AudioMixer(takes{visible,onClose}),KeyframeEditorPanel(prop-driven). All wrap inPanelErrorBoundary. - Engine/bridge bootstrap lives in
EditorInterface.tsx(useEngineInitialization~:81-184): it runsuseEngineStore().initialize()then sequences bridge init Media→Playback→Render→Effects(w,h)→Transition(w,h) (imports at :18-37, init at :116-174) and renders a loading spinner untilinitialized(391-404). Panels must mount UNDER this initialized state. - Project lifecycle (store, UI-agnostic):
useProjectStore—createNewProject(name?, settings?)(project-store.ts:1481),loadProject(project)(:1505),updateSettings(partial)(:1623),getFullProject()(:4191),recoverFromAutoSave(saveId)(:4119),initializeAutoSave()(:4087).projectselector is the source of truth. Presets:SOCIAL_MEDIA_PRESETS+createProjectSettingsFromPresetfrom@openreel/core;createEmptyProjectfromstores/project/project-helpers.ts. - Recent/persistence: auto-save (
autoSaveManager) is the live path;services/project-manager.tsis already desktop-aware (window.openreel?.fsnative open/save) but onlyaddToRecentis wired today. - Selection:
useUIStore.getSelectedClipIds()(ui-store.ts:103); inspector activates for exactly one selected clip. - Color page reusables:
ColorGradingSection(inspector/ColorGradingSection.tsx:65, clipId prop),ScopesPanel(inspector/ScopesPanel.tsx:406, takes a frameImageBitmap), fed bygetRenderBridge().renderCurrentFrame()(render-bridge.ts:231) +getEffectsBridge().generateWaveform/Vectorscope/Histogram. - Deliver reusables:
ExportDialog(components/editor/ExportDialog.tsx:120, emitsVideoExportSettings); the actual export trigger isrunExport(...)+showSavePicker(...)buried inToolbar.tsx:211/249(must be extracted to a shared service). GPU cloud:submitClipJob(services/gpu-jobs.ts),useGpuJobStore,useGpuJobPoller. - ui-store seam:
desktopPage: "edit"|"color"|"deliver"+setDesktopPagealready drivedesktop/shell/Workspace.tsx(placeholders today). Dead PanelIds (colorGrading,subtitles,effects,mediaLibrary) are free to repurpose.
File Structure
- Create
apps/web/src/desktop/editor/useDesktopEditorBootstrap.ts— reuse/extract the engine+bridge init + ready gate. - Create
apps/web/src/desktop/editor/EditorBootstrapGate.tsx— renders a themed loading state until ready, then children. - Create
apps/web/src/desktop/start/DesktopStartScreen.tsx— Resolve-styled new-project + recent surface. - Create
apps/web/src/desktop/start/desktop-project-actions.ts— pure helpers binding to project-store/presets. - Create
apps/web/src/desktop/pages/EditPage.tsx,ColorPage.tsx,DeliverPage.tsx. - Create
apps/web/src/services/export-runner.ts— extractedrunExport/showSavePickershared by Toolbar + Deliver. - Modify
apps/web/src/desktop/DesktopApp.tsx— project gate (start vs workspace) + bootstrap. - Modify
apps/web/src/desktop/shell/Workspace.tsx— render EditPage/ColorPage/DeliverPage instead of placeholders. - Modify
apps/web/src/components/editor/Toolbar.tsx— use the extractedexport-runner(behavior-preserving). - Tests alongside.
MILESTONE A — Functional Edit page (the usable editor)
Task 1: Reuse the editor engine/bridge bootstrap (TDD where possible)
Files: Create apps/web/src/desktop/editor/useDesktopEditorBootstrap.ts, apps/web/src/desktop/editor/EditorBootstrapGate.tsx, apps/web/src/desktop/editor/EditorBootstrapGate.test.tsx.
- Step 1: READ
apps/web/src/components/editor/EditorInterface.tsxlines ~18-184 to capture the EXACT bootstrap: isuseEngineInitializationan imported hook or defined inline? What is the precise bridge init sequence + args (the 5initialize*Bridgecalls with project width/height) and the readiness flag(s) (initialized/initializing)? Note the imports (initializeMediaBridge,initializePlaybackBridge,initializeRenderBridge,initializeEffectsBridge,initializeTransitionBridgefrombridges/, anduseEngineStore). - Step 2: Implement
useDesktopEditorBootstrap.tsreusing the SAME init path. IfuseEngineInitializationis an importable hook (not inline JSX-coupled), re-export/use it directly. Otherwise replicate its exact sequence in a new hook that returns{ ready: boolean; error: Error | null }:- call
useEngineStore.getState().initialize(); on success, in order,await initializeMediaBridge(...),initializePlaybackBridge(...),initializeRenderBridge(...),initializeEffectsBridge(width,height),initializeTransitionBridge(width,height)usinguseProjectStore.getState().project.settings.width/height; setready=true. Guard against double-init (a module-levellet startedor the engine-store's owninitializedflag). Dispose is owned by the existing web path; the desktop gate should NOT dispose on unmount of a single page (engines persist for the session) — only init-once. - Do NOT modify EditorInterface's behavior; if you extract a shared hook, EditorInterface must keep working identically (verify by running the web suite).
- call
- Step 3: Implement
EditorBootstrapGate.tsx—function EditorBootstrapGate({ children }: { children: React.ReactNode }): JSX.Elementthat calls the hook and renders a themed loading state (<div className="grid h-full place-items-center text-sm text-fg-muted bg-bg">Loading editor…</div>) untilready, an error state onerror, else<>{children}</>. - Step 4: Test
EditorBootstrapGate.test.tsx— mockuseDesktopEditorBootstrapto return{ready:false}→ asserts "Loading editor…" shown and children not;{ready:true}→ children shown. (Mock the hook module viavi.mock.) - Step 5: Verify + commit —
pnpm --filter @openreel/web typecheck && pnpm --filter @openreel/web test:run EditorBootstrapGate && pnpm --filter @openreel/web test:run(full suite green — confirms no web-editor regression if you extracted the hook).
git add apps/web/src/desktop/editor/ ; git commit -m "feat(web): desktop editor engine/bridge bootstrap gate (reuses the EditorInterface init path)"
Task 2: Project gate + Resolve-style start screen (TDD for gate + actions)
Files: Create apps/web/src/desktop/start/desktop-project-actions.ts (+ test), apps/web/src/desktop/start/DesktopStartScreen.tsx; modify apps/web/src/desktop/DesktopApp.tsx.
- Step 1: READ
components/welcome/WelcomeScreen.tsx(FORMAT_OPTIONS +handleCreateProject) andstores/project-store.tscreate/recover actions + howprojectis initially null/empty (does the store start with a project, or null untilcreateNewProject? Determine the "no project yet" condition — e.g.project == nullor a default empty project with no tracks). Also readservices/project-manager.tsgetRecentProjects()and the auto-savecheckForRecovery()to list recents. - Step 2: Implement
desktop-project-actions.ts— pure-ish helpers over the store:export interface NewProjectFormat { id: string; label: string; width: number; height: number; frameRate: number }export const DESKTOP_FORMATS: NewProjectFormat[](mirror WelcomeScreen's FORMAT_OPTIONS — vertical 1080x1920, horizontal 1920x1080, square 1080x1080, at 30fps).export function startNewProject(format: NewProjectFormat): void→useProjectStore.getState().createNewProject(format.label, { width: format.width, height: format.height, frameRate: format.frameRate }).export async function listRecentProjects(): Promise<{ id: string; name: string; savedAt: number }[]>→ fromcheckForRecovery()/projectManager (pick the canonical one used by the live RecentProjects; reuse that exact source).export async function openRecentProject(saveId: string): Promise<boolean>→useProjectStore.getState().recoverFromAutoSave(saveId).export function hasOpenProject(): boolean→ returns whether a real editable project is loaded (per the condition found in Step 1).
- Step 3: Test
desktop-project-actions.test.ts— mockuseProjectStore.getState+ the recovery source; assertstartNewProjectcallscreateNewProjectwith the right name+settings;openRecentProjectcallsrecoverFromAutoSave;DESKTOP_FORMATShas the 3 expected entries with correct dims. - Step 4: Implement
DesktopStartScreen.tsx— a charcoal/teal start surface: a header ("New Project"), theDESKTOP_FORMATSas clickable cards (onClick →startNewProject(fmt)), and a "Recent" list (fromlistRecentProjects, click →openRecentProject). Pure presentational over the actions; explicit return type; uses the existing token utilities (bg-bg,bg-bg-2,text-fg,border-border,bg-accent-soft,text-accent). - Step 5: Wire the gate in
DesktopApp.tsx— readconst hasProject = useProjectStore((s) => /* the condition */). If!hasProject, render<DesktopStartScreen/>(inside the title-bar shell); else render the existing<Workspace/>wrapped in<EditorBootstrapGate>. The title bar stays in both states. Keep the.openreel-desktoproot + ErrorBoundary. - Step 6: Test — extend
DesktopApp.test.tsx: with no project → start screen ("New Project") shown; with a project (mock the store selector) → workspace tablist shown. - Step 7: Verify + commit — typecheck +
test:run DesktopApp desktop-project-actions+ full suite.
git add apps/web/src/desktop/start/ apps/web/src/desktop/DesktopApp.tsx apps/web/src/desktop/DesktopApp.test.tsx
git commit -m "feat(web): desktop project gate + Resolve-style start screen (new project + recents)"
Task 3: Edit page — Resolve docked layout reusing the panels
Files: Create apps/web/src/desktop/pages/EditPage.tsx; modify apps/web/src/desktop/shell/Workspace.tsx.
- Step 1: Implement
EditPage.tsx— a CSS-grid docked layout underEditorBootstrapGate, re-composing the reused panels (import the real components; each is zero-prop + store-bound). Layout: Media Pool (left) · Viewer (center) · Inspector (right) on the top row; Timeline (full-width) on the bottom row. Each panel wrapped inPanelErrorBoundary(fromcomponents/ErrorBoundary). Use the desktop tokens for the dock frame (charcoal panels, 1px teal-on-hover borders, flat panel headers).
import { AssetsPanel } from "../../components/editor/AssetsPanel";
import { Preview } from "../../components/editor/Preview";
import { InspectorPanel } from "../../components/editor/InspectorPanel";
import { Timeline } from "../../components/editor/Timeline";
import { PanelErrorBoundary } from "../../components/ErrorBoundary";
// grid: "media viewer inspector" / "timeline timeline timeline"
(Confirm the exact export names/paths of Preview, Timeline, AssetsPanel, InspectorPanel, PanelErrorBoundary by reading them — match named vs default. Give the panels sensible flex/min-h-0 containers so the canvas + timeline size correctly.)
- Step 2: Wire into
Workspace.tsx— replace theeditbranch ofPagePlaceholderwith<EditPage/>. Keepcolor/deliveras placeholders for now (Milestones B/C). The Workspace is already insideEditorBootstrapGate? No — put<EditorBootstrapGate>around the page bodies in Workspace (so engines init once for the workspace), OR wrap each page. Simplest: wrap the page-body container in Workspace with<EditorBootstrapGate>so all three pages mount under initialized engines. - Step 3: Verify build + tests —
pnpm --filter @openreel/web typecheck && pnpm --filter @openreel/web test:run(full suite; the Workspace test must still pass — it asserts tablist + page testids, which remain). Thenpnpm --filter @openreel/desktop build. - Step 4: Commit
git add apps/web/src/desktop/pages/EditPage.tsx apps/web/src/desktop/shell/Workspace.tsx
git commit -m "feat(web): desktop Edit page (Resolve docked layout reusing media/viewer/timeline/inspector)"
Task 4: Run the desktop app — verify the Edit page is functional (human-in-the-loop)
Files: none (verification + parity note).
- Step 1:
pnpm --filter @openreel/desktop build && pnpm --filter @openreel/desktop start(launch). Confirm: the start screen appears; creating a project transitions into the Edit page; the Media Pool, Viewer (canvas), Timeline, and Inspector all render and the editor is interactive (import a media file, drop a clip, scrub/play, select a clip → inspector shows). This is the milestone: a usable desktop editor. - Step 2: Record outcome + any issues in
apps/desktop/test/parity.mdunder a "Phase 3 — Edit page" subsection (what works, what needs follow-up). Note that full interaction (WebGPU preview, playback, media import via native fs) is human-verified. - Step 3: Commit the parity note.
MILESTONE B — Color page
Task 5: Color page (viewer + scopes + grading)
Files: Create apps/web/src/desktop/pages/ColorPage.tsx; modify Workspace.tsx.
- Step 1: READ
inspector/ScopesPanel.tsx(props:frameImage?: ImageBitmap),inspector/ColorGradingSection.tsx(clipIdprop),bridges/render-bridge.tsrenderCurrentFrame()/renderFrame(time)(returnsRenderedFramewith an ImageBitmap), and how Preview supplies the frame. - Step 2: Implement
ColorPage.tsx— layout:Preview(viewer, reused) center/left; a right rail withScopesPanel(fed a frame fromgetRenderBridge().renderCurrentFrame()on playhead/selection change — subscribe touseTimelineStoreplayhead +getSelectedClipIds) andColorGradingSectionfor the selected clip (gate on exactly one selected clip; else a "select a clip" message). Refresh the scopeframeImagewhen the playhead or selected clip changes (a small effect callingrenderCurrentFrame()and storing the ImageBitmap in state). Charcoal/teal dock chrome. - Step 3: Wire the
colorbranch inWorkspace.tsxto<ColorPage/>. - Step 4: Verify typecheck + full suite + desktop build. Commit:
feat(web): desktop Color page (viewer + scopes + color grading).
MILESTONE C — Deliver page
Task 6: Extract the export runner (behavior-preserving refactor, TDD)
Files: Create apps/web/src/services/export-runner.ts (+ test); modify apps/web/src/components/editor/Toolbar.tsx.
- Step 1: READ
Toolbar.tsxrunExport(:211),showSavePicker(:249),handleCustomExport(:500),handleCancelExport(:488) — capture exact signatures + thegetExportEngine().exportVideo(project, settings, writableStream)async-generator loop and the desktopwindow.__openreelExportPathside-effect. - Step 2: Extract
runExport/showSavePicker(and the cancel handle) intoexport-runner.tsas standalone functions/hook with the SAME behavior (auseExportRunner()hook returning{ runExport, showSavePicker, cancel, state }, or plain functions + a small store). Keep desktop__openreelExportPathbehavior. Unit-test the pure pieces (e.g. filename/ext resolution, the generator-progress reducer) with a mocked export engine. - Step 3: Refactor
Toolbar.tsxto consumeexport-runnerinstead of its inlineuseCallbacks — behavior must be identical (web export still works). Run the full web suite to confirm no regression. - Step 4: Commit
refactor(web): extract export runner from Toolbar into shared service.
Task 7: Deliver page (export + render queue)
Files: Create apps/web/src/desktop/pages/DeliverPage.tsx; modify Workspace.tsx.
- Step 1: Implement
DeliverPage.tsx— reuseExportDialog(or its settings inline) for export options; a "Render" action that calls the extractedrunExport+showSavePicker; a render-queue list bound touseGpuJobStore.getJobsForProject(projectId)(the cloud GPU jobs), and mountuseGpuJobPoller()here (or confirm it's mounted app-root). Show export progress from the export-runner state. Charcoal/teal chrome. - Step 2: Wire the
deliverbranch inWorkspace.tsxto<DeliverPage/>. - Step 3: Verify typecheck + full suite + desktop build + launch (human: export a short project on desktop via the native FFmpeg sidecar). Commit:
feat(web): desktop Deliver page (export + GPU render queue).
Self-Review
Spec coverage (§5 Resolve UI): start surface → T2; Edit page (media·viewer·timeline·inspector) → T3 (+ bootstrap T1); Color page (scopes·wheels·viewer) → T5; Deliver page (export·render queue) → T6/T7; charcoal/teal applies via the Phase-1 token layer. Reuse model: engine-bound panels (Preview/Timeline/AssetsPanel/InspectorPanel/ScopesPanel/ColorGradingSection/ExportDialog) reused wholesale per recon; only the shell/layout/chrome + project-start + export-runner extraction are new. Web non-regression: the only web-file edits are behavior-preserving extractions (T1 bootstrap hook if extracted; T6 export-runner) — both gated by the full web suite staying green; Toolbar/EditorInterface must behave identically. Risk/verification: the layout composition + live editor interaction (WebGPU preview, playback, native import/export) are integration/visual and need the running desktop app (T4 human check) — flagged, not unit-tested. Milestone A (T1–T4) is the first shippable: a usable desktop editor. B and C follow. Placeholders: none — every task names real files/seams; the few "READ X then match the real export/condition" steps are verification instructions (the seam is identified from recon), not deferred work.
Execution Handoff
Subagent-driven (per current mode), all subagents on opus. Milestone A first (usable editor), then B, then C. Layout/interaction tasks verify via build + the running app (human) since they're not unit-testable; logic tasks (bootstrap gate, project actions, export-runner pure pieces) are TDD.