[PR #877] [MERGED] feat(gacha-forge): 1.8.1 — the chapter written ahead lives on the server, and the first week's fixes #1169

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/877
Author: @SonaGat3
Created: 9/15/2026
Status: ✅ Merged
Merged: 9/16/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feature/gacha-forge-1.8.1


📝 Commits (2)

  • b6efc3b feat(gacha-forge): 1.8.1 — the chapter written ahead lives on the server, and the first week's fixes
  • 40517af Merge branch 'staging' into feature/gacha-forge-1.8.1

📊 Changes

12 files changed (+221 additions, -175 deletions)

View changed files

➕ artifacts/gacha-forge-1.8.1.zip (+0 -0)
📝 catalog/catalog.json (+9 -9)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+9 -9)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+9 -9)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/gacha-forge/CHANGELOG.md (+8 -0)
📝 packages/gacha-forge/README.md (+2 -0)
📝 packages/gacha-forge/client.js (+70 -52)
📝 packages/gacha-forge/manifest.json (+6 -6)
📝 packages/gacha-forge/server.mjs (+90 -90)

📄 Description

Linked issue

Closes #875

Why this change

staging carries Gacha Forge 1.8.0. One structural fix and the bugs the first week of play turned up,
each measured before it was fixed.

The chapter written ahead died with the tab. The write-ahead chain ran in the client. The Engine
remounts a package's surface on every Home tab change, so switching tabs, closing Gacha Forge or changing
worlds killed it — and coming back restored the loading screen of the scene the chain was writing, then
opened a scene the player had not reached.

