From 7830918d1c73a3463e98a58ba2863c95dd2caf19 Mon Sep 17 00:00:00 2001 From: Minit Date: Fri, 10 Apr 2026 13:12:55 +0530 Subject: [PATCH 1/5] fix(editor): clamp captions and hide keyboard segments past trim boundary Closes #1725 Related to #1689 Co-Authored-By: Claude Sonnet 4.6 --- apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx | 8 ++++++-- apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx b/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx index c7f67ca76a..9743f62175 100644 --- a/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx +++ b/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx @@ -34,7 +34,11 @@ export function CaptionsTrack(props: { const minDuration = () => Math.max(MIN_SEGMENT_SECS, secsPerPixel() * MIN_SEGMENT_PIXELS); - const captionSegments = () => project.timeline?.captionSegments ?? []; + const captionSegments = createMemo(() => + (project.timeline?.captionSegments ?? []).filter( + (s) => s.start < totalDuration(), + ), + ); const selectedCaptionIndices = createMemo(() => { const selection = editorState.timeline.selection; if (!selection || selection.type !== "caption") return null; @@ -169,7 +173,7 @@ export function CaptionsTrack(props: { isSelected() ? "border-green-7" : "border-transparent", )} innerClass="ring-green-6" - segment={segment} + segment={{ start: segment.start, end: Math.min(segment.end, totalDuration()) }} onMouseDown={(e) => { e.stopPropagation(); if (editorState.timeline.interactMode === "split") { diff --git a/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx b/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx index 52c3d6feb2..b61b02ecc1 100644 --- a/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx +++ b/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx @@ -32,7 +32,11 @@ export function KeyboardTrack(props: { const minDuration = () => Math.max(MIN_SEGMENT_SECS, secsPerPixel() * MIN_SEGMENT_PIXELS); - const keyboardSegments = () => project.timeline?.keyboardSegments ?? []; + const keyboardSegments = createMemo(() => + (project.timeline?.keyboardSegments ?? []).filter( + (s) => s.start < totalDuration(), + ), + ); const selectedKeyboardIndices = createMemo(() => { const selection = editorState.timeline.selection; if (!selection || selection.type !== "keyboard") return null; From 05fdaaa73034ed8d2e74a5c9299cdd87618d95ec Mon Sep 17 00:00:00 2001 From: Minit Date: Fri, 10 Apr 2026 13:25:59 +0530 Subject: [PATCH 2/5] fix(editor): clamp keyboard segments at trim boundary Co-Authored-By: Claude Sonnet 4.6 --- apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx b/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx index b61b02ecc1..3b1d44c5f9 100644 --- a/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx +++ b/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx @@ -165,7 +165,7 @@ export function KeyboardTrack(props: { isSelected() ? "border-sky-7" : "border-transparent", )} innerClass="ring-sky-6" - segment={segment} + segment={{ start: segment.start, end: Math.min(segment.end, totalDuration()) }} onMouseDown={(e) => { e.stopPropagation(); if (editorState.timeline.interactMode === "split") { From 57384e3709103aa0c9a8f3ac758dbd22d0e56bf8 Mon Sep 17 00:00:00 2001 From: Minit Date: Sat, 11 Apr 2026 00:07:57 +0530 Subject: [PATCH 3/5] fix(editor): fix Biome formatting for segment prop objects Co-Authored-By: Claude Sonnet 4.6 --- apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx | 5 ++++- apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx b/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx index 9743f62175..33a746f431 100644 --- a/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx +++ b/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx @@ -173,7 +173,10 @@ export function CaptionsTrack(props: { isSelected() ? "border-green-7" : "border-transparent", )} innerClass="ring-green-6" - segment={{ start: segment.start, end: Math.min(segment.end, totalDuration()) }} + segment={{ + start: segment.start, + end: Math.min(segment.end, totalDuration()), + }} onMouseDown={(e) => { e.stopPropagation(); if (editorState.timeline.interactMode === "split") { diff --git a/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx b/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx index 3b1d44c5f9..07a0a57d63 100644 --- a/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx +++ b/apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx @@ -165,7 +165,10 @@ export function KeyboardTrack(props: { isSelected() ? "border-sky-7" : "border-transparent", )} innerClass="ring-sky-6" - segment={{ start: segment.start, end: Math.min(segment.end, totalDuration()) }} + segment={{ + start: segment.start, + end: Math.min(segment.end, totalDuration()), + }} onMouseDown={(e) => { e.stopPropagation(); if (editorState.timeline.interactMode === "split") { From d33631fe8c8cc119fd56b6ad7ccc16792b9672dc Mon Sep 17 00:00:00 2001 From: Minit Date: Fri, 10 Apr 2026 01:08:39 +0530 Subject: [PATCH 4/5] fix(desktop): bypass TCC permission check for screen recording and accessibility in debug builds On macOS Sequoia, CGPreflightScreenCaptureAccess() always returns false for ad-hoc signed or unsigned binaries regardless of System Settings, making it impossible to test locally without a Developer ID certificate. Adding a debug_assertions early return for ScreenRecording and Accessibility allows contributors to run and test the app locally without being blocked by the permissions screen. Camera and microphone are unaffected as they prompt correctly without a signed binary. Fixes #1722 Co-Authored-By: Claude Sonnet 4.6 --- apps/desktop/src-tauri/src/permissions.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/desktop/src-tauri/src/permissions.rs b/apps/desktop/src-tauri/src/permissions.rs index 17b9e7153e..345946d40c 100644 --- a/apps/desktop/src-tauri/src/permissions.rs +++ b/apps/desktop/src-tauri/src/permissions.rs @@ -156,6 +156,14 @@ pub(crate) fn sync_macos_dock_visibility(app: &tauri::AppHandle) { #[cfg(target_os = "macos")] fn macos_permission_status(permission: &OSPermission, initial_check: bool) -> OSPermissionStatus { + #[cfg(debug_assertions)] + if matches!( + permission, + OSPermission::ScreenRecording | OSPermission::Accessibility + ) { + return OSPermissionStatus::Granted; + } + match permission { OSPermission::ScreenRecording => { let granted = scap_screencapturekit::has_permission(); From eea21a5fc17cbb7fbf9229d020606010bd5c7813 Mon Sep 17 00:00:00 2001 From: Minit Date: Sun, 12 Apr 2026 01:36:26 +0530 Subject: [PATCH 5/5] fix(editor): fix split-mode click position on clamped caption and keyboard segments segmentWidth used the original unclamped segment.end while SegmentRoot rendered the clamped visual width, causing split clicks to land at wrong positions for segments crossing the trim boundary. Co-Authored-By: Claude Sonnet 4.6 --- apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx | 3 ++- apps/desktop/src/routes/editor/Timeline/KeyboardTrack.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx b/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx index 33a746f431..9093e24e4f 100644 --- a/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx +++ b/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx @@ -161,7 +161,8 @@ export function CaptionsTrack(props: { return indices.has(i()); }); - const segmentWidth = () => segment.end - segment.start; + const segmentWidth = () => + Math.min(segment.end, totalDuration()) - segment.start; return ( segment.end - segment.start; + const segmentWidth = () => + Math.min(segment.end, totalDuration()) - segment.start; return (