Skip to content

Ship skill text on demand and stop requesting local-only files online - #21

Merged
erupts merged 1 commit into
mainfrom
feat/ship-skill-text
Dec 4, 2026
Merged

erupts merged 1 commit into
mainfrom
feat/ship-skill-text

Conversation

@erupts

@erupts erupts commented Dec 4, 2026

Copy link
Copy Markdown
Member

Why

Cloudflare metrics showed ~467 asset 4xx responses per day (~17% of requests). Every page load requested two files that only exist locally and were never deployed:

  • downloads/config/text.js (skill / soul mark descriptions)
  • downloads/audio/FightBg_Sound.m4a (game battle music)

Changes

  • Add text.js (≈738 KB, generated from config version 20261130151713) to the repo root. It is no longer loaded with the page; loadText() in js/library.js fetches it once when the skill panel opens in preview, or when a battle has a pet on either side, then re-renders so full descriptions appear.
  • The weekly manifest.yml workflow now copies and commits text.js alongside data.js / data-moves.js; tools/config.js stamps it with the config version.
  • js/audio.js only requests the battle music on localhost / 127.x / [::1] / file://; online it keeps the synthesized music.
  • README and comments updated.

Testing

  • node tools/smoke.js: all 52 checks pass
  • Local check: first load makes no text.js request; opening the skill panel loads it once and shows skill and soul mark descriptions

🤖 Generated with Claude Code

- Add text.js (skill effect, status and soul mark descriptions) to the repo
  and load it only when the skill panel opens or a battle starts
- Generate and commit text.js in the weekly manifest workflow
- Request the game's battle music only when the page runs locally
- Removes the two 404s every visit produced in production

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.

Worker Status Deployment Commit
seer-player Deployed Preview daf6cc0

Updated: Dec 4, 2026, 02:29 UTC | Dashboard

@erupts
erupts merged commit 4328041 into main Dec 4, 2026
2 checks passed
@erupts
erupts deleted the feat/ship-skill-text branch December 4, 2026 03:05
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.

1 participant