Conversation
…#152) - Remove detail parameter from system MessageBox to prevent window overflow - Display only essential update information with version number - Direct users to Settings > About page for full release notes - Remove unused formatReleaseNotes method and ReleaseNoteInfo interface Fixes issue where long release notes caused system dialog to overflow screen height, hiding the Install button.
Remove all keyboard shortcuts for subtitle display modes: - subtitle_mode_none (Cmd/Ctrl+1) - subtitle_mode_original (Cmd/Ctrl+2) - subtitle_mode_translated (Cmd/Ctrl+3) - subtitle_mode_bilingual (Cmd/Ctrl+4) Changes: - Remove shortcut configurations from DEFAULT_SHORTCUTS - Remove shortcut handlers from usePlayerShortcuts hook - Remove i18n label references - Clean up unused imports and fix formatting Users can still change subtitle display modes through the UI interface.
…ncy logging (#156) - Reduce Logger export history from 10k to 1k entries and add automatic cleanup - Implement lightweight serialization to replace deep serialization - Add sampling strategy for high-frequency logs (time_update, MediaClock events) - Disable export history completely in production environment - Optimize MediaClock logging with 5-10% sampling for duplicates and debug messages - Reduce PlayerOrchestrator trace buffer from 200 to 50 entries - Remove high-frequency onTimeUpdate silly logs - Implement stricter production log levels (WARN+ for renderer, ERROR+ for main process) This should significantly reduce memory pressure from logger-related objects as identified in Chrome DevTools memory analysis.
…e state sync (#153) * fix(subtitle): resolve overlay pause/seek update delays with immediate state sync - Add immediate store updates in PlayerOrchestrator during seek/jumpToCue - Implement UserSeeking state in PlayerSettingsSaver to prevent conflicts - Ensure subtitle overlay UI responds instantly to user interactions - Maintain data consistency during user-initiated time changes * Update src/renderer/src/pages/player/engine/PlayerOrchestrator.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update src/renderer/src/services/PlayerSettingsSaver.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(player): resolve seeking event mismatch causing duplicate subtitle jumps - Add missing mediaClock.startSeeking() call in PlayerOrchestrator.onSeeking() - Fix SeekEventCoordinator state inconsistency between start/end seeking events - Eliminate 'Ignoring seeked without active seeking' warnings in console - Ensure proper event sequence for both paused and playing states - All 66 player engine tests pass with TypeScript and lint validation Resolves issue where users needed to press subtitle buttons twice in paused state. * refactor(player): Use destroyOnHidden instead of destoryOnClose. * fix(player): prevent SubtitleSyncStrategy from overriding user subtitle jumps - Lock subtitle state machine for 2 seconds after user subtitle jump - Prevent SubtitleSyncStrategy from immediately overriding user selection - Add automatic unlock mechanism to restore normal subtitle sync behavior - Ensure 'goToNextSubtitle' respects user intent in paused state - Fix seeking event coordination in PlayerOrchestrator.onSeeking() Resolves the core issue where clicking to jump to a subtitle would be immediately overridden by the subtitle sync strategy, requiring users to click twice to achieve their intended jump. * fix(subtitle): eliminate subtitle content flickering during jumps - Add activeCueIndex to PlayerState and StateUpdater interface - Sync PlayerOrchestrator's activeCueIndex to store on updates - Modify useSubtitleEngine to prioritize store's activeCueIndex over time-based calculation - Ensure SubtitleContent component uses authoritative subtitle index - Fix initial activeCueIndex synchronization on StateUpdater connection Resolves flickering where subtitle content would briefly show wrong subtitle before displaying the correct one during user-initiated subtitle jumps. * fix(subtitle): eliminate subtitle overlay flickering during jumps - Add smart tolerance mechanism to useSubtitleOverlay shouldShow calculation - Display overlay when currentTime is within 2 seconds of subtitle start time - Handles user jump delays while preserving smooth normal playback behavior - Fixes flickering issue where overlay would briefly hide during subtitle navigation Closes final flickering issue in subtitle navigation system. * fix(subtitle): resolve overlay flickering through index priority and data stabilization - Add stable subtitle data memoization in useSubtitleOverlay to prevent unnecessary re-renders - Prioritize currentIndex over time-based checks in shouldShow calculation - Reorder PlayerOrchestrator lock sequence to ensure SubtitleLockFSM is active during updateContext - Implement granular dependency tracking for subtitle content changes --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…anagement (#155) * feat(ffmpeg): implement dynamic FFmpeg download system with runtime management - Remove static FFmpeg bundling from build configuration - Add FFmpegDownloadService for cross-platform binary management - Implement automatic platform detection (Windows/macOS/Linux, x64/ARM64) - Add IPC channels for download progress monitoring and control - Integrate download service with existing FFmpegService architecture - Update build scripts to remove prebuild FFmpeg requirements - Add comprehensive test coverage for download functionality Changes: - electron-builder.yml: Remove extraResources FFmpeg bundling - package.json: Remove prebuild FFmpeg download from release scripts - FFmpegDownloadService.ts: New service with download/extract/management capabilities - FFmpegService.ts: Enhanced with download service integration and fallback logic - IpcChannel.ts: Add 9 new channels for download operations - ipc.ts: Register download service handlers for renderer communication - preload/index.ts: Expose download APIs to renderer process - useVideoFileSelect.ts: Updated to work with dynamic FFmpeg detection This implementation enables on-demand FFmpeg installation, reducing app bundle size by ~200MB while maintaining cross-platform compatibility and user experience. The system gracefully falls back to bundled → downloaded → system FFmpeg. * feat(settings): implement FFmpeg settings UI with download management - Add new FFmpegSettings component with status indicator and download controls - Remove deprecated FFmpeg build plugin from electron.vite.config.ts - Enhance IndicatorLight component with proper CSS-in-JS animation syntax - Add comprehensive i18n support for FFmpeg management (en-us, zh-cn) - Remove box-shadow from ant-btn components for cleaner UI appearance - Integrate FFmpeg settings into main SettingsPage navigation Changes: - FFmpegSettings.tsx: Complete UI implementation with download progress, path validation, and status management - electron.vite.config.ts: Remove build-time FFmpeg download plugin (shift to runtime approach) - IndicatorLight.tsx: Fix styled-components animation with proper css helper - i18n locales: Add 61 new translation keys for FFmpeg settings UI - ant.scss: Remove button shadows for consistent design system - SettingsPage.tsx: Add FFmpeg settings tab integration This implements the frontend interface for the dynamic FFmpeg download system, providing users with a comprehensive management UI for FFmpeg installation, status monitoring, and path configuration. * feat(ffmpeg): implement FFmpeg guidance dialog for enhanced user experience Add comprehensive FFmpeg download guidance system that transforms technical errors into user-friendly guidance with seamless navigation to settings and auto-download. **Components Added:** - FFmpegDownloadPrompt: Full-featured guidance dialog with benefits, effort info, and actions - Comprehensive internationalization support (zh-CN, en-US) **Hook Enhancements:** - useVideoFileSelect: Extended with FFmpeg prompt state management - Replaced technical error throwing with guided dialog display - Enhanced error detection for FFmpeg missing scenarios **Integration Updates:** - HomePage: State management for prompt visibility and component integration - EmptyState/VideoAddButton: Bidirectional state communication with parent - HeaderNavbar: Props forwarding for prompt handler **Features:** - Benefits explanation (compatibility, performance, reliability) - Installation effort communication - Auto-navigation to settings with download trigger - Seamless integration with existing video file selection workflow - Graceful error handling with user-centric messaging **Technical Details:** - Styled-components with theme variables and CSS custom properties - Modal-based UI with responsive design and accessibility - State management across component hierarchy - URL parameter-based auto-download triggering - Comprehensive TypeScript interfaces Transforms "视频处理组件未安装" technical errors into guided user experience that educates users about FFmpeg benefits and provides immediate resolution path. * test: fix FFmpegService mock for dynamic download system - Add getDownloadService method to FFmpegService mock - Include all FFmpegDownloadService interface methods in mock - Fix 43 failing test cases caused by missing mock method - All 554 test cases now pass successfully Resolves test failures introduced by FFmpeg dynamic download system implementation. * test: fix cross-platform FFmpeg executable name test - Update test to handle platform-specific executable names (ffmpeg vs ffmpeg.exe) - Fix Windows CI test failure where test expected 'ffmpeg' but got 'ffmpeg.exe' - Test now correctly validates system FFmpeg fallback behavior on all platforms - Maintains test coverage while supporting cross-platform compatibility Resolves Windows CI test failure in FFmpegService integration tests.
- Add arm64 architecture support for Windows NSIS installer target - Add arm64 architecture support for Windows Portable target - Align Windows build targets with existing macOS and Linux ARM64 support - Enable native ARM64 builds for Windows on ARM devices This change allows the application to run natively on Windows ARM64 devices, providing better performance and compatibility for users with ARM-based Windows machines.
- Configure Windows and Linux to use native system title bars instead of custom titleBarOverlay - Remove excessive padding-right in Navbar component (140px for Windows, 120px for Linux) - Maintain custom title bar for macOS with traffic light buttons integration - Update ThemeService to only apply titleBarOverlay changes to macOS windows - Simplify Navbar styling to use consistent 12px padding across all platforms This change eliminates the spacing issue in the Windows header area and provides a more native user experience on Windows and Linux platforms. Fixes the header spacing issue reported for Windows platform.
…elease (#160) - Remove pre-release-check.ts script with version validation and Git status checks - Remove release.ts script with interactive version selection and build automation - Remove rename-artifacts.ts script with platform-specific file renaming logic - Remove version-manager.ts script with semver version bumping functionality - Clean up package.json scripts: remove version:*, release:*, and related commands - Retain semantic-release configuration and migrate:* database commands - Transition from custom release tooling to standardized semantic-release workflow The removed scripts provided manual release management including: - Interactive version type selection (patch/minor/major/prerelease/beta) - Git status validation and commit automation - Cross-platform artifact renaming (Windows/macOS/Linux) - Build orchestration and publishing workflows This refactoring simplifies the release process by adopting semantic-release as the single source of truth for version management and automated publishing, reducing maintenance overhead and improving consistency with modern CI/CD practices.
- Replace find() with filter() + sort() to get the latest matching release - Increase API request limit from 8 to 20 releases for better coverage - Add proper sorting by published_at timestamp to ensure latest version - Enhance logging for better debugging of version detection process Fixes issue where alpha.10 was not detected due to find() returning the first match instead of the latest published version.
When users relocate a missing video file through the error recovery dialog, the new file path is now properly saved to the database instead of only updating local state. This ensures the relocated path persists across app sessions, eliminating the need to relocate files repeatedly. Changes: - Update handleFileRelocate to fetch video record and file ID - Call db.files.updateFile() to persist new path to database - Maintain existing local state updates for immediate UI response - Add comprehensive error handling and logging Fixes issue where video file relocation was temporary and required repeated user action on subsequent app launches.
* feat(ffmpeg): add China mirror support for FFmpeg downloads - Add IP-based region detection using ipinfo.io API - Support China mainland, Hong Kong, Macau, Taiwan regions - Add dedicated China mirror URLs from gitcode.com - Implement automatic fallback from China to global mirrors - Add comprehensive test coverage for new functionality - Default to China mirror on detection failure for better UX Breaking change: Service now defaults to China mirror for better performance in Chinese regions * fix(test): remove unused parameter in FFmpegDownloadService test - Fix TypeScript error TS6133 for unused 'url' parameter - Replace unused 'url' with underscore in mock implementation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a GitHub Actions workflow to sync releases to GitCode. Overhauls FFmpeg integration with downloadable binaries, IPC channels, preload APIs, renderer UI/settings, and tests. Streamlines builds (remove FFmpeg bundling, refine packaging) and removes legacy release/version tooling. Enhances player seek/subtitle synchronization and logging, updates updater logic, and minor UI tweaks. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Renderer as Renderer (FFmpegSettings/Prompt)
participant Preload as Preload (window.api)
participant Main as Main (FFmpegService)
participant DL as FFmpegDownloadService
participant Net as Network/Mirror
participant FS as Filesystem
User->>Renderer: Open Plugins/FFmpeg or trigger Prompt
Renderer->>Preload: ffmpeg.getInfo()
Preload->>Main: Ipc Ffmpeg_GetInfo
Main-->>Preload: {path,isDownloaded,isSystemFFmpeg,needsDownload,version?}
Preload-->>Renderer: Status
alt Needs download
User->>Renderer: Click Download
Renderer->>Preload: ffmpeg.download.download()
Preload->>Main: Ipc FfmpegDownload_Download
Main->>DL: downloadFFmpeg(onProgress)
DL->>Net: Fetch archive (mirror autodetect/fallback)
DL->>FS: Write temp, extract, install, set perms
loop Progress polling
Renderer->>Preload: ffmpeg.download.getProgress()
Preload->>Main: Ipc FfmpegDownload_GetProgress
Main-->>Preload: Progress
Preload-->>Renderer: Progress
end
DL-->>Main: Completed (true)
Main-->>Preload: Result
Preload-->>Renderer: Done
Renderer->>Preload: ffmpeg.warmup()
Preload->>Main: Ipc warmup (execute probe)
Main-->>Preload: Warmup result
Preload-->>Renderer: Updated status
else Already available
Renderer-->>User: Show Installed/System status
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (48)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit