Commit Graph
960 Commits
Author SHA1 Message Date
Davide Mendolia c0b929d4b2 refactor: simplify function signatures and reduce line breaks for readability 2026-05-24 11:53:44 +02:00
Davide MendoliaandClaude Sonnet 4.6 db1d6bfe96 refactor: rewrite loadFileAsArrayBuffer using static loadLocalSourceFile/loadRemoteSourceFile
Make loadLocalSourceFile and loadRemoteSourceFile static so they can be
called without an instance. loadSourceFile applies withTimeout around
each static call. loadFileAsArrayBuffer delegates to the same static
methods and extracts ArrayBuffer + contentType from the blob, eliminating
the duplicated IPC/fetch branching logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 11:47:51 +02:00
Davide MendoliaandClaude Sonnet 4.6 69d0aa4d30 refactor: split loadSourceFile into loadLocalSourceFile and loadRemoteSourceFile
Restore loadSourceFile as a thin router (local vs remote) and extract
the IPC and fetch paths into dedicated private methods, each containing
the original logic from main.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 11:43:22 +02:00
Davide MendoliaandClaude Sonnet 4.6 d06bf37471 fix: propagate Content-Type from fetch through loadFileAsArrayBuffer
Change return type to { data, contentType } so the fetched Content-Type
header is available to callers. loadSourceFile uses it to set the Blob
MIME type for https:/blob: URLs instead of always falling back to
application/octet-stream. useAudioPeaks destructures only { data }.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 11:30:06 +02:00
Davide MendoliaandClaude Sonnet 4.6 928cabc68d fix: add AbortSignal to worker, fix data: URL filename in loadSourceFile
- computePeaksInWorker now accepts an AbortSignal; terminates the worker
  immediately on abort and rejects with AbortError so orphaned workers
  cannot outlive the effect cleanup
- useAudioPeaks wires an AbortController into the effect; controller.abort()
  fires alongside the existing cancelled flag on URL change or unmount
- loadSourceFile handles data: URLs by parsing the MIME type, deriving a
  safe filename (e.g. video.mp4), and setting Blob type correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 19:04:35 +02:00
Davide MendoliaandClaude Sonnet 4.6 9a72f31148 docs: add missing JSDoc to satisfy docstring coverage threshold
Add docstrings to all undocumented functions and methods across the
files touched in this branch: getAudioCtx, Row component, and all
StreamingVideoDecoder methods (loadSourceFile, computeSegments,
getExportMetrics, splitBySpeed, getDemuxer, cancel, destroy, withTimeout).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 18:33:27 +02:00
Davide MendoliaandClaude Sonnet 4.6 9f55611f72 fix: always clear canvas before bailing on empty peaks
Move the peaks null-check after clearRect so a previously drawn
waveform is erased when peaks transitions to null (e.g. on URL change
or decode failure) rather than lingering on screen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 18:12:54 +02:00
Davide MendoliaandClaude Sonnet 4.6 87f7268de7 i18n(zh-TW): align waveform label with existing trim terminology
Use 剪輯 (editing/clip) instead of 修剪 (trimming) to match the term
already used in the trim section throughout zh-TW strings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 18:11:44 +02:00
Davide MendoliaandClaude Sonnet 4.6 f19d1bc668 fix: clear stale peaks before decoding a new source
Reset peaks to null immediately when an uncached URL is set, so the
previous video's waveform is not shown during decode. Also clear on
decode failure so stale data does not persist indefinitely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 18:10:36 +02:00
Davide MendoliaandClaude Sonnet 4.6 98f7441dfa refactor: rename RowWaveform to BackgroundWaveform, drop wrapper div
Rename to BackgroundWaveform to reflect its visual role rather than
structural placement. Remove the redundant wrapper div — Row already
provides relative overflow-hidden, so the canvas can sit absolute
inset-0 directly and observe itself via ResizeObserver.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 18:06:28 +02:00
Davide MendoliaandClaude Sonnet 4.6 b7d7c08906 i18n: add Timeline panel translations for all 12 locales
Add timeline.title and timeline.waveform keys to every settings.json
locale file. Replace all hardcoded "Timeline" and "Show Audio Waveform
on Trim Track" strings in SettingsPanel with t() calls.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 17:43:13 +02:00
Davide MendoliaandClaude Sonnet 4.6 f67e997688 refactor: offload peak computation to Web Worker, replace module cache with useRef
- Move computePeaks into audioPeaksWorker.ts — runs off the main thread
  with zero-copy channel buffer transfer
