feat: Split View scene + timeline trim indicator
Introduces support for a new "Split View" mode for scene segments in the editor, enabling more flexible layouts for camera and screen recordings. Also implements a new trimming indicator for the screen timeline element.
Split View demo: https://cap.link/8y9hwvyfcrpfpqf
Timeline trim indicator demo: https://cap.link/tszstaqa5vc5n9q
Summary by CodeRabbit
-
New Features
- Split View scene mode: fullscreen or side-by-side with side selection, draggable camera/screen position controls, zoom sliders, per-corner rounded corners, and “Copy settings from original.”
- Segment actions: duplicate, duplicate-with-checks, delete, and Done.
- New shadow rendering layer and split-view rendering path.
-
Improvements
- Timeline start-trim live preview overlay.
- Updated scene icons/labels.
-
Bug Fixes
- More resilient timeline zoom/preview time handling.
[!IMPORTANT]
Review skipped
More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.
111 files out of 296 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.
You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Walkthrough
Adds a new "Split View" scene mode across UI, types, timeline logic, and rendering. Extracts SceneSegmentConfig into its own component; introduces split-view settings, duplication/copy actions, start-resize preview, new rendering layers/uniforms (including ShadowLayer and rounding_mask), and corresponding Rust types and shader updates.
Changes
| Cohort / File(s) | Summary |
|---|---|
Editor config & componentapps/desktop/src/routes/editor/ConfigSidebar.tsx, apps/desktop/src/routes/editor/SceneSegmentConfig.tsx |
Extracts SceneSegmentConfig into a new file; adds UI for scene mode including Split View with position/zoom/fullscreen controls; supports Done/duplicate/delete/copy-from-original actions. |
Timeline UIapps/desktop/src/routes/editor/Timeline/ClipTrack.tsx, apps/desktop/src/routes/editor/Timeline/SceneTrack.tsx |
ClipTrack: adds start-resize preview state, visual overlay, constrained preview computation, and delayed commit on mouseup. SceneTrack: recognizes splitView mode (icon/label). |
Editor context actionsapps/desktop/src/routes/editor/context.ts |
Adds projectActions: duplicateSceneSegment(segmentIndex) and copySceneSettingsFromOriginal(segmentIndex); initializes local meta to null. |
Shared types (Tauri)apps/desktop/src/utils/tauri.ts |
Adds SplitViewSettings, SplitViewSide, extends SceneMode with splitView, and adds optional splitViewSettings to SceneSegment. |
Project configuration (Rust)crates/project/src/configuration.rs |
Adds SplitView variant to SceneMode, SplitViewSettings struct, SplitViewSide enum, and optional split_view_settings on SceneSegment (serde-configured). |
Rendering: uniforms & shadercrates/rendering/src/composite_frame.rs, crates/rendering/src/shaders/composite-video-frame.wgsl |
Adds rounding_mask field to uniforms (reduces padding); WGSL updated to support per-corner rounding via bitmask and new uniform. |
Rendering: layers & integrationcrates/rendering/src/layers/mod.rs, crates/rendering/src/layers/shadow.rs, crates/rendering/src/lib.rs, crates/rendering/src/scene.rs |
Introduces ShadowLayer (new module & re-export); integrates split-view camera/display/shadow uniforms and layers into render flow; adds split-view transition/opacities and scene helpers. |
UI typingspackages/ui-solid/src/auto-imports.d.ts |
Adds IconLucideAlignLeft / IconLucideAlignRight and normalizes import quote styles. |
Sequence Diagram(s)
sequenceDiagram
autonumber
actor User
participant UI as SceneSegmentConfig (UI)
participant Ctx as EditorContext
participant State as Project State
User->>UI: Open segment config
UI->>State: Read segment + splitViewSettings
User->>UI: Change mode → Split View
UI->>State: setProject: segment.mode = "splitView"
User->>UI: Adjust split view settings
UI->>Ctx: setProject / projectActions update splitViewSettings
User->>UI: Copy settings from original
UI->>Ctx: projectActions.copySceneSettingsFromOriginal(idx)
Ctx->>State: Apply settings if source found
sequenceDiagram
autonumber
participant TL as ClipTrack UI
participant Ctx as EditorContext
participant State as Project State
User->>TL: Mousedown on start handle
TL->>TL: Compute constrained previewStart
TL->>TL: Show preview overlay
User-->>TL: Mouseup
TL->>Ctx: Commit start = previewStart
Ctx->>State: setProject: update segment.start
TL->>TL: Clear preview overlay
sequenceDiagram
autonumber
participant R as Renderer
participant S as InterpolatedScene
participant L as Layers (Display/Camera/Shadow)
participant U as Uniforms
R->>S: Query mode/transition
S-->>R: is_split_view / transition opacities
R->>U: Build split_view_* uniforms (positions, zooms, rounding_mask)
R->>L: prepare(split_view_display/camera/shadow)
alt Split View fullscreen
R->>L: Render split_view_* only
else Split View divided or transition
R->>L: Render background + regular (adjusted opacity)
R->>L: Render split_view_shadow/display/camera
end
Estimated code review effort
🎯 5 (Critical) | ⏱️ ~120 minutes
Possibly related PRs
- CapSoftware/Cap#948 — Builds on the scene-segments refactor and extends SceneSegment, editor UI, and shared types with split-view-related changes.
Suggested reviewers
- Brendonovich
Poem
I hopped between two panes today,
Two cameras in a playful fray.
Shadows rounded, corners neat,
Clips duplicate with quickened feet.
A little rabbit cheers the view—split and sweet. 🐇✨
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title Check | ✅ Passed | The title clearly and concisely describes the two main features introduced—Split View scene support and the timeline trim indicator—without unnecessary noise and follows a conventional commit style, making it easy to understand the purpose of the pull request. |
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.