Introducing a new way to review your PRs.

Read the announcement

walterlow / freecut

FreeCut is a professional-grade video editor that runs entirely in your browser. Professional video editing, zero installation. Create stunning videos with multi-track editing, keyframe animations, real-time preview, and high-quality exports.

View on GitHub

19 documents · Updated Oct 30, 2026

docs / editor-workspace

Editor workspace

The editor workspace is the main place where an engineer or user turns project media into a finished video. It joins timeline editing, media and scene work, visual effects, animation, preview, saving, and export around one project context.

Workspace model

The workspace presents one editing surface with a shared project at its center. Each feature area changes part of the same project rather than creating a separate copy of the edit.

Editing surface

The editor opens a project route after it confirms that the project exists and reads its display metadata. It then loads the project timeline and connects the media library, preview, properties, playback, and export areas to that project. The toolbar shows the project summary and gives access to navigation, workspace modes, settings, save, render-queue, and export actions.

The main areas have clear roles:

AreaPurpose
ToolbarShows project context and edit status. It provides workspace, save, help, render-queue, and export actions.
Media sidebarProvides source media and tools for text, shapes, effects, transitions, Lottie assets, transcripts, and AI features.
PreviewShows the current program frame and supports playback, source viewing, scopes, zoom, and direct canvas editing.
Properties sidebarEdits the selected clip, transition, marker, composition, or project canvas.
TimelineOrganizes tracks and clips in time. It is the main surface for arranging and changing the edit.

The timeline editing page explains the time-based editing surface. The media and scene management page explains how source material and scenes enter this surface.

References: src/…/$projectId.tsx• L4-39 src/…/editor.tsx• L381-515 src/…/editor.tsx• L669-807 src/…/toolbar.tsx• L97-112 src/…/toolbar.tsx• L168-217

Feature area relationships

The areas stay useful because they share selection, current time, project settings, and composition context. For example, a clip selected in the timeline becomes the subject of the properties sidebar and the preview overlays. A media or scene item added from the sidebar becomes a timeline item that the preview can show.

The workspace also supports direct creation from the sidebar. Text, shapes, and adjustment layers can be added at the current playhead or dragged into the timeline. This makes the sidebar a source of editing actions, not only a browser of assets.

Effects and animation extend the same selected items through the properties sidebar. In Edit, visual clips expose media properties, Animation, and Effects as needed. In Motion, the same animation surface becomes the main authoring library. Pure text selections also get focused content and style controls, while mixed selections keep text styling with the shared Effects surface. Audio controls follow the selected media, including the linked audio companion of a video clip when that companion is hidden from the main selection.

Read effects and animation for the controls that change appearance over time. Read preview and export for the path from an edited project to a reviewed or rendered result.

References: src/…/media-sidebar.tsx• L289-320 src/…/media-sidebar.tsx• L382-517 src/…/preview-area.tsx• L180-237 src/…/index.tsx• L122-192 src/…/index.tsx• L533-613 src/…/index.tsx• L650-754

Workspace modes

Workspace modes rearrange the same editing tools for different tasks. A mode changes the visible panels and their active tabs. It does not change the project, selection, or playhead.

Edit workspace

The Edit workspace is the general cutting surface. It keeps the media sidebar, program preview, properties sidebar, and standard timeline together so users can assemble scenes, trim clips, add layers, and review the result without changing context.

It is the default mode and is the best starting point for most project work. Its sidebar can expose media, text, shapes, effects, transitions, Lottie assets, transcripts, and AI tools as needed.

References: src/…/editor-workspaces.ts• L10-37 src/…/editor.tsx• L725-797 src/…/media-sidebar.tsx• L536-546

Color workspace

The Color workspace focuses the surface on grading. It gives the preview more room for color work, opens the color scopes area by default, and gives the properties column enough space for grading controls. The timeline remains available for finding and navigating clips.

Color work stays tied to the selected project material. A user can return to Edit without losing the current project state.

References: src/…/editor-workspaces.ts• L31-64 src/…/editor.tsx• L662-724 src/…/preview-area.tsx• L316-365

Motion workspace

The Motion workspace focuses on layered compositions and animation. A composition is a separately navigable scene with its own canvas settings and duration. Motion replaces the normal timeline surface with a composition timeline while retaining the shared preview and sidebars.

Motion shows an empty state until the project timeline is hydrated and a valid 2D composition is active. This keeps editorial items out of the composition context during project startup. When the user leaves Motion, the workspace restores the exact editorial sequence that was active before entry.

References: src/…/editor-workspaces.ts• L46-64 src/…/editor.tsx• L665-800 src/…/compose-layout.tsx• L48-127 src/…/compose-layout.tsx• L130-223

State coordination

The editor coordinates several kinds of state around one project session. Persistent project data describes the edit. Shared editor state describes the current surface. Playback and selection state connect user actions across panels.

Project session state

