Skip to content

feat: enhance PWA support and streamline release packaging#75

Merged
manix84 merged 1 commit into
mainfrom
feature/engine-separation-4
Jun 6, 2026
Merged

feat: enhance PWA support and streamline release packaging#75
manix84 merged 1 commit into
mainfrom
feature/engine-separation-4

Conversation

@manix84

@manix84 manix84 commented Jun 6, 2026

Copy link
Copy Markdown
Owner

This pull request updates the release packaging process and documentation to produce a more streamlined, local-playable web build. The downloadable release now opens directly into the game, omitting the landing page, About page, Storybook, service worker, and PWA install metadata. The release workflow and related documentation have been updated to reflect these changes, and the service worker is conditionally disabled in the build.

Release workflow and packaging improvements:

  • The GitHub Actions release workflow (.github/workflows/release.yml) has been updated to:
    • Set VITE_APP_MODE to pwa and VITE_SERVICE_WORKER to disabled for the build.
    • Rework the packaging step to create a trimmed release bundle containing only the game assets, and modify index.html to remove PWA and install metadata.
    • Move the README.txt into the release package and clarify instructions about browser security and asset loading.

Documentation updates:

  • The README.md now describes the downloadable release as a trimmed, local-play build without PWA features, and details the new environment variables and limitations. [1] [2]

Codebase changes for PWA mode and service worker:

  • The isPwaRoute function in src/app-routing.ts now checks the VITE_APP_MODE environment variable, making PWA mode explicit in the build.
  • Service worker registration in src/main.tsx is now disabled if VITE_SERVICE_WORKER is set to "disabled".

Version bump:

  • Incremented the app version to 30.0.3 in package.json.

Copilot AI review requested due to automatic review settings June 6, 2026 21:23
@manix84 manix84 enabled auto-merge (squash) June 6, 2026 21:23
@manix84 manix84 merged commit 0a9a3c7 into main Jun 6, 2026
5 checks passed
@manix84 manix84 deleted the feature/engine-separation-4 branch June 6, 2026 21:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c21b934b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


mkdir -p release-package/assets
cp dist/assets/app.css release-package/assets/
cp dist/assets/main.js release-package/assets/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Copy the emitted app bundle instead of main.js

In the release workflow I inspected, this packaging step now copies dist/assets/main.js, but the Vite build is configured in vite.config.ts with entryFileNames: "assets/app.js", and the built pwa/index.html will reference that emitted app.js. Because the shell is running with set -euo pipefail, the cp fails before the zip is created on every release build; even if it did not fail, the archive would omit the script that index.html loads.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the downloadable “web.zip” release to be a trimmed, locally playable build that launches straight into the full-screen game while disabling PWA/service-worker behaviors, and updates docs + build-time switches to support that mode.

Changes:

  • Introduces VITE_APP_MODE and VITE_SERVICE_WORKER env switches and uses them to control routing and service worker registration.
  • Adjusts routing so “PWA shell” can be enabled explicitly at build time (not only by /pwa/ path).
  • Reworks the GitHub Actions release packaging to assemble a reduced release bundle and updates README + version.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/vite-env.d.ts Adds typed Vite env vars for app mode and service worker control.
src/main.tsx Skips service worker registration when VITE_SERVICE_WORKER=disabled.
src/app-routing.ts Treats PWA routing as enabled when VITE_APP_MODE=pwa (in addition to /pwa/ paths).
README.md Updates release documentation to describe the trimmed, local-play build and new env switches.
package.json Bumps version to 30.0.3.
package-lock.json Updates lockfile version fields to match 30.0.3.
.github/workflows/release.yml Builds with PWA mode + SW disabled and packages a trimmed release zip.

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

Comment on lines +64 to +66
mkdir -p release-package/assets
cp dist/assets/app.css release-package/assets/
cp dist/assets/main.js release-package/assets/
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