[PR #904] [MERGED] Fix Game Mode log review after deleting entries #4829

Closed
opened 2026-10-22 04:11:00 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/904
Author: @cha1latte
Created: 5/15/2026
Status: ✅ Merged
Merged: 5/15/2026
Merged by: @cha1latte

Base: staging ← Head: fix/issue-897-game-log-delete


📝 Commits (1)

  • 9b5e2c6 Fix game log review deletion offset

📊 Changes

4 files changed (+18 additions, -0 deletions)

View changed files

➕ docs/pr-evidence/issue-897/after.png (+0 -0)
➕ docs/pr-evidence/issue-897/before.png (+0 -0)
➕ docs/pr-evidence/issue-897/edge-delete-older.png (+0 -0)
📝 packages/client/src/components/game/GameNarration.tsx (+18 -0)

📄 Description

Linked issue

Closes #897

Why this change

  • Deleting a Game Mode log segment while reviewing previous log entries could make the review cursor jump backward to an older line instead of preserving the remaining log flow.

What changed

  • Added a stable source key for flat Game Mode log review entries.
  • When deleting a segment at or after the current review entry, step the review cursor forward before applying the delete so the next surviving line remains selected.
  • Added committed before/after evidence for the repro and an older-line deletion edge case.

Validation

  • 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

  • Codex reproduced the original issue with C:\Users\celia\AppData\Local\Programs\Python\Python310\python.exe scratch\issue-897-log-delete-repro.py --expect broken --screenshot scratch\issue-897-before.png: reviewing the third log line and deleting that line rewound the active line to Second torch line.
  • Codex verified the fix with C:\Users\celia\AppData\Local\Programs\Python\Python310\python.exe scratch\issue-897-log-delete-repro.py --expect fixed --screenshot scratch\issue-897-after.png: the same delete advances to Fourth door line.
  • Codex verified the older-entry edge case with C:\Users\celia\AppData\Local\Programs\Python\Python310\python.exe scratch\issue-897-log-delete-repro.py --expect fixed --delete-text "Second torch line." --fixed-after "Third dialogue line." --screenshot scratch\issue-897-edge-delete-older.png: deleting an older visible log line keeps the reviewed third line selected.
  • Codex ran pnpm check; the first run hit the 124s shell timeout, then the rerun with a longer timeout passed.
  • Raw GitHub evidence URLs were checked with curl.exe -I and returned HTTP 200.
  • Bunny review pass: no blocking findings; branch is based on upstream/staging, diff is focused, proof exercises the changed path directly, and no schema/version/dependency/server changes are included.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Before, deleting the reviewed third line rewound to an older line:

Before: Game Mode log deletion rewinds to an earlier line

After, deleting the reviewed third line advances to the next surviving line:

After: Game Mode log deletion advances to the next surviving line

Edge case, deleting an older visible line keeps the current review line selected:

Edge: deleting an older visible line keeps the reviewed line selected


🔄 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/904 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/15/2026 **Status:** ✅ Merged **Merged:** 5/15/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/issue-897-game-log-delete` --- ### 📝 Commits (1) - [`9b5e2c6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9b5e2c627d160fd5e008a13b7d7a713ed8569f12) Fix game log review deletion offset ### 📊 Changes **4 files changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-897/after.png` (+0 -0) ➕ `docs/pr-evidence/issue-897/before.png` (+0 -0) ➕ `docs/pr-evidence/issue-897/edge-delete-older.png` (+0 -0) 📝 `packages/client/src/components/game/GameNarration.tsx` (+18 -0) </details> ### 📄 Description ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #897 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Deleting a Game Mode log segment while reviewing previous log entries could make the review cursor jump backward to an older line instead of preserving the remaining log flow. ## What changed <!-- List the key changes in this PR --> - Added a stable source key for flat Game Mode log review entries. - When deleting a segment at or after the current review entry, step the review cursor forward before applying the delete so the next surviving line remains selected. - Added committed before/after evidence for the repro and an older-line deletion edge case. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `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 <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex reproduced the original issue with `C:\Users\celia\AppData\Local\Programs\Python\Python310\python.exe scratch\issue-897-log-delete-repro.py --expect broken --screenshot scratch\issue-897-before.png`: reviewing the third log line and deleting that line rewound the active line to `Second torch line.` - Codex verified the fix with `C:\Users\celia\AppData\Local\Programs\Python\Python310\python.exe scratch\issue-897-log-delete-repro.py --expect fixed --screenshot scratch\issue-897-after.png`: the same delete advances to `Fourth door line.` - Codex verified the older-entry edge case with `C:\Users\celia\AppData\Local\Programs\Python\Python310\python.exe scratch\issue-897-log-delete-repro.py --expect fixed --delete-text "Second torch line." --fixed-after "Third dialogue line." --screenshot scratch\issue-897-edge-delete-older.png`: deleting an older visible log line keeps the reviewed third line selected. - Codex ran `pnpm check`; the first run hit the 124s shell timeout, then the rerun with a longer timeout passed. - Raw GitHub evidence URLs were checked with `curl.exe -I` and returned HTTP 200. - Bunny review pass: no blocking findings; branch is based on `upstream/staging`, diff is focused, proof exercises the changed path directly, and no schema/version/dependency/server changes are included. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Before, deleting the reviewed third line rewound to an older line: ![Before: Game Mode log deletion rewinds to an earlier line](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/9b5e2c627d160fd5e008a13b7d7a713ed8569f12/docs/pr-evidence/issue-897/before.png) After, deleting the reviewed third line advances to the next surviving line: ![After: Game Mode log deletion advances to the next surviving line](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/9b5e2c627d160fd5e008a13b7d7a713ed8569f12/docs/pr-evidence/issue-897/after.png) Edge case, deleting an older visible line keeps the current review line selected: ![Edge: deleting an older visible line keeps the reviewed line selected](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/9b5e2c627d160fd5e008a13b7d7a713ed8569f12/docs/pr-evidence/issue-897/edge-delete-older.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:00 +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#4829
No description provided.