When a project opens, the editor sets the current project for the media and properties areas, loads the timeline, and clears transient preview state from an earlier session. When the user leaves, it clears the project context, pauses playback, and releases preview resources.

Timeline changes mark the project as dirty. Explicit save writes the current timeline state. Optional auto-save runs only when there are unsaved changes and avoids interrupting an active edit when possible.

The project route passes only the metadata needed to start the editor. The editor loads the larger timeline state after the surface is ready. This keeps project validation separate from timeline loading.

References: src/…/editor.tsx• L458-538 src/…/editor.tsx• L586-607 src/…/use-auto-save.ts• L18-77 src/…/$projectId.tsx• L9-39

Layout and workspace state

Shared editor state tracks panel visibility, active sidebar and inspector tabs, workspace mode, panel widths, preview side panels, and other cross-area controls. Workspace changes save the outgoing layout and restore the incoming layout. Invalid saved values fall back to a safe mode preset.

Users can collapse or expand the sidebars, move them between the preview column and a full-height column, and resize the main timeline split. The timeline split is remembered separately for each workspace and stays within the active layout limits. These choices shape the current editing view without changing the project content.

References: src/…/types.ts• L11-40 src/…/store.ts• L52-79 src/…/store.ts• L122-211 src/…/editor.tsx• L544-573 src/…/editor-workspaces.ts• L23-29

Selection and interaction state

Selection gives the panels a common subject. The properties sidebar chooses its content from the selected clip, transition, marker, or active motion composition. Its tabs follow the selected item types and the current workspace, so a new selection appears at once and an old tab falls back to the first valid surface. The preview uses the same context to show the right frame and editing overlays.

Text editing supports both a single text value and structured text spans. A plain selection uses one text field. A structured selection exposes separate span fields with shared style defaults, so a user can change one part without changing the other. These controls update the selected timeline items together when the selection contains more than one text clip.

Some direct-edit tools temporarily own interaction with the editor. During mask or path editing, surrounding controls are locked so a pointer or keyboard action cannot change an unrelated panel. Workspace changes also pause playback and clear transient preview frames before the new surface appears.

References: src/…/index.tsx• L140-192 src/…/index.tsx• L336-377 src/…/index.tsx• L127-171 src/…/index.tsx• L544-579 src/…/text-content-controls.tsx• L24-95 src/…/text-content-controls.tsx• L97-245 src/…/editor.tsx• L544-588 src/…/editor.tsx• L679-795

User workflows

The workspace supports a loop from project open to edit, review, save, and delivery. The same timeline and composition context moves through each stage.

Project opening and editing

When a user opens a project, the editor validates the project, checks whether its stored schema needs an upgrade, and loads its metadata and timeline. A legacy project gets a best-effort backup before the editor continues with the upgrade.

The normal editing flow follows these steps:

  1. Choose media or a scene in the sidebar.
  2. Add it to the timeline or create a generated layer at the playhead.
  3. Arrange and trim the result in the timeline.
  4. Select an item to change its properties, audio, effects, animation, or text content.
  5. Review the result in the preview and move to another workspace when a task needs a different surface.

The inspector adapts to the selection rather than asking the user to open a separate editor. A text clip can switch between plain or structured content, apply a text style, and edit span-level typography. A visual clip can open the compact animation surface in Edit or the full animation surface in Motion. This keeps creation, arrangement, and refinement on the same selected timeline item.

This diagram shows how the main user actions share one project state.

flowchart LR
    Open[Open project] --> Load[Load project and timeline]
    Load --> Choose[Choose media or scene]
    Choose --> Arrange[Arrange and trim timeline]
    Arrange --> Inspect[Inspect selected item]
    Inspect --> Preview[Review in preview]
    Preview --> Refine[Refine edit, color, or motion]
    Refine --> Save[Save project]
    Save --> Export[Export video or project bundle]

References: src/…/$projectId.tsx• L9-39 src/…/editor.tsx• L204-291 src/…/editor.tsx• L458-515 src/…/media-sidebar.tsx• L382-517 src/…/index.tsx• L624-754 src/…/text-content-controls.tsx• L34-95 src/…/text-content-controls.tsx• L114-245

Generated audio

The text-to-speech dialog is a creation path for project audio. It uses the active project and optional source item context, lets the user choose a supported speech engine and voice, and can generate a result for preview before inserting it into the project media.

The dialog reports unsupported engines, progress, errors, and insertion state as part of the same workflow. It remembers the chosen engine for later sessions and releases an uninserted generated result when the dialog closes.

References: src/…/editor.tsx• L299-337 src/…/tts-generate-dialog.tsx• L47-139 src/…/tts-generate-dialog.tsx• L167-228

Review and refinement

The preview is both a review monitor and an editing surface. Playback controls move through the project. The source monitor can show source media beside the program view. Color scopes can sit beside the program view in the Color workspace.

