Skip to content

Feature/engine separation 5#76

Merged
manix84 merged 4 commits into
mainfrom
feature/engine-separation-5
Jun 6, 2026
Merged

Feature/engine separation 5#76
manix84 merged 4 commits into
mainfrom
feature/engine-separation-5

Conversation

@manix84

@manix84 manix84 commented Jun 6, 2026

Copy link
Copy Markdown
Owner

This pull request updates the downloadable release build to produce a simplified, local-playable package that opens directly into the game without a service worker, PWA install prompts, or extra pages. The build and packaging scripts, release instructions, and documentation are all updated to reflect this streamlined experience.

Release packaging and build changes:

  • The release workflow now sets VITE_APP_MODE=pwa and disables the service worker (VITE_SERVICE_WORKER=disabled), ensuring the build opens directly into the game and is playable from the file system without a static server. (.github/workflows/release.yml) [1] [2]
  • The packaging script trims the release bundle to only include the game (no landing page, About, Storybook, or PWA metadata), rewrites asset URLs for local access, and modifies HTML/JS to support direct file opening. (.github/workflows/release.yml)
  • The release instructions and README are updated to direct users to simply open index.html after extracting the archive—no static server required. (.github/workflows/release.yml, README.md) [1] [2]

Codebase improvements:

  • The isPwaRoute function now checks the VITE_APP_MODE environment variable, making route detection more robust for the new build mode. (src/app-routing.ts)
  • The service worker is only registered if not explicitly disabled, preventing PWA prompts in the downloadable build. (src/main.tsx)

Other:

  • Bumped the project version to 30.0.4. (package.json)

Copilot AI review requested due to automatic review settings June 6, 2026 21:38

@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: 9379e4e31f

ℹ️ 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".

Comment thread .github/workflows/release.yml Outdated
# Conflicts:
#	.github/workflows/release.yml
#	README.md
#	package-lock.json
#	package.json

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 streamlines the downloadable release artifact so it can be opened locally and drop PWA/service-worker behaviors, while also tightening runtime routing/service-worker toggles via new Vite env flags.

Changes:

  • Added VITE_APP_MODE and VITE_SERVICE_WORKER env flags and used them to control PWA routing and service-worker registration.
  • Updated the release workflow packaging and release instructions to produce a trimmed “open index.html” downloadable bundle.
  • Bumped version to 30.0.4.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/vite-env.d.ts Adds typings for new Vite env flags used by routing/SW gating.
src/main.tsx Skips service worker registration when explicitly disabled via env.
src/app-routing.ts Treats the build as “PWA route” when VITE_APP_MODE=pwa is set.
README.md Updates downloadable release instructions to match the new local-open packaging intent.
package.json Version bump to 30.0.4.
package-lock.json Lockfile version bump to 30.0.4.
.github/workflows/release.yml Alters build env and adds a new packaging flow for a trimmed local-playable zip.

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

Comment thread .github/workflows/release.yml
Copilot AI review requested due to automatic review settings June 6, 2026 21:47
@manix84 manix84 enabled auto-merge (squash) June 6, 2026 21:49
@manix84 manix84 merged commit 06bd611 into main Jun 6, 2026
5 checks passed
@manix84 manix84 deleted the feature/engine-separation-5 branch June 6, 2026 21:49

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

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

Comment on lines 64 to +71
mkdir -p release-package/assets
cp dist/assets/app.css release-package/assets/
cp dist/assets/main.js release-package/assets/
browser_entry=$(
node -e 'const { readFileSync } = require("node:fs"); const html = readFileSync("dist/pwa/index.html", "utf8"); const match = html.match(/<script\s+type="module"[^>]*\bsrc="([^"]+\.js)"[^>]*><\/script>/); if (!match) { console.error("Unable to find PWA browser entry script."); process.exit(1); } const src = match[1].replace(/^\.\.\//, "").replace(/^\.\//, ""); console.log(`dist/${src}`);'
)
test -f "${browser_entry}"
perl -0pe 's#new URL\(`cover\.png`,import\.meta\.url\)\.href#"./assets/cover.png"#g; s#new URL\(`titleBanner\.png`,import\.meta\.url\)\.href#"./assets/titleBanner.png"#g' \
"${browser_entry}" > release-package/assets/app.js
Comment thread package.json
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