- Replace module-level peaksCache Map with a useRef scoped to the hook
  instance — no global mutable state, toggle off/on still instant

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 17:34:38 +02:00
Davide MendoliaandClaude Sonnet 4.6 514943c142 refactor: extract loadFileAsArrayBuffer to eliminate duplicated file loading
Add a single exported loadFileAsArrayBuffer in streamingDecoder.ts that
owns the IPC-vs-fetch branching for local and remote video URLs.
StreamingVideoDecoder.loadSourceFile and useAudioPeaks both delegate to
it, removing the duplicated readBinaryFile/fetch logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 17:26:54 +02:00
Davide MendoliaandClaude Sonnet 4.6 a72aa1a594 refactor: extract audio peak decoding into useAudioPeaks hook
Move fetch/decode/cache logic out of RowWaveform into a standalone
useAudioPeaks hook. RowWaveform is now a pure canvas renderer that
accepts pre-computed peaks as a prop. TimelineEditor calls the hook
and passes peaks down, skipping decoding entirely when waveform is off.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 17:14:20 +02:00
Davide MendoliaandClaude Sonnet 4.6 46732fc76b revert: restore hint text opacity to 0.12 in Row
The 0.25 bump was a workaround for hint visibility over the waveform
background, but is now stale — waveform defaults to off and hints only
appear on empty rows anyway. Restores consistency with all other row hints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 17:08:38 +02:00
Davide MendoliaandClaude Sonnet 4.6 5b4f31f661 chore: swap AudioWaveform icon for Brackets, improve toggle label
- Replace AudioWaveform icon with Brackets on the Timeline panel tab and section header
- Rename toggle label from "Waveform" to "Show Audio Waveform on Trim Track"
- Make toggle full-width to accommodate the longer label

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 16:57:19 +02:00
Davide MendoliaandClaude Sonnet 4.6 70c7d20d3c fix: timeline waveform in dedicated Timeline panel, disabled by default
- Add "Timeline" as a dedicated SettingsPanelMode with AudioWaveform icon
- Waveform toggle now lives exclusively in the Timeline panel (not in every panel)
- Default showTrimWaveform to false so trim row starts with visible hint text
- Guard AccordionItem render with activePanelMode === "timeline" to prevent bleed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 15:45:00 +02:00
Davide MendoliaandClaude Sonnet 4.5 8413095aa9 feat: audio waveform on trim track + Timeline Settings toggle
- Add RowWaveform component (refactored from TrimWaveform) that decodes
  audio via AudioContext, caches peaks per URL, and renders a faint
  waveform canvas behind any timeline row using useTimelineContext() for
  zoom/pan alignment
- Wire RowWaveform as background of the trim row in TimelineEditor
- Add showTrimWaveform boolean to EditorState / ProjectEditorState with
  default true; persists across saves/loads
- Add Timeline Settings accordion section in SettingsPanel (always
  visible) with a Waveform toggle to enable/disable the visualization
