Make Yardline map editor reachable from the console - #32
Merged
Conversation
The bundle already shipped two editors — the 2D "Map Workbench" (?tool=map-editor) and a 3D fly-and-edit overlay (?fly=1) — but nothing linked to either, and their navigation was emitted as site-absolute literals. Under the /games/yardline-rc/ subpath those resolved to the console root instead of the game, the same class of bug BUILD.md already documents for the runtime asset paths. Rewrite the 5 URL literals to be relative (11 bytes total, all inside editor-only components — the racing path never reads them) and add a Map Workbench tile to the hub. Verified: bundle parses (acorn --module); headless Chrome renders the editor shell with the brand link resolving to "./"; BUILD.md's three existing rebuild invariants still hold (no absolute /assets/, phone bridge intact, __scInput hook present).
Contributor
|
🚀 Preview for |
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.
What
Yardline RC's bundle already contained two editors, but nothing linked to either and their navigation was broken under the subpath embed:
?tool=map-editor?fly=1Five URL literals were emitted as site-absolute (
/?map=…,/map-editor,/). Under/games/yardline-rc/they resolve to the console root instead of the game — the same class of bugBUILD.mdalready documents for the runtime asset paths.Changes
yardline-rc/assets/index-CSoa7UUc.jsindex.html./yardline-rc/?tool=map-editoryardline-rc/BUILD.mdRisk
Low, and bounded. Reversing the 5 substitutions returns the bundle byte-identical to its pre-patch SHA — nothing else in those 7 MB moved. All 5 sites live in editor-only components (
testDrive(), the workbench brand link, the fly-overlay link); the racing path never reads them. Nothing was rebuilt or re-copied, which is what caused the 2026-07-23 and 2026-07-24 regressions.Verification
acorn --module --ecma2022MAP WORKBENCH,editorShell, canvas, Test drive — and the brand link resolves to./in the live DOMBUILD.mdinvariants hold: 0 absolute`/assets/, phone bridge intact,__scInputhook presentKnown limitation (not fixed here)
The workbench's asset palette lists the full Downtown MegaKit, but only preset-used models are on disk (the build was pruned 138 MB → 64 MB). Placing a non-preset prop will 404 the model. Fixing it means re-copying the full
dist/, which would destroy the stripped-slash asset paths and the inline phone bridge — deliberately re-running both past outages. Left alone; documented inBUILD.md.