Direct canvas tools support visual work such as transforms, masks, and path editing. While one of these tools is active, the workspace gives it control of the relevant interaction area and shows task-specific controls so the user can finish or cancel the operation.

References: src/…/preview-area.tsx• L509-580 src/…/preview-area.tsx• L582-720 src/…/preview-area.tsx• L724-747

Save and delivery

Save is an explicit project action and can also run on a configured interval. The toolbar shows when the timeline has unsaved changes and summarizes project duration, clips, media, and broken media. Export pauses playback before opening the export flow. The render queue shows queued and active render jobs while users continue to use the editor. The export menu also supports downloading a project bundle.

The preview and export page describes the review controls, render queue, and handoff to composition rendering in more detail.

References: src/…/toolbar.tsx• L97-112 src/…/toolbar.tsx• L316-371 src/…/editor.tsx• L609-654 src/…/editor.tsx• L812-849

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to workspace presets must keep the workspace switcher, layout restoration, timeline split, and mode-specific surfaces in agreement.
  • Changes to project opening must preserve the order between route validation, migration approval, media context setup, and timeline loading.
  • Changes to selection or active composition state must keep the preview and properties sidebar aligned with the timeline subject.
  • Changes to clip inspector tabs must keep item-type filtering, workspace-specific Animation behavior, linked audio selection, and remembered-tab fallback aligned.
  • Changes to text editing must keep plain text, structured spans, style presets, and multi-selection updates consistent across the content and Effects surfaces.
  • Changes to direct canvas editing must preserve the interaction lock so keyboard and pointer input cannot reach unrelated editor areas.
  • Changes to save or export entry points must preserve the dirty-project warning and the handoff between save, render queue, and export dialogs.
  • Changes to generated audio must keep the project media context, engine support state, result preview, and insertion path aligned.
  • Changes to panel sizing must keep saved widths and workspace-specific timeline splits within the active layout limits.

Important failure modes

TriggerConsequenceGuard
The requested project does not existThe editor cannot start a valid project sessionThe route checks the project before rendering the editor and raises a project-not-found error.
A legacy project needs an upgradeThe editor must not expose an incomplete project while its stored data changesThe editor creates a per-project backup before approving the upgrade and reports backup failure to the user.
The user leaves with unsaved timeline changesRecent edits may be lost if the user navigates awayThe toolbar opens an unsaved-changes decision before returning to the project list.
A workspace switch carries an old preview frame or active clockThe new preview can show stale content or advance during surface setupWorkspace changes pause playback and clear transient preview frames.
Motion opens before the main timeline or composition context is readyEditorial items can appear in the wrong composition contextMotion waits for timeline hydration and an active 2D composition before mounting its timeline.
A saved workspace layout contains an unknown tab or valueThe workspace can open with a broken or unusable panel stateLayout values are checked and replaced field by field with the active preset.
A selected clip no longer supports the remembered inspector tabThe properties sidebar can show the wrong or empty editing surfaceAvailable tabs are derived from the selection and the active workspace, then the active tab falls back to a valid surface.
A text selection mixes plain and structured contentA single edit can hide the difference between shared text and span-specific textThe inspector uses a mixed placeholder for differing plain text and separate editors for structured spans.
A selected text-to-speech engine is not supportedAudio generation cannot startThe dialog shows an unsupported-engine notice and keeps generation state tied to engine support.
A mask or path edit receives input from another panelA keyboard or pointer action can change unrelated editor stateInteraction lock regions block surrounding controls while direct canvas editing is active.

Key files

FileWhy to read it
src/…/editor.tsxPrimary editor shell. It connects project loading, the feature areas, workspace-specific surfaces, save, dialogs, and the render queue.
src/…/$projectId.tsxDefines the project entry boundary and the metadata and migration information supplied to the editor.
src/…/editor-workspaces.tsDefines the supported workspace modes and the layout each mode starts with.
src/…/store.tsShows how workspace changes, panel state, and user layout preferences stay coordinated.
src/…/toolbar.tsxShows the user-facing project summary, navigation, workspace switching, saving, render queue, and export actions.
src/…/media-sidebar.tsxShows how media and creation tools feed editing actions.
src/…/preview-area.tsxShows how program preview, source viewing, scopes, playback, and direct canvas controls meet.
src/…/index.tsxShows how the selected timeline subject determines the editing controls.
src/…/index.tsxShows how selected clip types and workspace mode shape the Properties, Audio, Animation, and Effects surfaces.
src/…/text-content-controls.tsxShows the user-facing controls for single text, structured text spans, and text style presets.
src/…/compose-layout.tsxShows the Motion workspace boundary, composition readiness, and return to the editorial sequence.
src/…/tts-generate-dialog.tsxShows how generated speech becomes previewable project audio and how engine support affects that flow.
src/…/use-auto-save.tsShows the conditions under which unsaved work is saved in the background.