Commit Graph
878 Commits
Author SHA1 Message Date
webadderall 41249a9a19 refactor: remove redundant Linux platform guard in GPU config 2026-04-18 22:05:05 +10:00
webadderall d4a7c863e8 fix: Linux GPU fallback and HUD window show safety net
- Add Linux GPU config: use EGL (better Wayland compat), disable VAAPI
  video decoder/encoder (many distros ship broken drivers causing
  'vaInitialize failed' and preventing renderer from loading)
- Add ready-to-show fallback for HUD window: if did-finish-load never
  fires (GPU failure), show the window after 500ms via ready-to-show

Ref #261
2026-04-18 21:32:18 +10:00
webadderall 20231fbd71 Merge pull request #263 from webadderall/fix/remove-extension-sources-fix-lucide
fix: remove extension-sources, replace lucide-react with phosphor icons
2026-04-18 21:29:58 +10:00
webadderall 9b6744a85c fix: remove extension-sources, replace lucide-react with phosphor icons
- Remove extension-sources/ directory (91MB of bundled extension assets)
- Add extension-sources/ to .gitignore
- Replace all lucide-react imports with @phosphor-icons/react equivalents
  in TutorialHelp, ExtensionManager, and TimelineEditor
- Fixes #261 (missing lucide-react dependency + Twitter icon crash)

Closes #261
2026-04-18 21:18:12 +10:00
webadderall c1a070ce3b Merge pull request #259 from webadderall/fix/audio-desync-cursor-telemetry
fix: audio desync and cursor telemetry under CPU load
2026-04-18 19:13:04 +10:00
webadderall 8f3a62d811 fix: check both realpath and resolve forms in media URL handler, extract sync constants
- IPC get-local-media-url now checks both fs.realpath and path.resolve forms
  against approvedLocalReadPaths, so symlinks approved via approveUserPath work
- Extract duplicated sync correction parameters into shared constants in
  audioEncoder.ts (SYNC_SEEK_THRESHOLD_SEC, SYNC_PLAYBACK_RATE_OPTIONS)
2026-04-18 19:11:01 +10:00
webadderall dec004eddd fix: use drift-compensating scheduler in recording handler, fix media URL consistency
- Replace setInterval in recording handler with startCursorSampling() so
  the drift-compensating scheduler is used for actual recordings (was missed)
- Pass realpath-resolved path to buildMediaUrl for symlink consistency
- Use resolvedWebcamVideoUrl in thumbnail/export configs with file:// fallback
2026-04-18 19:03:36 +10:00
webadderall ffc5959994 fix: address CodeRabbit review feedback
- Fix telemetry drift reset: use nextExpectedMs - now for delay instead
  of stale drift value after baseline reset (avoids 1ms rapid sample)
- Use RECORDER_TIMESLICE_MS for mic fallback recorder (was hardcoded 1000)
- Return requested timeMs in extensionHost getCursorAt boundary clamps
- Remove premature null of webcam URL to prevent flicker on path change
- Use fs.realpath in IPC get-local-media-url to match media server check
2026-04-18 19:03:36 +10:00
webadderall 9100899adb fix: improve cursor telemetry accuracy under CPU load
- Replace setInterval with drift-compensating recursive setTimeout for
  cursor sampling. Under CPU load setInterval bunches or skips callbacks,
  creating irregular gaps in telemetry data.
- Add binary search + linear interpolation to export cursor lookup
  (modernFrameRenderer) matching the playback path. Was using O(n)
  nearest-neighbor which caused visible cursor jumping in exports.
- Apply same interpolation fix to extension API getCursorAt().
2026-04-18 19:03:36 +10:00
webadderall f024c89890 fix: always apply aresample sync filter and tighten audio sync tolerances
- Always route audio through aresample=async=1:first_pts=0 filter during
  muxing on both macOS and Windows, even when duration delta is small.
  Previously skipped when delta ≤50ms, which left progressive clock drift
  (from CPU load) completely uncorrected.
