Repository navigation
Ship skill text on demand and stop requesting local-only files online - #21
Merged
Merged
Conversation
- 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 builds and deploys previews for this pull request. Learn more about Cloudflare previews.
Updated: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
text.js(≈738 KB, generated from config version 20261130151713) to the repo root. It is no longer loaded with the page;loadText()injs/library.jsfetches 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.manifest.ymlworkflow now copies and commitstext.jsalongsidedata.js/data-moves.js;tools/config.jsstamps it with the config version.js/audio.jsonly requests the battle music onlocalhost/127.x/[::1]/file://; online it keeps the synthesized music.Testing
node tools/smoke.js: all 52 checks passtext.jsrequest; opening the skill panel loads it once and shows skill and soul mark descriptions🤖 Generated with Claude Code