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(); diff --git a/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx b/apps/desktop/src/routes/editor/Timeline/CaptionsTrack.tsx index c7f67ca76a..9093e24e4f 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; @@ -157,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 ( { 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..9cefb84bfe 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; @@ -149,7 +153,8 @@ export function KeyboardTrack(props: { return indices.has(i()); }); - const segmentWidth = () => segment.end - segment.start; + const segmentWidth = () => + Math.min(segment.end, totalDuration()) - segment.start; return ( { e.stopPropagation(); if (editorState.timeline.interactMode === "split") {