Skip to content

Test/for html report#34

Closed
yifancong wants to merge 9 commits intomainfrom
test/for-html-report
Closed

Test/for html report#34
yifancong wants to merge 9 commits intomainfrom
test/for-html-report

Conversation

@yifancong
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 3, 2026 09:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adjusts artifact naming to remove file extensions, updates CI branch triggers, and simplifies the rsbuild demo UI content.

Changes:

  • Remove file extensions from uploaded/downloaded artifact names.
  • Update GitHub Actions CI workflow to run on main and test/main3 pushes.
  • Delete duplicated/extra UI sections from the rsbuild demo App.tsx.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/upload.ts Changes artifact naming to omit the original file extension.
src/download.ts Updates expected artifact name computation to match the new naming scheme.
examples/rsbuild-demo2/src/App.tsx Removes extra duplicated UI sections to simplify the demo page.
dist/index.js Rebuild output reflecting the artifact naming change.
.github/workflows/ci.yml Expands push branch triggers for CI runs.

Comment on lines 24 to +29
const relativePath = path.relative(process.cwd(), targetFilePath);
const pathParts = relativePath.split(path.sep);
const fileNameWithoutExt = path.parse(fileName).name;
const fileExt = path.parse(fileName).ext;


const pathHash = hashPath(pathParts, fileNameWithoutExt);
const artifactName = `${pathHash}-${hash}${fileExt}`;
const artifactName = `${pathHash}-${hash}`;
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

Dropping the file extension from artifactName reduces uniqueness: two artifacts with the same path + base filename but different extensions (e.g., report.html vs report.json) will collide and can overwrite each other or be indistinguishable when downloading. Consider restoring ${fileExt} in the artifact name, or incorporate the extension into the hashed component (e.g., include fileExt in the hashPath input) to keep names stable and unique.

Copilot uses AI. Check for mistakes.
Comment on lines 104 to +108
const relativePath = path.relative(process.cwd(), filePath);
const pathParts = relativePath.split(path.sep);
const fileNameWithoutExt = path.parse(fileName).name;
const fileExt = path.parse(fileName).ext;
const pathHash = hashPath(pathParts, fileNameWithoutExt);
const expectedArtifactName = `${pathHash}-${commitHash}${fileExt}`;
const expectedArtifactName = `${pathHash}-${commitHash}`;
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

This change makes downloads incompatible with previously uploaded artifacts that included the file extension in their names. If existing artifacts need to remain accessible, consider a backward-compatible lookup (e.g., attempt ${pathHash}-${commitHash}${fileExt} first, then ${pathHash}-${commitHash}, or vice versa), or introduce a versioned naming scheme so callers can unambiguously select old vs new behavior.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

Rsdoctor Bundle Diff Analysis

Found 2 projects in monorepo, 2 projects with changes.

📊 Quick Summary
Project Total Size Change
rsbuild-demo 190.4 KB -
rsbuild-demo2 190.3 KB -
📋 Detailed Reports (Click to expand)

📁 rsbuild-demo

Path: examples/rsbuild-demo/dist/.rsdoctor/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 190.4 KB - -
📄 JavaScript 188.5 KB - -
🎨 CSS 345.0 B - -
🌐 HTML 374.0 B - -
📁 Other Assets 1.2 KB - -

📁 rsbuild-demo2

Path: examples/rsbuild-demo2/dist/.rsdoctor/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 190.3 KB - -
📄 JavaScript 188.4 KB - -
🎨 CSS 345.0 B - -
🌐 HTML 374.0 B - -
📁 Other Assets 1.2 KB - -

Generated by Rsdoctor GitHub Action

@yifancong yifancong force-pushed the test/for-html-report branch from 7a733f5 to 224af0e Compare March 3, 2026 09:48
@yifancong yifancong closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants