fix: web-core background thread module coverage#2463
fix: web-core background thread module coverage#2463PupilTong merged 1 commit intolynx-family:mainfrom
Conversation
📝 WalkthroughWalkthroughEnhanced code coverage analysis by enabling source map generation in the build pipeline, expanding coverage fixture discovery to include web-core mapped files, and broadening package exclusion patterns to encompass all source map artifacts instead of JavaScript-only maps. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/web-platform/playwright-fixtures/src/coverage-fixture.ts (1)
24-33: Minor: Redundant type assertion after filter.The type assertion
(f as string)on line 29 is redundant since the filter already narrows the type tostring.♻️ Suggested simplification
const getWebCoreMappedFiles = () => { try { const files = readdirSync(webCoreDist, { recursive: true }); return files .filter((f) => typeof f === 'string' && f.endsWith('.map')) - .map((f) => path.join(webCoreDist, (f as string).replace(/\.map$/, ''))); + .map((f) => path.join(webCoreDist, f.replace(/\.map$/, ''))); } catch (e) { return []; } };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/web-platform/playwright-fixtures/src/coverage-fixture.ts` around lines 24 - 33, In getWebCoreMappedFiles, remove the redundant type assertion "(f as string)" because the prior filter already narrows f to string; update the .map call to use f directly (e.g., path.join(webCoreDist, f.replace(/\.map$/, ''))) while keeping the try/catch, readdirSync usage, and path.join(webCoreDist, ...) logic intact so behavior is unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/web-platform/playwright-fixtures/src/coverage-fixture.ts`:
- Around line 24-33: In getWebCoreMappedFiles, remove the redundant type
assertion "(f as string)" because the prior filter already narrows f to string;
update the .map call to use f directly (e.g., path.join(webCoreDist,
f.replace(/\.map$/, ''))) while keeping the try/catch, readdirSync usage, and
path.join(webCoreDist, ...) logic intact so behavior is unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 69129ad2-07eb-4d87-904d-722c8fea05ed
📒 Files selected for processing (3)
packages/web-platform/playwright-fixtures/src/coverage-fixture.tspackages/web-platform/web-core/package.jsonpackages/web-platform/web-core/rsbuild.config.ts
Merging this PR will degrade performance by 42.92%
Performance Changes
Comparing Footnotes
|
Web Explorer#8873 Bundle Size — 749.3KiB (0%).513787d(current) vs 7332eb4 main#8857(baseline) Bundle metrics
Bundle size by type
|
| Current #8873 |
Baseline #8857 |
|
|---|---|---|
401.63KiB |
401.63KiB |
|
345.51KiB |
345.51KiB |
|
2.16KiB |
2.16KiB |
Bundle analysis report Branch PupilTong:p/hw/fix-coverage-afte... Project dashboard
Generated by RelativeCI Documentation Report issue
React MTF Example#432 Bundle Size — 192.85KiB (0%).513787d(current) vs 7332eb4 main#416(baseline) Bundle metrics
|
| Current #432 |
Baseline #416 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
173 |
173 |
|
67 |
67 |
|
45.36% |
45.36% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #432 |
Baseline #416 |
|
|---|---|---|
111.23KiB |
111.23KiB |
|
81.61KiB |
81.61KiB |
Bundle analysis report Branch PupilTong:p/hw/fix-coverage-afte... Project dashboard
Generated by RelativeCI Documentation Report issue
React External#417 Bundle Size — 582.81KiB (0%).513787d(current) vs 7332eb4 main#401(baseline) Bundle metrics
|
| Current #417 |
Baseline #401 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
17 |
17 |
|
5 |
5 |
|
8.59% |
8.59% |
|
0 |
0 |
|
0 |
0 |
Bundle analysis report Branch PupilTong:p/hw/fix-coverage-afte... Project dashboard
Generated by RelativeCI Documentation Report issue
React Example#7299 Bundle Size — 223.58KiB (0%).513787d(current) vs 7332eb4 main#7283(baseline) Bundle metrics
|
| Current #7299 |
Baseline #7283 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
179 |
179 |
|
70 |
70 |
|
45.76% |
45.76% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #7299 |
Baseline #7283 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
77.82KiB |
77.82KiB |
Bundle analysis report Branch PupilTong:p/hw/fix-coverage-afte... Project dashboard
Generated by RelativeCI Documentation Report issue
Summary by CodeRabbit
Checklist