[PR #5975] [MERGED] fix(game): preserve regenerated anchors and filter hidden turns #7008

Closed
opened 2026-10-23 04:15:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5975
Author: @SpicyMarinara
Created: 9/8/2026
Status: ✅ Merged
Merged: 9/8/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/game-hidden-turns-5926-5927


📝 Commits (2)

  • 48d602f chore: start hidden game turn fixes (#5926, #5927)
  • 347f025 fix(game): preserve command-only swipes and hide anchors consistently

📊 Changes

9 files changed (+170 additions, -33 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 e2e/game-verb-only-turn.e2e.ts (+8 -0)
📝 packages/client/src/components/game/GameNarration.tsx (+4 -23)
📝 packages/client/src/components/game/GameSurface.tsx (+8 -3)
📝 packages/client/src/lib/chat-message-visibility.ts (+10 -0)
📝 packages/server/src/routes/generate.routes.ts (+10 -7)
📝 packages/server/src/services/storage/chats.storage.ts (+1 -0)
➕ scripts/regressions/command-only-regenerate.regression.ts (+118 -0)
📝 scripts/regressions/spatial-only-message-visibility.regression.ts (+9 -0)

📄 Description

Linked issue

Closes #5926
Closes #5927

Why this change

A command-only regeneration appended an unrelated hidden message instead of adding a swipe to the requested turn. Game narration skipped hidden rows, while its latest-turn lookups and Logs modal still read them.

What changed

  • Reuse the existing swipe path for command-only regenerations in Conversation and Game, preserving message identity and each swipe's visibility. A later prose swipe becomes visible; explicitly hidden ordinary messages keep their existing visibility.
  • Share the Game visibility predicate across narration, turn navigation, intro/progress/storyboard lookups, and both log views.
  • Add a real local-provider generation/storage regression, visibility cases, and a browser assertion that hidden continuity notes stay out of session logs. Add an Unreleased changelog entry.

Validation

Automated checks completed:

  • pnpm check passed (one pre-existing React hook dependency warning).

  • node scripts/run-regressions.mjs --filter command-only-regenerate passed; it fails on unchanged staging because the first regeneration appends a third message.

  • --filter spatial-only-message-visibility and --filter capability-gm-verb-runtime passed.

  • pnpm smoke:ui e2e/game-verb-only-turn.e2e.ts --project=desktop-chromium passed. Inspected the resulting session-log screenshot: two readable narration turns, no hidden continuity note.

  • pnpm check passes locally

  • Container (Docker / Podman) built and ran without issue

  • Ran the app, clicked through the changes manually

  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)

  • Above manual verification completed (describe below)

  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify a installed-package GM verb-only regeneration, navigate between its swipes, then regenerate prose. The storage/route regression uses Conversation commands to exercise the common save branch; package verb execution is covered separately by its existing runtime suite.
  • Manually verify Game logs, intro restoration, storyboards and pre-combat return in an existing campaign on mobile and both themes. These checks are not claimed as completed.

Docs and release impact

Only the Unreleased changelog changes; no release/version or user-guide changes.

UI evidence (if applicable)

Automated desktop screenshot inspected locally (game-visible-logs.png). No visual styling or UI copy changes.

Summary by CodeRabbit

  • Bug Fixes

    • Command-only regenerations now save swipes on the original turn instead of creating hidden rows.
    • Game narration, storyboards, turn progress, combat logs, and session logs now skip hidden, command-only, and empty turns.
    • Regenerated prose from command-only turns now appears as a visible swipe.
    • Session Logs now correctly display readable narrations while excluding hidden continuity notes.
  • Tests

    • Added coverage for command-only regeneration, swipe restoration, visibility handling, and session log behavior.

🔄 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-Engine/pull/5975 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/8/2026 **Status:** ✅ Merged **Merged:** 9/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/game-hidden-turns-5926-5927` --- ### 📝 Commits (2) - [`48d602f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/48d602fc05a4830123cc87e9e53d4efb4547cfd7) chore: start hidden game turn fixes (#5926, #5927) - [`347f025`](https://github.com/Pasta-Devs/Marinara-Engine/commit/347f025c57a4d8c9db8280b65f08e23f38f91c91) fix(game): preserve command-only swipes and hide anchors consistently ### 📊 Changes **9 files changed** (+170 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `e2e/game-verb-only-turn.e2e.ts` (+8 -0) 📝 `packages/client/src/components/game/GameNarration.tsx` (+4 -23) 📝 `packages/client/src/components/game/GameSurface.tsx` (+8 -3) 📝 `packages/client/src/lib/chat-message-visibility.ts` (+10 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+10 -7) 📝 `packages/server/src/services/storage/chats.storage.ts` (+1 -0) ➕ `scripts/regressions/command-only-regenerate.regression.ts` (+118 -0) 📝 `scripts/regressions/spatial-only-message-visibility.regression.ts` (+9 -0) </details> ### 📄 Description ## Linked issue Closes #5926 Closes #5927 ## Why this change A command-only regeneration appended an unrelated hidden message instead of adding a swipe to the requested turn. Game narration skipped hidden rows, while its latest-turn lookups and Logs modal still read them. ## What changed - Reuse the existing swipe path for command-only regenerations in Conversation and Game, preserving message identity and each swipe's visibility. A later prose swipe becomes visible; explicitly hidden ordinary messages keep their existing visibility. - Share the Game visibility predicate across narration, turn navigation, intro/progress/storyboard lookups, and both log views. - Add a real local-provider generation/storage regression, visibility cases, and a browser assertion that hidden continuity notes stay out of session logs. Add an Unreleased changelog entry. ## Validation Automated checks completed: - `pnpm check` passed (one pre-existing React hook dependency warning). - `node scripts/run-regressions.mjs --filter command-only-regenerate` passed; it fails on unchanged staging because the first regeneration appends a third message. - `--filter spatial-only-message-visibility` and `--filter capability-gm-verb-runtime` passed. - `pnpm smoke:ui e2e/game-verb-only-turn.e2e.ts --project=desktop-chromium` passed. Inspected the resulting session-log screenshot: two readable narration turns, no hidden continuity note. - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify a installed-package GM verb-only regeneration, navigate between its swipes, then regenerate prose. The storage/route regression uses Conversation commands to exercise the common save branch; package verb execution is covered separately by its existing runtime suite. - Manually verify Game logs, intro restoration, storyboards and pre-combat return in an existing campaign on mobile and both themes. These checks are not claimed as completed. ## Docs and release impact Only the Unreleased changelog changes; no release/version or user-guide changes. ## UI evidence (if applicable) Automated desktop screenshot inspected locally (`game-visible-logs.png`). No visual styling or UI copy changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Command-only regenerations now save swipes on the original turn instead of creating hidden rows. * Game narration, storyboards, turn progress, combat logs, and session logs now skip hidden, command-only, and empty turns. * Regenerated prose from command-only turns now appears as a visible swipe. * Session Logs now correctly display readable narrations while excluding hidden continuity notes. * **Tests** * Added coverage for command-only regeneration, swipe restoration, visibility handling, and session log behavior. <!-- 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-23 04:15:41 +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-Engine#7008
No description provided.