Commit Graph
30 Commits
Author SHA1 Message Date
webadderall 8a01fcdd6e Assert thumbnail readiness waits for decoding 2026-10-03 13:10:53 +10:00
webadderall cdd64d5fe1 Generate safe thumbnails in background and recover failed close saves 2026-10-03 12:31:46 +10:00
webadderall fc2cbeaeb6 Show Home loading states and save project edits automatically 2026-10-03 10:20:17 +10:00
webadderall 163e34962a Fix generated project previews rejected by outdated size validation 2026-09-23 11:52:21 +10:00
webadderall b7997e902b Address validated CodeRabbit findings for project saves and HUD lifecycle 2026-09-23 11:23:49 +10:00
webadderall e3f4339105 Add muted project hover previews and hide presets button 2026-09-22 20:15:15 +10:00
webadderall 9049a82b84 Add project dashboard and Raw library with consistent Solar UI 2026-09-22 19:48:30 +10:00
young af968551f1 Record selected windows by cropping full-screen captures 2026-09-04 19:48:22 +10:00
young 4fcf2deaa7 Apply consistent project formatting 2026-08-28 09:54:42 +10:00
wiiiii123 f3d8506544 fix(project): address atomic save review feedback 2026-07-11 10:46:33 +07:00
wiiiii123 4ade9d8e16 fix(project): make project saves atomic 2026-07-10 13:10:26 +07:00
webadderall 6e7342d16c fix(projects): tighten import and document project files 2026-06-15 13:43:08 +10:00
Alan Trebugeais 0119e624b2 add manager tests 2026-05-09 19:30:40 +02:00
Alan Trebugeais a55e57afa7 fix: audioRegions are now allowed (reloading a project with a user audio would not work. 2026-05-09 19:24:07 +02:00
wiiiii123 93e1312978 merge main into beta/pr410-native-gpu-export-test
# Conflicts:
#	electron/ipc/project/manager.ts
#	electron/ipc/register/export.ts
#	src/lib/exporter/modernVideoExporter.ts
2026-05-08 10:44:13 +07:00
webadderall 0990ed7a09 Clarify local file read and media allowlist intent 2026-05-08 12:30:26 +10:00
Recordly Reviewer 2d4d96bc4a fix: address PR review feedback - canonicalize via realpath and gate whisper soft-fail
isAllowedLocalReadPath now resolves the candidate via fs.realpathSync and requires both the lexical and canonical paths to satisfy the policy, so a symlink placed under an allowed prefix that points outside the allowlist is rejected. The redundant 'either resolved or realResolved is allowed' check in read-local-file and generate-wallpaper-thumbnail is removed since the function canonicalizes internally. Adds a regression test that creates such a symlink (skipping when Windows refuses to create it without Developer Mode).

build-whisper-runtime now only soft-fails when invoked from postinstall, in CI, or with WHISPER_RUNTIME_ALLOW_MISSING=1. Direct 'npm run build*' invocations fail loudly when CMake is missing and no bundled runtime is staged so we don't ship release builds with broken auto-captioning.
2026-05-04 14:31:09 -04:00
Recordly Reviewer c767d3a28b fix: tighten local read allowlist and gracefully skip whisper-runtime build without CMake
isAllowedLocalReadPath previously returned true for any existing path because of an existsSync fast-path, which made the read-local-file IPC handler and the local media URL policy effectively allow reading arbitrary files on disk. Drop the existsSync bypass so only paths under app-managed directories or paths that have been explicitly approved (via dialogs, exports, recording sessions, etc.) are accepted. Adjust the local media path policy tests to cover the new behaviour.

Also make build-whisper-runtime fall back to bundled artifacts when CMake is missing (mirroring build-windows-capture) so npm ci does not fail on machines without a C++ toolchain.
2026-05-04 14:21:49 -04:00
wiiiii123 05327a12ce Add native GPU static layout export path 2026-05-03 22:43:23 +07:00
webadderall a9615c486e Improve project autosave and media path handling 2026-04-27 20:07:32 +10:00
wiiiii123 2a566a16ca fix(media): restrict loopback approvals to supported files 2026-04-21 19:15:02 +07:00
wiiiii123 326f56840e fix(media): approve loopback video paths when minting URLs 2026-04-21 19:00:29 +07:00
wiiiii123 1449267ba2 test(export): tighten media path regression coverage 2026-04-19 23:44:10 +07:00
wiiiii123 bddabaf1fb fix(export): reopen saved videos and default to source quality 2026-04-19 21:42:06 +07:00
webadderall e55923880f fix: clean up ipc edge cases 2026-04-17 21:25:13 +10:00
webadderall 28dd8bffae fix: address ipc review follow-ups 2026-04-17 21:11:58 +10:00
webadderall d71747b315 fix: revert overly strict isAllowedLocalReadPath to OR logic
The AND gate broke access to user-selected files outside the allowlist
(wallpapers, user videos, etc). Keep isPathInsideDirectory normalization fix,
revert the existsSync AND guard back to the original OR behavior.
2026-04-17 20:56:50 +10:00
webadderall 10c86f40b6 fix: address CodeRabbit review feedback
- Remove dead helperExists local in recording/windows.ts
- Hoist fs/promises import out of close handler in recording/ffmpeg.ts
- Guard fs.readdir with mkdir in recording/prune.ts (ENOENT resilience)
- Derive companion audio suffixes from COMPANION_AUDIO_LAYOUTS in prune.ts
- Guard mousemove hook registration to Linux only in cursor/interaction.ts
- Replace dynamic require('electron') with static import in cursor/monitor.ts
- Wrap nodeRequire in try/catch in ffmpeg/binary.ts for fallback safety
- Fix hardcoded timeOffsetMs: 0 in project/session.ts (use normalizer)
- Fix isPathInsideDirectory to normalize candidatePath in project/manager.ts
- Fix isAllowedLocalReadPath security: require path to be in allowlist (AND not OR)
- Derive extension regex from constants in project/manager.ts
- Consolidate duplicate Duration parsers in recording/diagnostics.ts
- Refactor ensureReadableFile to use options object instead of description string
- Make swiftc compilation async (execFile) in paths/binaries.ts
- Add socket timeout to httpsGet in captions/whisper.ts
2026-04-17 20:35:08 +10:00
webadderall 8bef9ac050 refactor: extract registerIpcHandlers into 8 focused register/ modules
handlers.ts reduced from 2930 → 65 lines (pure delegation).

New files under electron/ipc/register/:
- sources.ts    — get-sources, select-source, show-source-highlight, open-source-selector
- recording.ts  — start/stop/pause native + ffmpeg, mux, store, set-recording-state, get-cursor-telemetry
- permissions.ts — accessibility/screen permissions, open-external-url
- assets.ts     — wallpaper thumbnails, asset-base-path, list-asset-dir, read-local-file
- export.ts     — native-video-export-*, save-exported-video
- captions.ts   — whisper model, file pickers, generate-auto-captions
- project.ts    — project files, recordings dir, video/session state, delete-recording
- settings.ts   — shortcuts, recording prefs, countdown, platform info

Also moved shared helpers:
- getMacPrivacySettingsUrl, approveUserPath → utils.ts
- isTrustedProjectPath → project/manager.ts
2026-04-17 20:13:47 +10:00
webadderall d9f40571a6 refactor: split handlers.ts into focused sub-modules
handlers.ts was ~5967 lines. Extracted into 22 focused modules:

- ipc/types.ts — shared TypeScript interfaces and types
- ipc/constants.ts — module-level constants
- ipc/state.ts — all mutable state with typed setters
- ipc/utils.ts — shared low-level utilities (getScreen, normalizePath, etc.)
- ipc/ffmpeg/binary.ts — ffmpeg binary resolution
- ipc/ffmpeg/filters.ts — audio sync/filter builders
- ipc/captions/parser.ts — SRT/Whisper JSON parsers
- ipc/captions/whisper.ts — Whisper model download/status
- ipc/captions/generate.ts — auto-caption generation
- ipc/paths/binaries.ts — native binary path resolution
- ipc/cursor/monitor.ts — cursor monitor process management
- ipc/cursor/telemetry.ts — cursor sampling and telemetry
- ipc/cursor/bounds.ts — window bounds capture and resolution
- ipc/cursor/interaction.ts — mouse hook and interaction capture
- ipc/recording/events.ts — recording lifecycle events
- ipc/recording/diagnostics.ts — media validation and diagnostics
- ipc/recording/prune.ts — auto-recording cleanup
- ipc/recording/ffmpeg.ts — FFmpeg screen capture
- ipc/recording/windows.ts — Windows native capture (WGC)
- ipc/recording/mac.ts — Mac ScreenCaptureKit integration
- ipc/export/native-video.ts — native video export sessions
- ipc/project/session.ts — recording session manifests
- ipc/project/manager.ts — project library and file management

handlers.ts reduced from 5967 → 2930 lines (registerIpcHandlers + helpers only)
2026-04-17 19:57:26 +10:00