What changed

  • The chain runs on the server (preforgeChain): one job per chapter under the package's dedupe, in
    the background lane. It re-reads its state before every scene, so Cancel and the Settings switch stop
    it after the scene in flight, and a scene that does not land stops it; the key image is painted through
    the same function the /cg-art route uses. /preforge/start spends nothing while it runs; the chapter
    screen polls the view every 4s while it runs and the chapter is open.
  • A boot never restores a background job's loader. dedupe records whether a key was opened inside
    asBackground, /state lists those as generatingBackground, and the client's reconcile skips them.
  • A rebuilt scene opens at the line the reader is on, not at the mark it started from.
  • Top bar (Firefox): the icon buttons declare their width (--gf-btn, the row's height written once)
    and the currencies group cannot be narrower than its content. Measured in Playwright Firefox at 175%:
    spilled 105px windowed / 91px fullscreen → 26px / 22px to spare.
  • Scrollbars: the creator grid pads its right by the gap, the cards, lorebook and theme lists and the
    Settings lorebook list pad theirs. Measured: 0 → 17px, 6 → 12px, 0 → 10px.
  • Cast picker: two arrows per picked card move it inside the list the forge spends; the picked block
    always shows pick order. The Cast lorebook source has its own Expand, and a popup opened from Settings
    wears the pane's skin (st-skin) — the expanded lorebook list in Settings drew as bare text since 1.8.0.
  • Cast counter: the eight sentences count the featured banner's two cards and the opening cast's
    split (2 five-star, 3 four-star), from the constants.
  • Prompts: the record grammar and the hard language rule say the prose keeps the language's own
    spelling, never transliterated to ASCII; only the image fields are ASCII.

Generated outputs

packages/gacha-forge/client.js, server.mjs, manifest.json, the artifact zip, the catalog family and
the release-notes sidecars were re-derived by node scripts/build-gacha-forge-package.mjs from the
committed payload bytes. Nothing was hand-edited; re-running the builder after the commit leaves the tree
clean.

Package and security impact

  • capabilityApi stays at 1.10; engine range, permissions, contribution slots, assets and
    restartRequired are unchanged. The manifest fields that moved are version and
    builtAgainst.engineCommit (c64efcb6), verified by diffing against the staging manifest.
  • Routes: 113, none added, none removed. The new server work (preforgeChain, cgArtFor) runs
    behind the existing /preforge/* and /cg-art routes.
  • No new external services.
  • Payload: client.js 1.40 MB → 1.41 MB, server.mjs 476 KB → 478 KB, artifact 7.42 MiB → 7.42 MiB.

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

⚠️ Why the fourth box is unticked. 1.8.1 is not published, so it cannot be installed through the
Engine's download path. It was installed by sideload into a staging Engine (2.4.5, c64efcb6) and
played, which covers activation, the routes and the bundle — but not download or checksum verification.

Manual verification notes

  • Branch hygiene. Branched from the current origin/staging (66571772); git ls-files --eol | grep -c w/crlf → 0; git diff --check "origin/staging...HEAD" clean; the build is reproducible.
  • Repo checks run locally, in the workflow's order: npm run check (0 errors), test-catalog-lanes,
    validate-package-locales, validate-package-locale-keys, validate-catalog (38 packages, 24 agents,
    14 features), catalog-generatedat-determinism, catalog-release-notes, validate-pr-triage,
    test-owner-approval. ⚠️ npm run test:security fails on Windows for a reason unrelated to this
    change (catalog-path-safety.regression.mjs:15).
  • Package's own suite: eleven probes plus a 132-script bench compared run to run, all green. Every
    change carries a check verified failing with the bug reintroduced; the server chain is exercised on
    the routes with a fake model (it writes every owed scene by itself, a start while it runs spends no
    automatic start, its umbrella key is never listed as a generation), and the Firefox spill was measured
    in Playwright Firefox before and after.
  • Played and measured in a real world: the cast picker's arrows, the Cast lorebook popup (open, tick
    inside, close, the tick kept), the scrollbar air and the top bar, at 100% and 175% text.

Documentation impact

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

packages/gacha-forge/README.md gains the 1.8.1 paragraph; packages/gacha-forge/CHANGELOG.md gains
1.8.1. The repository README is unchanged.

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes

    • Chapter writing continues when switching tabs, closing the app, or changing worlds.
    • Returning to the app preserves the current scene and reading position.
    • Character accents and ñ are preserved in generated content.
    • Improved Firefox layout, scrollbar, and Settings display issues.
  • New Features

    • Character cards can be reordered.
    • Cast lorebooks can be expanded like World lorebooks.
    • Card counts now include featured-banner cards.
  • Release

    • Published Gacha Forge version 1.8.1.

🔄 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/877 **Author:** [@SonaGat3](https://github.com/SonaGat3) **Created:** 9/15/2026 **Status:** ✅ Merged **Merged:** 9/16/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feature/gacha-forge-1.8.1` --- ### 📝 Commits (2) - [`b6efc3b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b6efc3b5873f509efb6d557ebbbd2f0c856b5a66) feat(gacha-forge): 1.8.1 — the chapter written ahead lives on the server, and the first week's fixes - [`40517af`](https://github.com/Pasta-Devs/Marinara-Agents/commit/40517afecb5731a7c36a151b63156b8c7ea1b6dc) Merge branch 'staging' into feature/gacha-forge-1.8.1 ### 📊 Changes **12 files changed** (+221 additions, -175 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.8.1.zip` (+0 -0) 📝 `catalog/catalog.json` (+9 -9) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+9 -9) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+9 -9) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/gacha-forge/CHANGELOG.md` (+8 -0) 📝 `packages/gacha-forge/README.md` (+2 -0) 📝 `packages/gacha-forge/client.js` (+70 -52) 📝 `packages/gacha-forge/manifest.json` (+6 -6) 📝 `packages/gacha-forge/server.mjs` (+90 -90) </details> ### 📄 Description ## Linked issue Closes #875 ## Why this change `staging` carries Gacha Forge **1.8.0**. One structural fix and the bugs the first week of play turned up, each measured before it was fixed. **The chapter written ahead died with the tab.** The write-ahead chain ran in the client. The Engine remounts a package's surface on every Home tab change, so switching tabs, closing Gacha Forge or changing worlds killed it — and coming back restored the loading screen of the scene the chain was writing, then opened a scene the player had not reached. ## What changed - **The chain runs on the server** (`preforgeChain`): one job per chapter under the package's dedupe, in the background lane. It re-reads its state before every scene, so Cancel and the Settings switch stop it after the scene in flight, and a scene that does not land stops it; the key image is painted through the same function the `/cg-art` route uses. `/preforge/start` spends nothing while it runs; the chapter screen polls the view every 4s while it runs and the chapter is open. - **A boot never restores a background job's loader.** `dedupe` records whether a key was opened inside `asBackground`, `/state` lists those as `generatingBackground`, and the client's reconcile skips them. - **A rebuilt scene opens at the line the reader is on**, not at the mark it started from. - **Top bar (Firefox):** the icon buttons declare their width (`--gf-btn`, the row's height written once) and the currencies group cannot be narrower than its content. Measured in Playwright Firefox at 175%: spilled 105px windowed / 91px fullscreen → 26px / 22px to spare. - **Scrollbars:** the creator grid pads its right by the gap, the cards, lorebook and theme lists and the Settings lorebook list pad theirs. Measured: 0 → 17px, 6 → 12px, 0 → 10px. - **Cast picker:** two arrows per picked card move it inside the list the forge spends; the picked block always shows pick order. The Cast lorebook source has its own Expand, and a popup opened from Settings wears the pane's skin (`st-skin`) — the expanded lorebook list in Settings drew as bare text since 1.8.0. - **Cast counter:** the eight sentences count the featured banner's two cards and the opening cast's split (2 five-star, 3 four-star), from the constants. - **Prompts:** the record grammar and the hard language rule say the prose keeps the language's own spelling, never transliterated to ASCII; only the image fields are ASCII. ### Generated outputs `packages/gacha-forge/client.js`, `server.mjs`, `manifest.json`, the artifact zip, the catalog family and the release-notes sidecars were **re-derived** by `node scripts/build-gacha-forge-package.mjs` from the committed payload bytes. Nothing was hand-edited; re-running the builder after the commit leaves the tree clean. ## Package and security impact - **`capabilityApi` stays at 1.10**; `engine` range, permissions, contribution slots, assets and `restartRequired` are unchanged. The manifest fields that moved are `version` and `builtAgainst.engineCommit` (`c64efcb6`), verified by diffing against the `staging` manifest. - **Routes: 113, none added, none removed.** The new server work (`preforgeChain`, `cgArtFor`) runs behind the existing `/preforge/*` and `/cg-art` routes. - **No new external services.** - **Payload:** `client.js` 1.40 MB → 1.41 MB, `server.mjs` 476 KB → 478 KB, artifact 7.42 MiB → 7.42 MiB. ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [x] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [x] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` > ⚠️ **Why the fourth box is unticked.** 1.8.1 is not published, so it cannot be installed *through* the > Engine's download path. It was installed by sideload into a `staging` Engine (2.4.5, `c64efcb6`) and > played, which covers activation, the routes and the bundle — but not download or checksum verification. ### Manual verification notes - **Branch hygiene.** Branched from the current `origin/staging` (`66571772`); `git ls-files --eol | grep -c w/crlf` → **0**; `git diff --check "origin/staging...HEAD"` clean; the build is reproducible. - **Repo checks run locally, in the workflow's order:** `npm run check` (0 errors), `test-catalog-lanes`, `validate-package-locales`, `validate-package-locale-keys`, `validate-catalog` (38 packages, 24 agents, 14 features), `catalog-generatedat-determinism`, `catalog-release-notes`, `validate-pr-triage`, `test-owner-approval`. ⚠️ `npm run test:security` fails on Windows for a reason unrelated to this change (`catalog-path-safety.regression.mjs:15`). - **Package's own suite:** eleven probes plus a 132-script bench compared run to run, all green. Every change carries a check verified failing with the bug reintroduced; the server chain is exercised on the routes with a fake model (it writes every owed scene by itself, a start while it runs spends no automatic start, its umbrella key is never listed as a generation), and the Firefox spill was measured in Playwright Firefox before and after. - **Played and measured in a real world:** the cast picker's arrows, the Cast lorebook popup (open, tick inside, close, the tick kept), the scrollbar air and the top bar, at 100% and 175% text. ## Documentation impact - [x] Updated this README catalog and package guidance - [ ] No documentation changes needed - [ ] Updated linked Marinara Engine documentation `packages/gacha-forge/README.md` gains the 1.8.1 paragraph; `packages/gacha-forge/CHANGELOG.md` gains 1.8.1. The repository README is unchanged. ## UI evidence (if applicable) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Chapter writing continues when switching tabs, closing the app, or changing worlds. * Returning to the app preserves the current scene and reading position. * Character accents and ñ are preserved in generated content. * Improved Firefox layout, scrollbar, and Settings display issues. * **New Features** * Character cards can be reordered. * Cast lorebooks can be expanded like World lorebooks. * Card counts now include featured-banner cards. * **Release** * Published Gacha Forge version 1.8.1. <!-- 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:04:27 +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#1169
No description provided.