- Lower sync detection threshold from 50ms to 20ms so tempo correction
  kicks in earlier.
- Use explicit 48kHz AudioContext sample rate in both browser recording
  and export rendering to prevent sample rate mismatch drift.
- Reduce MediaRecorder timeslice from 1000ms to 250ms to reduce chunk
  loss under CPU pressure.
- Tighten export audio sync: seek threshold 300ms→150ms, tolerance
  15ms→8ms, correction window 2s→0.5s, max adjustment ±8%→±12%.
- Lower companion audio start delay threshold from 50ms to 25ms.
2026-04-18 19:03:36 +10:00
webadderall 944d4f8031 Merge pull request #258 from webadderall/feat/light-mode
feat: add light mode theme support
2026-04-18 17:34:29 +10:00
webadderall 29d1b7170c Merge pull request #257 from webadderall/fix/video-loading-windows
fix: serve video files via local HTTP server to fix loading on Windows
2026-04-18 17:34:11 +10:00
webadderall 7ca96f355b fix: default theme to system, set data-theme attribute on DOM
- Default preference to 'system' so first-run users get OS preference detection
- Set data-theme attribute on documentElement alongside .dark class toggle
2026-04-18 16:23:01 +10:00
webadderall 6536975455 fix: address CodeRabbit review for light mode theme
- Create missing ThemeContext.tsx (build-breaking)
- Fix text contrast on blue accent backgrounds (use text-white on bg-[#2563EB])
- Fix PlaybackControls border to use border-white/10 (dark overlay)
- Fix ExportSettingsMenu/FormatSelector active state text for light mode
- Fix ProjectBrowserDialog placeholder text on dark gradient
- Fix SettingsPanel dot preview border, accent text, hover text, X button text
- Fix TimelineEditor tooltip text and custom aspect input borders/bg
- Fix TutorialHelp malformed CSS class and kbd backgrounds
- Fix KeyboardShortcutsHelp kbd backgrounds for light mode
- Fix ExtensionManager badge text on blue pill
- Fix AnnotationSettingsPanel upload button hover text
- Fix index.css light mode timeline colors (was identical to dark)
2026-04-18 16:16:43 +10:00
webadderall 7f587a39a8 fix: address CodeRabbit review feedback
- Use videoSourcePath instead of fromFileUrl(videoPath) for cursor
  telemetry — fixes broken path when videoPath is an HTTP media-server URL
- Validate filePath against approvedLocalReadPaths in get-local-media-url
  IPC handler before returning a URL
- Use fs.realpath() instead of path.resolve() to close symlink bypass
- Fix range parser to handle suffix ranges (bytes=-500) and guard
  against NaN values
- Add CORS headers (Access-Control-Allow-Origin) to media server
  responses to prevent canvas tainting when using video frames
- Handle OPTIONS preflight requests
- Clear stale resolvedWebcamVideoUrl before resolving new URL to
  prevent flash of stale content
2026-04-18 16:09:16 +10:00
webadderall aecefd6db2 feat: add light mode theme support
Add a complete light mode theme with a ThemeContext and CSS custom properties
for all UI surfaces. Replaces hardcoded dark colors with theme-aware
equivalents across 32 files including:

- Tailwind config extended with theme color tokens
- CSS custom properties for light/dark palettes in index.css
- ThemeContext provider in App.tsx with system preference detection
- All editor panels, dialogs, timeline, and settings updated to use
  theme-aware classes (text-foreground, bg-surface, border-border, etc.)
- Timeline glass effects and module CSS updated for both modes
- UI primitives (accordion, switch, slider, sonner) themed
2026-04-18 15:58:55 +10:00
webadderall 45b6879d86 fix: serve video files via local HTTP server to fix loading on Windows
On Windows, the packaged app serves the renderer from http://127.0.0.1:PORT,
which causes Chromium to block file:// URLs in <video> elements — even with
webSecurity disabled. This affects all users running the packaged build.

Add a local media HTTP server (random port) that streams approved video files
with range request support for seeking. The renderer now resolves video paths
through this server instead of using file:// URLs directly.

- electron/mediaServer.ts: HTTP server with path validation against
  approvedLocalReadPaths and Content-Range support
- IPC handler 'get-local-media-url' converts file paths to HTTP URLs
- resolveVideoUrl() in renderer falls back to file:// if server unavailable
- Improved <video> onError to log actual MediaError details

Fixes #244
2026-04-18 15:55:43 +10:00
webadderall 12d7608a1e Merge pull request #254 from webadderall/refactor/handlers-modules
refactor handles.ts into smaller files
2026-04-17 21:32:58 +10:00
webadderall 528a31b16f fix: clean up ipc edge cases 2026-04-17 21:25:13 +10:00
webadderall 0b3169ffff fix: address ipc review follow-ups 2026-04-17 21:11:58 +10:00
webadderall 87ec8fca93 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 2ae0aa9a92 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 673dfdadd3 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 099ce2bbb5 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
webadderall d86425a83e fix(timeline): restore clip marker indent lines, major ticker dots, and hover-only end caps 2026-04-17 14:52:37 +10:00
webadderall 9e506b2d91 Merge pull request #249 from webadderall/feat/settings-extensions
feat: settings tab with language picker, extension fixes, and i18n expansion
2026-04-17 14:09:51 +10:00
webadderall 41142af68f Merge remote-tracking branch 'origin/main' into feat/settings-extensions
# Conflicts:
#	src/components/video-editor/timeline/TimelineEditor.tsx
2026-04-17 14:07:46 +10:00
webadderall 0313dfd954 Merge pull request #248 from webadderall/feat/timeline-editor
feat: overhaul timeline drag/resize, zoom playback, and recording hooks
2026-04-17 14:00:20 +10:00
webadderall d9b06bcfd9 Merge remote-tracking branch 'origin/main' into feat/settings-extensions
# Conflicts:
#	src/components/video-editor/ExtensionManager.tsx
#	src/components/video-editor/SettingsPanel.tsx
#	src/components/video-editor/TutorialHelp.tsx
#	src/components/video-editor/VideoEditor.tsx
#	src/components/video-editor/index.ts
#	src/components/video-editor/projectPersistence.ts
#	src/components/video-editor/timeline/TimelineEditor.tsx
#	src/components/video-editor/types.ts
#	src/i18n/locales/nl/launch.json
2026-04-17 13:58:36 +10:00
webadderall fdb8389883 Merge remote-tracking branch 'origin/main' into feat/timeline-editor
# Conflicts:
#	src/components/video-editor/timeline/Item.tsx
#	src/components/video-editor/timeline/TimelineEditor.tsx
2026-04-17 13:54:19 +10:00
webadderall e66a3aa583 Merge pull request #247 from webadderall/feat/export-pipeline
feat: add H.264 stream-copy export, overhaul exporter pipeline, rename native binaries
2026-04-17 13:48:40 +10:00
webadderall 8d925281fc Merge remote-tracking branch 'origin/main' into feat/export-pipeline
# Conflicts:
#	electron/electron-env.d.ts
#	electron/ipc/handlers.ts
2026-04-17 13:47:15 +10:00
webadderall ab2cbd9202 Merge pull request #246 from webadderall/feat/ui-overhaul
feat: ui overhaul — Phosphor icons, redesigned launcher, editor layout, and component refresh
2026-04-17 13:36:28 +10:00
webadderall ec4d4318d4 fix: clear annotation selection for zoom edits 2026-04-17 12:03:37 +10:00
webadderall ff2b19a61b fix: finish remaining settings review items 2026-04-17 12:00:42 +10:00
webadderall 6861a41ff9 fix: address remaining CodeRabbit feedback 2026-04-17 11:56:31 +10:00
webadderall c7ed81129e fix: stabilize editor settings and extension UI 2026-04-17 01:50:14 +10:00
webadderall 0206e38e2c fix: address remaining settings review feedback 2026-04-17 01:03:24 +10:00
webadderall cf51e713e7 fix: address remaining zoom timing review feedback 2026-04-17 00:47:30 +10:00
webadderall e6ce742f58 fix: address final export pipeline review follow-ups 2026-04-17 00:41:32 +10:00
webadderall ae6ac0d81e fix: address remaining ui overhaul review feedback 2026-04-17 00:27:46 +10:00
webadderall f91e29abba fix: address remaining timeline review feedback 2026-04-17 00:23:52 +10:00
webadderall aa27e7cbd1 fix: address remaining export pipeline review feedback 2026-04-17 00:17:54 +10:00
webadderall 8071c6bb0e fix: address remaining ui overhaul review feedback 2026-04-16 23:39:27 +10:00
webadderall a83a58c671 fix: address ui overhaul review feedback 2026-04-16 22:36:23 +10:00
webadderall 1dc758e535 fix: address timeline editor review feedback 2026-04-16 19:34:02 +10:00
webadderall 993c7aff9c fix: address settings and extensions review feedback 2026-04-16 19:16:20 +10:00
webadderall f81a740614 fix: address export pipeline review feedback 2026-04-16 18:49:01 +10:00
webadderall 9a5ff5c0a2 feat: ui overhaul — Phosphor icons, redesigned launcher, editor layout, and component refresh
- Replace all lucide-react imports with @phosphor-icons/react across every
  component (LaunchWindow, AnnotationSettingsPanel, ExtensionManager,
  ExtensionIcon, VideoPlayback, AnnotationOverlay, CropControl, TutorialHelp,
  PlaybackControls, all shadcn ui/ primitives, etc.)
- ExtensionIcon: new Phosphor-based resolver with Lucide name alias map for
  backwards-compatible extension manifests
- LaunchWindow / SourceSelector: full redesign — new icon rail layout,
  updated backgrounds, improved source selection UX, audio/video controls,
  countdown overlay
- VideoPlayback: overhaul playback controls and preview panel layout
- Timeline items: border-radius 16px→8px, cyan→blue unification, pill height
  85% for breathing room, resize handle vertical centering
- shadcn ui/: refresh accordion, dialog, dropdown, select, slider, switch,
  tabs, toggle, popover, button, card, input, label, sonner, content-clamp,
  audio-level-meter
- App.tsx / index.css / App.css / tailwind.config: global style updates
- types.ts, captionLayout.ts, captionStyle.ts, webcamOverlay.ts: data model
  updates to support new timeline and export features
- package.json: add @phosphor-icons/react, bump dependencies
- scripts/, .eslintrc, biome, tsconfig, vite.config: tooling alignment
- extension-sources: update built-in extension bundles
2026-04-16 18:01:04 +10:00
webadderall 8cdf21e125 feat: overhaul timeline drag/resize, zoom playback, and recording hooks
- TimelineEditor: rewrite drag/resize with neighbour clamping — items cannot
  overlap; drag preserves original duration; resize clamps to adjacent item
  boundaries instead of rejecting; floating drag/resize tooltip via direct
  DOM (no re-renders)
- TimelineWrapper: new wrapper component for cleaner TimelineContext wiring
- Track: extract Track component with empty-row hint slot
- AudioWaveform, Row, Subrow, KeyframeMarkers, Timeline.module.css: dark
  theme timeline overhaul
- zoomSuggestionUtils: smarter auto-zoom region suggestion from cursor telemetry
- videoPlayback (zoom): fix zoomRegionUtils edge cases at timeline bounds;
  rework zoomTransform for cursor-follow camera
- videoPlayback (cursor): cursorFollowCamera, cursorSway, cursorLoopTelemetry,
  cursorViewport — new cursor motion and snapping pipeline
- videoPlayback (layout): layoutUtils, overlayUtils, focusUtils, motionSmoothing
- useScreenRecorder: hardened recording lifecycle, pause segment tracking,
  improved WGC and SCK integration
- useVideoDevices / useMicrophoneDevices / useAudioLevelMeter improvements
2026-04-16 17:53:51 +10:00