Skip to content

Release/1.10.0 - #57

Merged
pedrovsiqueira merged 10 commits into
mainfrom
release/2.0.0
May 8, 2026
Merged

Release/1.10.0#57
pedrovsiqueira merged 10 commits into
mainfrom
release/2.0.0

Conversation

@pedrovsiqueira

Copy link
Copy Markdown
Collaborator

This pull request introduces a new custom protocol for secure, local media file streaming and playback, and integrates a media player with transcript segment navigation into the transcription output UI. It also improves subtitle segmentation, adds video support, and enhances batch processing ETA estimation. The main changes are as follows:

Media Streaming and Protocol Integration

  • Added a custom Electron protocol (whisperdesk-media://) to securely serve local audio/video files to the renderer, with support for HTTP range requests and correct content types. This enables local playback without exposing file paths or using insecure URLs. (src/main/utils/media-protocol.ts, src/main/index.ts, index.html) [1] [2] [3] [4]
  • Implemented IPC handler file:getMediaSource to validate media files and return a protocol URL and media type for playback. (src/main/ipc/index.ts) [1] [2]
  • Exposed getMediaSource in the preload bridge for renderer access. (src/preload/index.ts)

Transcription Output and Media Player

  • Enhanced the OutputDisplay component to include an embedded media player (TranscriptMediaPlayer) when transcript segments and a selected media file are available, allowing users to play the media and click transcript segments to seek playback. (src/renderer/features/transcription/components/OutputDisplay/OutputDisplay.tsx) [1] [2] [3] [4] [5]
  • Updated the right panel and context to pass selectedFile to OutputDisplay, ensuring the correct media file is used for playback. (src/renderer/components/layout/RightPanel/RightPanel.tsx, src/renderer/contexts/AppContext.tsx) [1] [2] [3]

Subtitle Segmentation and Video Support

  • Improved subtitle segmentation by setting a maximum segment length and enabling splitting on word boundaries, resulting in better-aligned transcript segments for media navigation. (src/main/services/whisper.ts) [1] [2]
  • Added support for common video file extensions and correct media type detection. (src/main/ipc/index.ts)

Batch Processing and Testing

  • Enhanced batch processing ETA estimation to scale based on file size, duration, and progress, and added tests for these behaviors. (src/renderer/features/transcription/__tests__/useBatchQueue.test.ts) [1] [2]
  • Updated tests and mocks to support new features and API changes. (src/renderer/features/transcription/components/OutputDisplay/__tests__/OutputDisplay.test.tsx)

These changes provide a secure, integrated media playback experience for transcriptions, improve subtitle accuracy, and enhance user feedback during batch processing.

Copilot AI review requested due to automatic review settings May 7, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds secure local media preview/playback to the transcription UI by introducing a custom Electron protocol and wiring transcript (VTT) segments to media seeking, while also improving subtitle segmentation and batch ETA estimation.

Changes:

  • Introduces whisperdesk-media:// protocol + IPC bridge (file:getMediaSource) for safe, range-enabled local audio/video streaming to the renderer.
  • Adds transcript-segment parsing/highlighting and an embedded media player with segment click-to-seek navigation in the output panel.
  • Improves batch ETA estimation logic and updates/extends automated tests for the new behaviors.

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/shared/types.ts Adds shared MediaSourceResult / MediaSourceType types for the new IPC API.
src/renderer/types/electron.d.ts Extends renderer-side Electron API typings with getMediaSource.
src/renderer/test/setup.ts Updates global Electron API mock to include getMediaSource.
src/renderer/test/electronAPIMocks.ts Extends default/full Electron API mocks with getMediaSource behavior.
src/renderer/services/electronAPI.ts Adds renderer wrapper for getMediaSource.
src/renderer/services/tests/electronAPI.test.ts Tests wrapper behavior including getMediaSource forwarding/fallback.
src/renderer/features/transcription/utils/transcriptSegments.ts New utility to parse VTT cues into timestamped segments.
src/renderer/features/transcription/utils/tests/transcriptSegments.test.ts Tests for segment parsing + timestamp conversion.
src/renderer/features/transcription/hooks/useBatchQueue.ts Refactors ETA calculation to use progress + historical samples; adds timer-based updates.
src/renderer/features/transcription/components/TranscriptMediaPlayer/TranscriptMediaPlayer.tsx New embedded audio/video preview player with controls + IPC source resolution.
src/renderer/features/transcription/components/TranscriptMediaPlayer/TranscriptMediaPlayer.css Styles for the embedded media player UI.
src/renderer/features/transcription/components/TranscriptMediaPlayer/index.ts Barrel export for the new player component.
src/renderer/features/transcription/components/TranscriptMediaPlayer/tests/TranscriptMediaPlayer.test.tsx Tests media player loading/error states and controls.
src/renderer/features/transcription/components/TranscriptionContent/TranscriptionContent.tsx Renders clickable timestamped segments + in-segment search highlighting and active-segment scrolling.
src/renderer/features/transcription/components/TranscriptionContent/TranscriptionContent.css Adds styles for timestamped transcript segment layout/active state.
src/renderer/features/transcription/components/OutputDisplay/OutputDisplay.tsx Integrates segment parsing, embedded player, active segment detection, and segment click-to-seek.
src/renderer/features/transcription/components/OutputDisplay/tests/OutputDisplay.test.tsx Adds tests for segment rendering, seeking, active highlighting, and segment search.
src/renderer/features/transcription/components/index.ts Re-exports the new TranscriptMediaPlayer.
src/renderer/features/transcription/tests/useBatchQueue.test.ts Updates tests for new onFirstComplete signature and new ETA behavior.
src/renderer/contexts/AppContext.tsx Updates onFirstComplete to capture the completed file and set it as selected.
src/renderer/components/layout/RightPanel/RightPanel.tsx Passes selectedFile into OutputDisplay so preview uses the correct media.
src/preload/index.ts Exposes getMediaSource over the preload bridge via IPC.
src/main/utils/media-protocol.ts New protocol implementation (content-type + range handling) and URL minting for local files.
src/main/services/whisper.ts Improves subtitle segmentation via --max-len and --split-on-word.
src/main/ipc/index.ts Adds file:getMediaSource IPC handler and video type detection.
src/main/index.ts Registers the media protocol scheme/handler during app startup.
index.html Updates CSP to allow media loading from the custom protocol.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/utils/media-protocol.ts Outdated
Comment thread src/main/utils/media-protocol.ts
Copilot AI review requested due to automatic review settings May 7, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 27 out of 28 changed files in this pull request and generated 4 comments.

Comment thread src/renderer/features/transcription/components/OutputDisplay/OutputDisplay.tsx Outdated
Comment thread src/renderer/features/transcription/components/OutputDisplay/OutputDisplay.tsx Outdated
Comment thread src/main/ipc/index.ts Outdated
Comment thread src/main/ipc/index.ts Outdated
Copilot AI review requested due to automatic review settings May 8, 2026 01:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 30 changed files in this pull request and generated 3 comments.

Comment thread src/main/ipc/index.ts Outdated
Comment thread src/main/utils/media-protocol.ts
Comment thread src/renderer/features/transcription/components/OutputDisplay/OutputDisplay.tsx Outdated
Copilot AI review requested due to automatic review settings May 8, 2026 18:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 30 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings May 8, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 3 comments.

Comment thread src/main/utils/media-protocol.ts
Comment on lines +219 to +227
const setMediaElement = (element: HTMLMediaElement | null): void => {
mediaRef.current = element;
onMediaElementChange?.(element);

if (element) {
applyVolume(element, volume, isMuted);
element.playbackRate = playbackRate;
}
};
Comment thread src/main/ipc/index.ts
@pedrovsiqueira
pedrovsiqueira merged commit abc7840 into main May 8, 2026
7 checks passed
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pedrovsiqueira pedrovsiqueira changed the title Release/2.0.0 Release/1.10.0 May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants