[PR #1470] [MERGED] fix(gacha-forge): 1.8.13 — Unicode location IDs and iPhone landscape layout #1475

Closed
opened 2026-10-21 05:11:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1470
Author: @SpicyMarinara
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/gacha-forge-unicode-landscape


📝 Commits (5)

  • a222c86 fix(gacha-forge): 1.8.13 — Unicode location IDs and iPhone landscape layout
  • 3db7d84 Merge branch 'staging' into fix/gacha-forge-unicode-landscape
  • c452328 test(gacha-forge): compare the whole stored places document after gsPlaces
  • a053f35 Merge branch 'staging' into fix/gacha-forge-unicode-landscape
  • bccf908 Merge branch 'staging' into fix/gacha-forge-unicode-landscape

📊 Changes

14 files changed (+249 additions, -34 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+3 -0)
➕ artifacts/gacha-forge-1.8.13.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/gacha-forge/CHANGELOG.md (+5 -0)
📝 packages/gacha-forge/README.md (+2 -0)
📝 packages/gacha-forge/client.js (+28 -3)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+2 -2)
➕ tests/gacha-forge-location-ids.regression.mjs (+162 -0)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1460
Closes #1461

Why this change

  • Pasta-Devs/Marinara-Agents#1460: players who write their world in Korean never get location backgrounds. Gacha Forge builds a location's ID by keeping only a-z0-9, so 달빛 숲 becomes an empty ID. The server then skips the place and /background refuses it. Names that mix Hangul and digits lose the Hangul, so 숲 1 and 동굴 1 both become 1 and share one picture. The same happens in every non-Latin script.
  • Pasta-Devs/Marinara-Agents#1461: on an iPhone turned sideways, the game's text and panels come out oversized, and Settings has to scroll for a long way. Part of the cause is in the package itself. Its :host { all: initial } reset undoes the Engine's -webkit-text-size-adjust: 100%, so iPhone Safari enlarges the game's text when the phone turns to landscape. Also, the fullscreen button does nothing on iPhone, because iPhone Safari has no element fullscreen.

What changed

Package: gacha-forge 1.8.12 → 1.8.13 (patch; it is above every version the catalog has published). The rebuild covers the manifest, artifacts/gacha-forge-1.8.13.zip, the v2/v3/legacy catalog entries and notes.json. The package CHANGELOG.md and the package README's per-release paragraph are updated too.

How the bundles are produced. client.js and server.mjs are pre-built esbuild bundles. Their source tree lives outside this repository (see the header of scripts/build-gacha-forge-package.mjs). That builder only re-derives hashes, the locale, the ZIP and the catalog from the committed bytes. The fix is therefore applied to the committed bundles, the same way every previous Gacha Forge release here was. This builder does not read an Engine checkout, so it needs no MARINARA_ENGINE_ROOT pin. Before any edit, I rebuilt the unchanged tree: it produced no diff, so the 1.8.12 build reproduces byte for byte. The same changes need to be ported to the external source tree before the next bundle drop. The new regression fails if a drop loses them.

Location IDs (#1460):

  • The server's gs() and the client's oc() now run the same normalization. They apply NFC, trim and lowercase the name, and turn every run of characters outside \p{L}\p{M}\p{N} into -. The result is capped at 60 code points, so a surrogate pair is never split. An ASCII name keeps exactly the ID it had before. The regression checks this against the old function on 4000 random ASCII strings.
    • Combining marks (\p{M}) are kept as well as letters and digits. Without them, Hindi काला and किला (and Thai names that differ only by a tone mark) would still collide.
  • Backgrounds that are already painted keep working. The locations document is now read through gsPlaces(). It also answers to each stored place's new ID, computed from the stored name, and never overwrites a key that already exists. Writes still go to the raw document, so nothing is rewritten. A place painted under an old lossy ID (for example ch-teau-rouge for "Château Rouge") is still found, and /locations returns it under the ID the client now computes. Two names that used to collide stop sharing a picture.
  • /background goes through bgSlug(). It accepts Unicode IDs and refuses a slug that contains /, \, .. or a control character (\p{Cc}). The IDs that gs() produces can never contain these anyway.
  • Before this change, the server's fuzzy location fold ir() (built on gs()) also dropped Hangul places while a chapter plan was being written. Those places now survive.

iPhone landscape (#1461), using theme tokens only and no new colours or copy:

  • The arena turns iOS landscape text enlargement off again (-webkit-text-size-adjust: 100% and text-size-adjust: 100% on .gf-arena and its descendants). This also reaches the leaving screen's transition clone, whose own :host rule would reset it.
  • .gf-arena sets max-height: 100vh and then max-height: 100dvh, so the 16:9 stage is never fitted against a box taller than the visible screen.
  • A fullscreen arena pads by env(safe-area-inset-*) instead of 0. Outside fullscreen the Engine's own shell already insets for the notch, so the arena does not add a second inset.
  • On (orientation: landscape) and (max-height: 500px), the frame drops its padding, border and shadow so the stage gets every pixel. The Settings screen also tightens its body and plate padding, and its rail and pane still scroll inside the stage.
  • When the browser cannot honour element fullscreen (requestFullscreen is missing or document.fullscreenEnabled === false, as on iPhone Safari), the fullscreen toggles are removed and the bar is measured again. No new fullscreen button is added.
  • No orientation locking was added, and the 16:9 stage is unchanged.

Regression: tests/gacha-forge-location-ids.regression.mjs runs the shipped gs, ir, bgSlug, gsPlaces and oc code taken from the committed bundles, and pins the landscape rules. It is wired into pull-request-checks.yml. Run against the 1.8.12 bundles, it fails.

Package and security impact

  • Affected package IDs: gacha-forge
  • Engine compatibility impact: none. The range (>=2.4.4 <4.0.0) and the Capability API are unchanged.
  • New or changed permissions/entrypoints: none. Executable client.js and server.mjs changed as described above. /background input validation is now stricter for slug.
  • Restart, storage, update, or uninstall impact: the stored locations documents are not rewritten. Old IDs are answered through aliases in memory. New backgrounds for non-ASCII names are filed under their Unicode ID. The usual restart applies after the update.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Commands I actually ran on this branch:

  • npm ci: ok
  • node scripts/build-gacha-forge-package.mjs on the unchanged tree: no diff. After the change it built gacha-forge 1.8.13 (artifact of 7843821 bytes), and a second rebuild was stable.
  • npm run check: exit 0. Prettier is clean, and ESLint reports 0 errors and none of the existing warnings come from the new test.
  • node tests/gacha-forge-location-ids.regression.mjs: passed. The same test fails against the origin/staging (1.8.12) bundles.
  • node scripts/test-catalog-lanes.mjs: passed
  • node scripts/validate-package-locales.mjs: passed
  • node scripts/validate-catalog.mjs: Catalog lanes valid: v2=39, v3=39; legacy=v2
  • node scripts/tests/catalog-release-notes.regression.mjs: OK
  • node scripts/tests/catalog-generatedat-determinism.regression.mjs: OK
  • npm run test:security: passed
  • node scripts/validate-package-locale-keys.mjs: passed
  • node --check on both bundles: ok
  • git diff --check: clean

Manual verification notes

Nothing below has been tested on a device or in a running Engine yet:

  • Manually verify in Marinara Engine (staging) that Gacha Forge updates from 1.8.12 to 1.8.13 through Agents → Download Agents, and that it asks for the usual restart.
  • Manually verify in a world whose locations are named only in Korean (for example 달빛 숲, 수정 동굴) that each location's background paints and shows in the story.
  • Manually verify in a world with 숲 1 and 동굴 1 that the two places get different backgrounds.
  • Manually verify in an existing world painted on 1.8.12 that English-named locations, and locations with accented names, show their old backgrounds without painting new ones.
  • Manually verify on an iPhone in landscape (Safari) that the game's text is no larger than on a desktop at the same stage size, that the frame has no padding or border around the stage, and that Settings scrolls inside the game with tighter plates.
  • Manually verify on an iPhone in Safari that the fullscreen buttons (top bar and floating corner) are gone, and on desktop Chrome and Android Chrome that they are still there and still toggle fullscreen.
  • Manually verify on an Android phone with a display cutout, in landscape fullscreen, that the stage stays clear of the cutout.
  • Manually verify on a phone in portrait that the "Landscape only" notice and its button behave as before.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

The package README (packages/gacha-forge/README.md) gets its 1.8.13 release paragraph, and packages/gacha-forge/CHANGELOG.md gets its entry. The repository catalog README needs no change.

UI evidence (if applicable)

None yet. iPhone screenshots should come from the manual verification above.

@SpicyMarinara

Summary by CodeRabbit

  • Bug Fixes

    • Gacha Forge 1.8.13 improves background handling for places with non-Latin names and prevents existing backgrounds from being painted again.
    • Place lookup remains compatible with older saved places, without changing stored data.
    • Unsafe background slugs are rejected.
  • Improvements

    • Improved phone landscape layouts, including text sizing, compact screens, Settings panels, and fullscreen spacing.
    • The fullscreen button is hidden on iPhone Safari, where fullscreen mode is unsupported.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1470 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/gacha-forge-unicode-landscape` --- ### 📝 Commits (5) - [`a222c86`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a222c867e9737e9dbbc1208a44e6cd1e5ba57435) fix(gacha-forge): 1.8.13 — Unicode location IDs and iPhone landscape layout - [`3db7d84`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3db7d84b5601b44619485801873561a538f3e02b) Merge branch 'staging' into fix/gacha-forge-unicode-landscape - [`c452328`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c45232857713d4d21831af98218e6701cbcb2965) test(gacha-forge): compare the whole stored places document after gsPlaces - [`a053f35`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a053f35cd87af095858e0b125b9bfc51e8a1565f) Merge branch 'staging' into fix/gacha-forge-unicode-landscape - [`bccf908`](https://github.com/Pasta-Devs/Marinara-Agents/commit/bccf908d020f04c2a470ecdfeadd52d8b7add6a3) Merge branch 'staging' into fix/gacha-forge-unicode-landscape ### 📊 Changes **14 files changed** (+249 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+3 -0) ➕ `artifacts/gacha-forge-1.8.13.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/gacha-forge/CHANGELOG.md` (+5 -0) 📝 `packages/gacha-forge/README.md` (+2 -0) 📝 `packages/gacha-forge/client.js` (+28 -3) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+2 -2) ➕ `tests/gacha-forge-location-ids.regression.mjs` (+162 -0) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1460 Closes #1461 ## Why this change - **Pasta-Devs/Marinara-Agents#1460:** players who write their world in Korean never get location backgrounds. Gacha Forge builds a location's ID by keeping only `a-z0-9`, so `달빛 숲` becomes an empty ID. The server then skips the place and `/background` refuses it. Names that mix Hangul and digits lose the Hangul, so `숲 1` and `동굴 1` both become `1` and share one picture. The same happens in every non-Latin script. - **Pasta-Devs/Marinara-Agents#1461:** on an iPhone turned sideways, the game's text and panels come out oversized, and Settings has to scroll for a long way. Part of the cause is in the package itself. Its `:host { all: initial }` reset undoes the Engine's `-webkit-text-size-adjust: 100%`, so iPhone Safari enlarges the game's text when the phone turns to landscape. Also, the fullscreen button does nothing on iPhone, because iPhone Safari has no element fullscreen. ## What changed Package: `gacha-forge` 1.8.12 → **1.8.13** (patch; it is above every version the catalog has published). The rebuild covers the manifest, `artifacts/gacha-forge-1.8.13.zip`, the v2/v3/legacy catalog entries and `notes.json`. The package `CHANGELOG.md` and the package README's per-release paragraph are updated too. **How the bundles are produced.** `client.js` and `server.mjs` are pre-built esbuild bundles. Their source tree lives outside this repository (see the header of `scripts/build-gacha-forge-package.mjs`). That builder only re-derives hashes, the locale, the ZIP and the catalog from the committed bytes. The fix is therefore applied to the committed bundles, the same way every previous Gacha Forge release here was. This builder does not read an Engine checkout, so it needs no `MARINARA_ENGINE_ROOT` pin. Before any edit, I rebuilt the unchanged tree: it produced no diff, so the 1.8.12 build reproduces byte for byte. **The same changes need to be ported to the external source tree before the next bundle drop.** The new regression fails if a drop loses them. Location IDs (#1460): - The server's `gs()` and the client's `oc()` now run the same normalization. They apply NFC, trim and lowercase the name, and turn every run of characters outside `\p{L}\p{M}\p{N}` into `-`. The result is capped at 60 code points, so a surrogate pair is never split. **An ASCII name keeps exactly the ID it had before.** The regression checks this against the old function on 4000 random ASCII strings. - Combining marks (`\p{M}`) are kept as well as letters and digits. Without them, Hindi `काला` and `किला` (and Thai names that differ only by a tone mark) would still collide. - **Backgrounds that are already painted keep working.** The locations document is now read through `gsPlaces()`. It also answers to each stored place's new ID, computed from the stored name, and never overwrites a key that already exists. Writes still go to the raw document, so nothing is rewritten. A place painted under an old lossy ID (for example `ch-teau-rouge` for "Château Rouge") is still found, and `/locations` returns it under the ID the client now computes. Two names that used to collide stop sharing a picture. - `/background` goes through `bgSlug()`. It accepts Unicode IDs and refuses a slug that contains `/`, `\`, `..` or a control character (`\p{Cc}`). The IDs that `gs()` produces can never contain these anyway. - Before this change, the server's fuzzy location fold `ir()` (built on `gs()`) also dropped Hangul places while a chapter plan was being written. Those places now survive. iPhone landscape (#1461), using theme tokens only and no new colours or copy: - The arena turns iOS landscape text enlargement off again (`-webkit-text-size-adjust: 100%` and `text-size-adjust: 100%` on `.gf-arena` and its descendants). This also reaches the leaving screen's transition clone, whose own `:host` rule would reset it. - `.gf-arena` sets `max-height: 100vh` and then `max-height: 100dvh`, so the 16:9 stage is never fitted against a box taller than the visible screen. - A fullscreen arena pads by `env(safe-area-inset-*)` instead of `0`. Outside fullscreen the Engine's own shell already insets for the notch, so the arena does not add a second inset. - On `(orientation: landscape) and (max-height: 500px)`, the frame drops its padding, border and shadow so the stage gets every pixel. The Settings screen also tightens its body and plate padding, and its rail and pane still scroll inside the stage. - When the browser cannot honour element fullscreen (`requestFullscreen` is missing or `document.fullscreenEnabled === false`, as on iPhone Safari), the fullscreen toggles are removed and the bar is measured again. No new fullscreen button is added. - No orientation locking was added, and the 16:9 stage is unchanged. Regression: `tests/gacha-forge-location-ids.regression.mjs` runs the shipped `gs`, `ir`, `bgSlug`, `gsPlaces` and `oc` code taken from the committed bundles, and pins the landscape rules. It is wired into `pull-request-checks.yml`. Run against the 1.8.12 bundles, it fails. ## Package and security impact - Affected package IDs: `gacha-forge` - Engine compatibility impact: none. The range (`>=2.4.4 <4.0.0`) and the Capability API are unchanged. - New or changed permissions/entrypoints: none. Executable `client.js` and `server.mjs` changed as described above. `/background` input validation is now stricter for `slug`. - Restart, storage, update, or uninstall impact: the stored locations documents are not rewritten. Old IDs are answered through aliases in memory. New backgrounds for non-ASCII names are filed under their Unicode ID. The usual restart applies after the update. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` Commands I actually ran on this branch: - `npm ci`: ok - `node scripts/build-gacha-forge-package.mjs` on the unchanged tree: no diff. After the change it built `gacha-forge 1.8.13` (artifact of 7843821 bytes), and a second rebuild was stable. - `npm run check`: exit 0. Prettier is clean, and ESLint reports 0 errors and none of the existing warnings come from the new test. - `node tests/gacha-forge-location-ids.regression.mjs`: passed. The same test fails against the `origin/staging` (1.8.12) bundles. - `node scripts/test-catalog-lanes.mjs`: passed - `node scripts/validate-package-locales.mjs`: passed - `node scripts/validate-catalog.mjs`: `Catalog lanes valid: v2=39, v3=39; legacy=v2` - `node scripts/tests/catalog-release-notes.regression.mjs`: OK - `node scripts/tests/catalog-generatedat-determinism.regression.mjs`: OK - `npm run test:security`: passed - `node scripts/validate-package-locale-keys.mjs`: passed - `node --check` on both bundles: ok - `git diff --check`: clean ### Manual verification notes Nothing below has been tested on a device or in a running Engine yet: - Manually verify in Marinara Engine (staging) that Gacha Forge updates from 1.8.12 to 1.8.13 through Agents → Download Agents, and that it asks for the usual restart. - Manually verify in a world whose locations are named only in Korean (for example `달빛 숲`, `수정 동굴`) that each location's background paints and shows in the story. - Manually verify in a world with `숲 1` and `동굴 1` that the two places get different backgrounds. - Manually verify in an existing world painted on 1.8.12 that English-named locations, and locations with accented names, show their old backgrounds without painting new ones. - Manually verify on an iPhone in landscape (Safari) that the game's text is no larger than on a desktop at the same stage size, that the frame has no padding or border around the stage, and that Settings scrolls inside the game with tighter plates. - Manually verify on an iPhone in Safari that the fullscreen buttons (top bar and floating corner) are gone, and on desktop Chrome and Android Chrome that they are still there and still toggle fullscreen. - Manually verify on an Android phone with a display cutout, in landscape fullscreen, that the stage stays clear of the cutout. - Manually verify on a phone in portrait that the "Landscape only" notice and its button behave as before. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation The package README (`packages/gacha-forge/README.md`) gets its 1.8.13 release paragraph, and `packages/gacha-forge/CHANGELOG.md` gets its entry. The repository catalog README needs no change. ## UI evidence (if applicable) None yet. iPhone screenshots should come from the manual verification above. @SpicyMarinara <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Gacha Forge 1.8.13 improves background handling for places with non-Latin names and prevents existing backgrounds from being painted again. * Place lookup remains compatible with older saved places, without changing stored data. * Unsafe background slugs are rejected. * **Improvements** * Improved phone landscape layouts, including text sizing, compact screens, Settings panels, and fullscreen spacing. * The fullscreen button is hidden on iPhone Safari, where fullscreen mode is unsupported. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:11:54 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1475
No description provided.