Vite reported a 1.4 MB index-*.js chunk and three INEFFECTIVE_DYNAMIC_IMPORT warnings. Non-English locales were eagerly embedded, and YouTube playback dynamically imported Tauri APIs that the startup path already loads statically, so those import() calls never became real chunks.
This change lazy-loads non-English locale JSON through i18next.changeLanguage, and isolates the YouTube watch native surface in a module that is imported only when YouTube actually plays. PlaybackStage uses the same static Tauri emit / getCurrentWindow path as the rest of startup.
createDefaultYoutubeWatchNativeSurface to src/playback/youtube-watch-native.ts and load it from the YouTube transport.INEFFECTIVE_DYNAMIC_IMPORT warnings.index-*.js chunk stays under the 1000 kB warning limit.document.documentElement.lang.node --run lint and node --run build β local pre-push lint passed; production build emitted index at 871.23 kB gzip 248.74 kB, a youtube-watch-native chunk, per-locale chunks, and no Vite warningspnpm vitest run β 220 files / 2417 tests passed; patch coverage 82.6%cd src-tauri && cargo clippy --all-targets -- -D warnings β skipped, no Rust changescd src-tauri && cargo nextest run β skipped, no Rust changesnode --run check:i18n β skipped, no UI copy added; locale JSON files are unchangeddocs/references/contracts/*.md updated β not required; no public IPC command, payload, or event changedocument.lang unchanged; on-demand locale load covered in src/lib/i18n.test.ts) and Lifecycle, quality, and testing (chunk-size / ineffective-dynamic-import acceptance above). PlaybackStage still reports YouTube host bounds; no keyboard or widget contract change.First switch to a non-English language now waits on a locale JSON chunk. Startup still hydrates settings through the existing await changeLanguage(...) path, so the English fallback window is the same as before plus that chunk fetch.
Stacked on #419 (feat/418-online-sources). No separate issue.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the[@coderabbitai](/coderabbitai) reviewcommand.βοΈ Run configuration
Configuration used: Repository: thedavidweng/OpenKara/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
83c7debb-daa6-4fc5-8f25-fd739d4fc638You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- π Trigger review
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 [@coderabbitai](/coderabbitai) help to get the list of available commands.
| Status | Category | Percentage | Covered / Total |
|---|---|---|---|
| π’ | Lines | 84.7% (π― 65%) | 8160 / 9633 |
| π’ | Statements | 83.9% (π― 65%) | 8653 / 10313 |
| π’ | Functions | 80.23% (π― 60%) | 2058 / 2565 |
| π’ | Branches | 76.6% (π― 60%) | 4634 / 6049 |
| File | Stmts | Branches | Functions | Lines | Uncovered Lines |
|---|---|---|---|---|---|
| Changed Files | |||||
| src/components/Playback/PlaybackStage.tsx | 92.98% | 88.46% | 88.88% | 92% | 88, 98, 112-113 |
| src/lib/i18n.ts | 88% | 100% | 75% | 87.5% | 14-15, 48 |
| src/playback/youtube-transport.ts | 86.51% | 81.48% | 81.57% | 90.24% | 93-94, 95, 96, 111-116, 148 |
| src/playback/youtube-watch-host.ts | 81.51% | 71.42% | 81.48% | 81.35% | 46, 53, 56, 61, 105-108, 131, 135, 153, 211-217, 227, 256, 277, 282-284, 317 |
| src/playback/youtube-watch-native.ts | 100% | 87.5% | 100% | 100% | |
:x: Patch coverage is 95.65217% with 3 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 88.6%. Comparing base (982f350) to head (67cd711).
:white_check_mark: All tests successful. No failed tests found.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/lib/i18n.ts | 89.4% | 2 Missing :warning: |
| src/components/Playback/PlaybackStage.tsx | 75.0% | 1 Missing :warning: |
@@ Coverage Diff @@ ## feat/418-online-sources #459 +/- ## ========================================================= + Coverage 88.3% 88.6% +0.2% ========================================================= Files 219 220 +1 Lines 11686 11697 +11 Branches 3598 3531 -67 ========================================================= + Hits 10329 10365 +36 + Misses 1304 1279 -25 Partials 53 53
| Flag | Coverage Ξ | |
|---|---|---|
| frontend | 88.6% <95.6%> (+0.2%) | :arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Ξ | |
|---|---|---|
| frontend | 88.6% <95.6%> (+0.2%) | :arrow_up: |
| rust | β
<ΓΈ> (β
) |
| Files with missing lines | Coverage Ξ | |
|---|---|---|
| src/playback/youtube-transport.ts | 92.3% <100.0%> (+19.0%) | :arrow_up: |
| src/playback/youtube-watch-host.ts | 81.5% <ΓΈ> (+0.7%) | :arrow_up: |
| src/playback/youtube-watch-native.ts | 100.0% <100.0%> (ΓΈ) | |
| src/components/Playback/PlaybackStage.tsx | 90.5% <75.0%> (-0.3%) | :arrow_down: |
| src/lib/i18n.ts | 92.5% <89.4%> (-7.5%) | :arrow_down: |
... and 1 file with indirect coverage changes
Sign in to comment.
feat(catalog): add Online Sources for NetEase import and YouTube queue
#419 main β feat/418-online-sources
Updated last month
#459 feat/418-online-sources β cursor/code-split-bundle-27b8
Updated last week