Conversation
…pplication - Update README acknowledgments table to reflect correct project name - Replace tray service tooltip from "Cherry Studio" to "EchoPlayer" - Update temporary directory path from "CherryStudio" to "EchoPlayer" - Change config directory from ".cherrystudio" to ".echoplayer" - Update MCP directory path configuration for new branding - Modify executable file names for AppImage and portable versions - Update User-Agent string to use "EchoPlayer" instead of "CherryStudio" This comprehensive rebranding ensures consistent naming across all user-facing elements, system paths, and application identifiers while maintaining functionality and preserving existing user configurations through path updates.
…138) - Add time boundary check in useSubtitleOverlay hook - Ensure overlay only displays when current time is within subtitle time range - Fixes issue where overlay showed previous subtitle content after its end time - Preserves SubtitleListPanel highlighting functionality by keeping useSubtitleEngine unchanged
* fix(player): improve play/pause button reliability Fix intermittent play/pause failures by implementing state synchronization, optimistic updates, and delayed verification mechanisms. ## Root Cause - requestTogglePlay relied on videoController.isPaused() which could be out of sync with internal state - Async play() operations could fail without proper error recovery - State inconsistencies between video element and orchestrator context ## Solution - Use internal context state as authoritative source for play/pause decisions - Add syncPlaybackState() method to detect and fix state mismatches - Implement optimistic updates with failure rollback - Add delayed verification and retry mechanisms - Enhance error handling for DOMExceptions ## Changes - PlayerOrchestrator: Add state sync, optimistic updates, retry logic - usePlayerCommands: Add detailed debugging logs and result verification - Tests: Add 19 comprehensive test cases covering all scenarios ## Test Coverage - 47 total test cases (100% pass rate) - State synchronization scenarios - Async operation handling - Error recovery mechanisms - Edge cases and boundary conditions - Real usage scenarios (shortcuts, browser limitations) Resolves the issue where play/pause would occasionally fail to resume playback via keyboard shortcuts, requiring mouse click to recover. * Update src/renderer/src/pages/player/engine/__tests__/PlayerOrchestrator.playback-reliability.test.ts
…prehensive tests (#143) - Add dictionary API to preload layer for frontend access - Create comprehensive test suite for DictionaryService with 18 test cases - Test coverage includes success scenarios, error handling, HTML parsing robustness, parameter processing, and edge cases - Verify API can handle various dictionary response formats and gracefully handle network errors - All tests pass, demonstrating production-ready robustness API Usage: ```typescript const result = await window.api.dictionary.queryEudic('hello', 'greeting context'); if (result.success) { console.log(result.data); // { word, phonetic, definitions, examples, translations } } ```
…ets (#145) * fix(build): fix FFmpeg cross-platform build on macOS for Windows targets - Add cross-env dependency for cross-platform environment variables - Update Windows build scripts to set BUILD_TARGET_PLATFORM and BUILD_TARGET_ARCH - Modify download-ffmpeg.ts to prioritize environment variables over command arguments - Update vite plugin to avoid duplicate FFmpeg downloads - Fix release scripts to download all platform FFmpeg binaries before building - Ensure correct FFmpeg binaries are included for each target platform Resolves issue where building Windows packages on macOS would include macOS FFmpeg binaries instead of Windows ones. * fix(build): improve FFmpeg download in CI environments - Replace direct tsx command with npm run for better CI compatibility - Add CI-specific handling with proper environment variable passing - Convert hard failures to warnings to prevent CI build blocking - Improve error messages and debugging information Fixes Windows CI build failure: spawn tsx ENOENT * fix(build): ensure FFmpeg is properly downloaded in Windows CI - Use npm run ffmpeg:download on Windows for better compatibility - Pass environment variables to ensure correct platform detection - Throw errors on download failure to prevent incomplete builds - Keep direct tsx usage on Unix systems for performance This ensures CI builds never skip FFmpeg download and always include the correct FFmpeg binaries for the target platform.
…ion (#140) * feat(player): add subtitle copy shortcut with Ctrl+C - Add copy_subtitle shortcut to constants with CommandOrControl+C - Implement copy functionality in usePlayerShortcuts hook - Support copying selected text or current subtitle based on display mode - Add success/error notifications for copy operations - Remove obsolete keyboard handling from SubtitleContent component - Add i18n label support for copy_subtitle shortcut * fix(player): enable text selection in subtitle tokens for copy functionality - Change WordToken user-select from 'none' to 'text' to allow native text selection - Add debug logging to copy function to help diagnose selection issues - This enables Ctrl+C to copy selected subtitle text properly * fix(player): use custom subtitle selection for copy functionality - Use selectedText from useSubtitleOverlayUI instead of window.getSelection() - Integrate with custom selection system used by SubtitleContent component - Restore WordToken user-select: none to maintain custom selection behavior - Update copy logic to properly detect custom selected text vs full subtitle - Remove window.getSelection() debugging code as it's no longer used * debug: add logging to copy function to diagnose selectedText state * feat(player): add DOM-based selected text detection for copy - Add fallback to DOM query when selectedText state is empty - Check for selected tokens by background color style - Maintains both state-based and DOM-based selection detection - This should fix the issue where selectedText state gets cleared before copy * simplify: remove word selection feature, keep only full subtitle copy - Remove all selected text detection logic (selectedText state and DOM queries) - Simplify copy function to only copy current subtitle based on display mode - Remove dependency on useSubtitleOverlayUI hook - Clean up notification message to show copied character count - This makes the copy functionality simple and reliable * feat(player): add lightweight toast notifications for subtitle copy - Add Ctrl+C shortcut to copy current subtitle based on display mode - Replace intrusive NotificationService with lightweight toast positioned above subtitle overlay - Implement custom event system for decoupled toast communication between components - Add i18n support for copy success/failure messages in zh-cn.json - Toast automatically hides after 2 seconds with smooth fade transition - Support copying original, translated, or bilingual subtitle content based on current display mode - Position toast relative to subtitle overlay for better UX during immersive video watching This improves user experience by providing non-intrusive feedback while maintaining clean component architecture and supporting internationalization. * Update src/renderer/src/pages/player/components/SubtitleOverlay.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update src/renderer/src/pages/player/components/SubtitleOverlay.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update src/renderer/src/pages/player/components/SubtitleOverlay.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * 📝 Add docstrings to `copy-subtitle-shortcut` (#142) Docstrings generation was requested by @mkdir700. * #140 (comment) The following files were modified: * `src/renderer/src/pages/player/hooks/usePlayerShortcuts.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update * refactor: use design tokens in Toast components and add theming best practices - Replace hardcoded values with design tokens in ToastContainer and ToastContent - Use ANIMATION_DURATION, EASING, FONT_SIZES, FONT_WEIGHTS, SPACING, Z_INDEX, GLASS_EFFECT tokens - Reduce toast display duration from 2000ms to 800ms for better UX - Add comprehensive theming best practices to CLAUDE.md - Document mixed approach: CSS variables for theme-related properties, JS variables for design constants --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
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 |
Owner
Author
|
关闭此 PR,因为包含重复提交。已通过 cherry-pick 方式修复 alpha 分支,将重新创建干净的 PR。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Dev to Alpha Merge
此 PR 将 dev 分支的最新开发成果合并到 alpha 分支,包含多项重要功能改进、bug 修复和系统优化。
📋 主要变更内容
🆕 新功能特性
1. 字幕复制功能 (#140)
Ctrl+C字幕复制功能2. 字典服务 API (#143)
3. 品牌重塑
.cherrystudio到.echoplayer🔧 重要修复
1. 播放器可靠性提升 (#141)
2. 字幕显示优化 (#138)
3. 跨平台构建修复 (#145)
🧪 测试状况
📱 用户体验提升
Ready for alpha testing 🎉