[PR #1776] [MERGED] fix(gacha-forge): play written scenes during pre-forge, and no blank on upgrade (1.25.1) #1961

Closed
opened 2026-11-07 16:38:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix/gacha-forge-play-while-forging


📝 Commits (4)

  • 7fcd1ae fix(gacha-forge): play written scenes while pre-forge writes, and hold upgrade views until loaded (1.25.1)
  • 9c84837 Merge remote-tracking branch 'origin/staging' into fix/gacha-forge-play-while-forging
  • 10c4bd6 test(gacha-forge): pin the chapter map redraw after the pre-forge resume read
  • 53e6a0d docs(gacha-forge): say a scene opened before its art waits for that paint

📊 Changes

16 files changed (+335 additions, -59 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+1 -0)
➕ artifacts/gacha-forge-1.25.1.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/gacha-forge/CHANGELOG.md (+5 -0)
📝 packages/gacha-forge/README.md (+7 -1)
📝 packages/gacha-forge/bundle-patches.json (+58 -0)
📝 packages/gacha-forge/client.js (+7 -7)
📝 packages/gacha-forge/manifest.json (+5 -5)
📝 packages/gacha-forge/server.mjs (+2 -2)
📝 packages/gacha-forge/src/preforge-art-server.mjs (+2 -2)
➕ tests/gacha-forge-play-while-forging.regression.mjs (+206 -0)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.

Linked issue

Fixes #1772
Fixes #1773

Why this change

The maintainer reported two problems:

  • "I should be able to play the story beats that were already written and prepared while the others are still forging."
  • "When I open a weapon to upgrade it, the image for it flickers and then disappears."

Pre-forge. The server already serves written scenes at once: /story/start returns resumed with no Vigor charge, and /beat returns the cached segments. The block was in the client. While /preforge reported locked, which stays true while any scene in the chapter is unwritten, the chapter map renderer (Zd) replaced every node's Play, Start and Read again with a status label until the whole chapter was written.

Upgrade flicker. A weapon's Upgrade on a character's Gear tab opens the weapon's page, and a relic Upgrade reloads the relics. Both are same-screen changes, held by _holdSwap, which released on a fixed 250 ms timer even while the new view was loading. When /unit or /relics was slower than that, for example while a chapter forged in the background, the character portrait or relic art cut to an empty loader. The relic being upgraded was also drawn at 34% opacity.

What changed

Package gacha-forge 1.25.1, client only (ledger edits to client.js; server.mjs changes only by a source comment).

  • The chapter map stays playable during pre-forge:
    • Cleared scenes keep Read again.
    • The current fight keeps Start, and the current scene keeps Play once written (storyIndex < preforge.next).
    • An unwritten current scene and later nodes keep Written, Writing… or Queued, so pre-forge still writes the scene for free instead of the player paying 5 Vigor.
    • The pre-forge bar and Cancel stay.
    • The notice line now shows a failed start while pre-forge runs.
  • The progress poll resumes. It stops while a scene or fight is open. Returning to the map now reads /preforge once and resumes the poll when the chain is still writing, so the next scene turns into Play. Only a poll stopped by leaving the map resumes, so a failed read cannot loop.
  • Upgrade views hold until loaded.
    • _holdSwap keeps the old view while a unit or a relic Upgrade is still loading, as _holdScreen already does for screen changes.
    • A relic Upgrade opened while the screen still slides in ends that entrance first, so it is held too.
    • The relic being upgraded is shown at full strength.
  • Copy: the Settings hint and Help FAQ no longer say the chapter menu stays shut. The README has a 1.25.1 section, and the 1.23.0 Cancel wording is corrected.
  • Release: What's new (1.25.0 pinned), CHANGELOG, manifest, artifact and catalog. New CI regression: tests/gacha-forge-play-while-forging.regression.mjs.

Weapons still have no artwork of their own (by design: weapon banners have art:false, and /portrait is for characters), so a weapon's page shows the weapon-type silhouette.

Package and security impact

  • Affected package IDs: gacha-forge
  • Engine compatibility impact: none.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: none.

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

Manual verification notes

Agent-side checks:

  • All 70 tests/gacha-forge-*.regression.mjs files pass locally (543 tests). Prettier, eslint, node --check on both bundles and git diff --check are clean.

  • validate-catalog could not run locally (sparse worktree without artifacts/).

  • The new gacha-forge-play-while-forging regression slices the shipped client and checks four things:

    • the map in each pre-forge state;
    • the poll resume, including no loop on a failed read;
    • the same-screen hold for a loading unit and relic Upgrade, and the unchanged 250 ms release elsewhere;
    • the corrected copy.

    All of its cases fail on the 1.25.0 client.

  • A Playwright harness running the real client against the real server routes, at 600 ms latency, showed:

    • before the fix: a blank loader frame on Gear → weapon Upgrade and on relic Upgrade;
    • after the fix: no blank frame on either. The old view is held until the data arrives, then crossfades, including a relic Upgrade pressed while the screen slides in.
  • Before the fix was written, an investigation workflow traced the pre-forge block end to end against the real server bundle. It confirmed written scenes are served at once while the chain writes, and that a fight or scene the chain is producing joins that work instead of duplicating it.

  • An adversarial review of this change confirmed two findings, both fixed here: the stale Settings and Help copy, and the relic Upgrade during a screen's entrance. One more was refuted: a small choice restarting a stopped chain leaves the existing "Pre-forging stopped [Continue]" state. That predates this change, and Continue recovers it.

To verify by hand:

  • Manually verify with Pre-forge set to Story only: open a new chapter and, while the bar shows "Pre-forging story… 1 / N", play scene 1 with no Vigor charge.
  • Manually verify that after finishing scene 1 and returning to the map, Read again appears, and the next scene changes from Writing… to Play within about 4 s of being written.
  • Manually verify that a fight the chain is still designing can be started, and designs only once.
  • Manually verify pre-forge Cancel mid-chain, and the same flow in a Character Story.
  • Manually verify that Character → Gear → weapon Upgrade, and relic Upgrade from Inventory and Gear, keep the old view until loaded, with the upgraded relic not faded.

🤖 Generated with Claude Code


🔄 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/1776 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/gacha-forge-play-while-forging` --- ### 📝 Commits (4) - [`7fcd1ae`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7fcd1aef67c9919c617f3b5f48bb862119faa3f7) fix(gacha-forge): play written scenes while pre-forge writes, and hold upgrade views until loaded (1.25.1) - [`9c84837`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9c84837bcbad9435f459104275ff61319a431ea8) Merge remote-tracking branch 'origin/staging' into fix/gacha-forge-play-while-forging - [`10c4bd6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/10c4bd667f5bdc19929dcaf287f0adac5c35bfd0) test(gacha-forge): pin the chapter map redraw after the pre-forge resume read - [`53e6a0d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/53e6a0d4a6b8562576b83ecceedb97937e750555) docs(gacha-forge): say a scene opened before its art waits for that paint ### 📊 Changes **16 files changed** (+335 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+1 -0) ➕ `artifacts/gacha-forge-1.25.1.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/gacha-forge/CHANGELOG.md` (+5 -0) 📝 `packages/gacha-forge/README.md` (+7 -1) 📝 `packages/gacha-forge/bundle-patches.json` (+58 -0) 📝 `packages/gacha-forge/client.js` (+7 -7) 📝 `packages/gacha-forge/manifest.json` (+5 -5) 📝 `packages/gacha-forge/server.mjs` (+2 -2) 📝 `packages/gacha-forge/src/preforge-art-server.mjs` (+2 -2) ➕ `tests/gacha-forge-play-while-forging.regression.mjs` (+206 -0) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. ## Linked issue Fixes #1772 Fixes #1773 ## Why this change The maintainer reported two problems: - "I should be able to play the story beats that were already written and prepared while the others are still forging." - "When I open a weapon to upgrade it, the image for it flickers and then disappears." **Pre-forge.** The server already serves written scenes at once: `/story/start` returns `resumed` with no Vigor charge, and `/beat` returns the cached segments. The block was in the client. While `/preforge` reported `locked`, which stays true while any scene in the chapter is unwritten, the chapter map renderer (`Zd`) replaced every node's Play, Start and Read again with a status label until the whole chapter was written. **Upgrade flicker.** A weapon's Upgrade on a character's Gear tab opens the weapon's page, and a relic Upgrade reloads the relics. Both are same-screen changes, held by `_holdSwap`, which released on a fixed 250 ms timer even while the new view was loading. When `/unit` or `/relics` was slower than that, for example while a chapter forged in the background, the character portrait or relic art cut to an empty loader. The relic being upgraded was also drawn at 34% opacity. ## What changed Package `gacha-forge` 1.25.1, client only (ledger edits to `client.js`; `server.mjs` changes only by a source comment). - **The chapter map stays playable during pre-forge:** - Cleared scenes keep Read again. - The current fight keeps Start, and the current scene keeps Play once written (`storyIndex < preforge.next`). - An unwritten current scene and later nodes keep Written, Writing… or Queued, so pre-forge still writes the scene for free instead of the player paying 5 Vigor. - The pre-forge bar and Cancel stay. - The notice line now shows a failed start while pre-forge runs. - **The progress poll resumes.** It stops while a scene or fight is open. Returning to the map now reads `/preforge` once and resumes the poll when the chain is still writing, so the next scene turns into Play. Only a poll stopped by leaving the map resumes, so a failed read cannot loop. - **Upgrade views hold until loaded.** - `_holdSwap` keeps the old view while a unit or a relic Upgrade is still loading, as `_holdScreen` already does for screen changes. - A relic Upgrade opened while the screen still slides in ends that entrance first, so it is held too. - The relic being upgraded is shown at full strength. - **Copy:** the Settings hint and Help FAQ no longer say the chapter menu stays shut. The README has a 1.25.1 section, and the 1.23.0 Cancel wording is corrected. - **Release:** What's new (1.25.0 pinned), CHANGELOG, manifest, artifact and catalog. New CI regression: `tests/gacha-forge-play-while-forging.regression.mjs`. Weapons still have no artwork of their own (by design: weapon banners have `art:false`, and `/portrait` is for characters), so a weapon's page shows the weapon-type silhouette. ## Package and security impact - Affected package IDs: `gacha-forge` - Engine compatibility impact: none. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: none. ## 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` ### Manual verification notes Agent-side checks: - All 70 `tests/gacha-forge-*.regression.mjs` files pass locally (543 tests). Prettier, eslint, `node --check` on both bundles and `git diff --check` are clean. - `validate-catalog` could not run locally (sparse worktree without `artifacts/`). - The new `gacha-forge-play-while-forging` regression slices the shipped client and checks four things: - the map in each pre-forge state; - the poll resume, including no loop on a failed read; - the same-screen hold for a loading unit and relic Upgrade, and the unchanged 250 ms release elsewhere; - the corrected copy. All of its cases fail on the 1.25.0 client. - A Playwright harness running the real client against the real server routes, at 600 ms latency, showed: - before the fix: a blank loader frame on Gear → weapon Upgrade and on relic Upgrade; - after the fix: no blank frame on either. The old view is held until the data arrives, then crossfades, including a relic Upgrade pressed while the screen slides in. - Before the fix was written, an investigation workflow traced the pre-forge block end to end against the real server bundle. It confirmed written scenes are served at once while the chain writes, and that a fight or scene the chain is producing joins that work instead of duplicating it. - An adversarial review of this change confirmed two findings, both fixed here: the stale Settings and Help copy, and the relic Upgrade during a screen's entrance. One more was refuted: a small choice restarting a stopped chain leaves the existing "Pre-forging stopped [Continue]" state. That predates this change, and Continue recovers it. To verify by hand: - Manually verify with Pre-forge set to Story only: open a new chapter and, while the bar shows "Pre-forging story… 1 / N", play scene 1 with no Vigor charge. - Manually verify that after finishing scene 1 and returning to the map, Read again appears, and the next scene changes from Writing… to Play within about 4 s of being written. - Manually verify that a fight the chain is still designing can be started, and designs only once. - Manually verify pre-forge Cancel mid-chain, and the same flow in a Character Story. - Manually verify that Character → Gear → weapon Upgrade, and relic Upgrade from Inventory and Gear, keep the old view until loaded, with the upgraded relic not faded. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:38:21 +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#1961
No description provided.