- Bump hint text opacity from 0.12 to 0.25 so "Press T to add trim"
  remains readable over the waveform background

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-23 12:53:56 +02:00
Sid 34340c2b29 Merge pull request #526 from Sunwood-ai-labs/codex/allow-png-background-upload
[codex] Allow PNG custom background uploads
2026-05-22 20:37:25 -07:00
Siddharth 2dbdb27bb6 Merge remote-tracking branch 'origin/main' into codex/allow-png-background-upload
# Conflicts:
#	electron/ipc/handlers.ts
#	electron/main.ts
2026-05-22 20:33:19 -07:00
Sid fbd06fca48 Merge pull request #613 from auberginewly/feat/zoom-hold-preview
feat(zoom): hold-to-preview button for zoom focus editing (prototype for #612)
2026-05-22 20:16:28 -07:00
Siddharth 85d0dea9fc Merge remote-tracking branch 'origin/main' into feat/zoom-hold-preview
# Conflicts:
#	src/components/video-editor/VideoPlayback.tsx
2026-05-22 20:15:00 -07:00
Siddharth 259bfa9097 Merge remote-tracking branch 'origin/main' into feat/zoom-hold-preview 2026-05-22 20:12:51 -07:00
Sid b6b37e3718 Merge pull request #639 from siddharthvaddem/codex/fix-windows-paused-recording
[codex] Fix native Windows recording pause
2026-05-22 20:09:05 -07:00
Siddharth a50835e30f Merge remote-tracking branch 'origin/main' into codex/fix-windows-paused-recording
# Conflicts:
#	src/hooks/useScreenRecorder.ts
2026-05-22 20:08:26 -07:00
Sid dfd961393f Merge pull request #605 from EtienneLescot/codex/editor-defaults-ssot
Centralize editor defaults
2026-05-22 20:04:54 -07:00
SiddharthandClaude Opus 4.7 9eaae72af1 fix: drop removed WEBCAM_TARGET width/height refs after main merge
PR #600 (now on main) removed WEBCAM_TARGET_WIDTH/HEIGHT and switched
this call site to width/height: 0 so the native helper picks the
camera's native dimensions. Align this branch with that so CI's
fresh PR-merge stops erroring on the undeclared identifiers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 20:02:25 -07:00
Siddharth d658ec40f5 Merge remote-tracking branch 'origin/main' into codex/editor-defaults-ssot 2026-05-22 20:00:54 -07:00
SiddharthandClaude Opus 4.7 84b523df83 fix: drop unused imports and reorder in SettingsPanel
Removes MAX_PLAYBACK_SPEED and DEFAULT_WEBCAM_SIZE_PRESET (TS6133) and
runs biome's organize-imports to satisfy the Lint check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 19:54:13 -07:00
Sid 086039bf67 Merge pull request #600 from sagar290/webcam-layout-constraints
Fix vertical webcam recording layout
2026-05-22 19:47:31 -07:00
Sid b8e78ccbf5 Merge branch 'main' into codex/editor-defaults-ssot 2026-05-22 19:44:37 -07:00
Sid 3b7e78a16b Merge pull request #642 from siddharthvaddem/codex/fix-windows-webcam-sidecar
Fix native Windows webcam sidecar capture
2026-05-22 19:43:29 -07:00
Sid 97fa74aa92 Merge pull request #643 from AjTheSpidey/codex/fix-decimal-playback-speed
Fix decimal custom playback speeds
2026-05-22 19:42:34 -07:00
AjTheSpidey 0daf2295a3 fix: accept decimal custom speeds 2026-05-23 03:47:42 +08:00
EtienneLescot 10614c2950 Address webcam sidecar review feedback 2026-05-22 21:20:51 +02:00
Etienne Lescot b36a32d44b refactor: centralize editor defaults 2026-05-22 21:10:44 +02:00
EtienneLescot ca826d9088 Fix native Windows recording pause 2026-05-22 21:02:33 +02:00
EtienneLescot ef5855f1f4 Fix native Windows webcam sidecar capture
Record browser webcam sidecar when native Windows capture is active.

Add native webcam sidecar output and DirectShow NV12/YUY2 fallback.

Sample exported webcam frames by source timestamp.
2026-05-22 20:56:09 +02:00
Sid 9f7f498e22 Merge pull request #621 from LucaFontanot/refactor-cursor
refactor: Migrate the powershell cursor script into native cursor sampler
2026-05-20 21:23:09 -07:00
Sid a9df720554 Merge pull request #614 from creazyfrog/feature/rename-native-to-original
ux: rename 'Native' aspect ratio label to 'Original'
2026-05-20 21:06:36 -07:00
Sid 37ab35f5a8 Merge pull request #603 from AjTheSpidey/codex/multi-source-recording-editor
test: cover MP4 editor export
2026-05-20 21:05:40 -07:00
Sid 4a55dcdb4c Merge pull request #618 from LucaFontanot/i18n-ita
i18n: Add italian
2026-05-20 20:37:48 -07:00
Luca Fontanot cfe6b9e594 fix: Thread detach before teardown is race-prone. 2026-05-20 11:53:50 +02:00
Luca Fontanot 7826cc44e3 fix: Add <algorithm> include for std::max 2026-05-20 11:49:23 +02:00
AjTheSpidey 57eed2c829 test: tighten export e2e guards 2026-05-20 16:38:14 +08:00
Sid 12350520cc Merge pull request #622 from marcgabe15/fix-locale-save-diagnostics
Fix locale save diagnostics
2026-05-19 20:59:52 -07:00
Marc Diaz a9181e6782 fix: update translations 2026-05-19 23:22:50 -04:00
Marc Diaz 3be317b7f9 refactor: update support key 2026-05-19 22:41:38 -04:00
Luca Fontanot 49ee3ac0db refactor: Migrate the powershell cursor script into the native cursor-sampler.cpp 2026-05-20 00:45:33 +02:00
AjTheSpidey fd2bf21e7e test: wait for export bytes in e2e 2026-05-20 04:07:38 +08:00