Skip to content

Add release single-file packaging and E2E coverage#8

Merged
Tiryoh merged 5 commits intomainfrom
feature/add-release-flow
Mar 24, 2026
Merged

Add release single-file packaging and E2E coverage#8
Tiryoh merged 5 commits intomainfrom
feature/add-release-flow

Conversation

@Tiryoh
Copy link
Copy Markdown
Owner

@Tiryoh Tiryoh commented Mar 23, 2026

Summary

  • add a release workflow that uploads both standard and single-file release assets
  • add a single-file Vite build and keep Cloudflare deploy on the standard build
  • run the existing Playwright E2E suite against both standard and single-file outputs

Testing

  • npm run test (40 tests passed)
  • npm run build
  • npm run build:singlefile
  • npm run test:e2e (42 tests passed)
  • npm run test:e2e:singlefile (42 tests passed)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

Test Results

42 tests  ±0   42 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit d22fe0d. ± Comparison against base commit 4ae368a.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

Copy link
Copy Markdown

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

Adds a “single-file” build/release variant alongside the existing Vite build, and runs the Playwright E2E suite against both outputs to ensure parity.

Changes:

  • Introduce a dedicated vite.singlefile.config.ts producing dist-singlefile/ using vite-plugin-singlefile.
  • Update Playwright config + CI to run E2E tests for both dist/ and dist-singlefile/, with separate HTML report folders.
  • Add a release workflow that uploads both standard and single-file zip assets.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
vite.singlefile.config.ts New Vite config for single-file output into dist-singlefile/.
src/rosbagUtils.ts Switch decompressor libs to static imports (previously lazy-loaded).
playwright.config.ts Serve built output via a static server; parameterize output/report folder by variant.
package.json Add build:singlefile and test:e2e:singlefile; add vite-plugin-singlefile.
index.html Remove Vite starter favicon link.
.gitignore Ignore dist-singlefile and single-file Playwright report folder.
.github/workflows/test.yml Run E2E in a matrix for standard vs single-file; upload variant-specific reports.
.github/workflows/release.yml New workflow to package and upload standard + single-file release assets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread playwright.config.ts
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
command: `${buildCommand} && python3 -m http.server 3000 --bind 127.0.0.1 --directory ${outputDir}`,
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The Playwright webServer.command now depends on python3 being available locally. That’s true on GitHub Actions ubuntu runners, but may not hold for all contributors/environments. Consider using a Node-based static server (e.g., npx http-server/serve added to devDependencies) to avoid the extra runtime dependency.

Suggested change
command: `${buildCommand} && python3 -m http.server 3000 --bind 127.0.0.1 --directory ${outputDir}`,
command: `${buildCommand} && npx http-server ${outputDir} -p 3000 -a 127.0.0.1`,

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

@Tiryoh Tiryoh Mar 24, 2026

Choose a reason for hiding this comment

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

This is a ROS project, so Linux/Mac is assumed. python3 is always available.

Comment thread .github/workflows/release.yml Outdated
Comment on lines +34 to +36
cp -a dist/. "${staging_dir}/"
mv "${staging_dir}/index.html" "${staging_dir}/rosbag-analyzer.html"

Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The release artifact renames index.html to rosbag-analyzer.html. This changes the file users are expected to open (README currently references opening dist/index.html / index.html from releases). Consider keeping index.html in the zip (copy instead of move) or updating the user-facing docs/instructions to match the packaged filename.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

@Tiryoh Tiryoh Mar 24, 2026

Choose a reason for hiding this comment

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

Intentional rename — makes the filename recognizable after download.

Comment thread src/rosbagUtils.ts
Comment on lines 1 to +4
import Bag from '@foxglove/rosbag/dist/cjs/Bag';
import BlobReader from '@foxglove/rosbag/dist/cjs/web/BlobReader';
import { decompress as bzip2Decompress } from 'seek-bzip';
import lz4 from 'lz4js';
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

Switching from dynamic imports to top-level imports for seek-bzip and lz4js pulls these decompression libraries into the initial app bundle (rosbagUtils is imported by App), increasing initial load even for users who never open a bag. If the goal is single-file bundling, consider keeping lazy import() (single-file rollup can still inline dynamic imports) so these deps load only when needed.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

@Tiryoh Tiryoh Mar 24, 2026

Choose a reason for hiding this comment

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

Top-level imports are needed for the single-file build. Bundle size is acceptable.

Comment thread src/rosbagUtils.ts Outdated
Comment thread package.json Outdated
- Add cross-env for Windows-compatible E2E singlefile script
- Use cp -a for singlefile release packaging for robustness
- Fix misleading console.log message for decompression init

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copy link
Copy Markdown

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

Copilot reviewed 7 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tiryoh Tiryoh merged commit 2baaea3 into main Mar 24, 2026
8 checks passed
@Tiryoh Tiryoh deleted the feature/add-release-flow branch March 24, 2026 14:11
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