mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2430] [MERGED] Keep just-completed quests on tracker re-run #5605
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5605
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2430
Author: @Romuromylus
Created: 6/6/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Romuromylus
Base:
refactor← Head:fix/quest-rerun-keep-completed📝 Commits (2)
a4d85bfKeep just-completed quests on tracker re-run032b937Thread quest auto-remove through the client so per-turn callers keep removing📊 Changes
4 files changed (+33 additions, -11 deletions)
View changed files
📝
src/engine/generation/start-generation.ts(+3 -0)📝
src/engine/generation/tracker-snapshots.ts(+13 -2)📝
src/engine/shared/game-state/player-stats.ts(+10 -7)📝
src/features/runtime/generation/hooks/use-generate.ts(+7 -2)📄 Description
Linked issue
Closes #2373
Why this change
applyQuestUpdatesToPlayerStatsdropped main'sautoRemoveFullyCompletedopt-out, so the fully-completed-quest splice ran unconditionally. Clicking the quest-refresh / re-run tracker button silently removed quests the user had just completed, whereas main keeps them visible until the next normal turn.What changed
src/engine/shared/game-state/player-stats.ts: re-added anoptions?: { autoRemoveFullyCompleted?: boolean }param toapplyQuestUpdatesToPlayerStatsand gated the fully-completed splice behind it (default = keep).src/engine/generation/tracker-snapshots.ts+src/engine/generation/start-generation.ts: threaded anautoRemoveFullyCompletedQuestsflag throughpersistTrackerSnapshotSafely→persistTrackerSnapshotForTurn→gameStatePatchFromAgentResult→ the engine fn. The per-turn persist site passestrue(remove — unchanged normal-turn behavior); the single-tracker re-run persist site keeps the defaultfalse(keep), restoring main's two-route split.Refactor impact
Primary owner: engine generation (world-state / game-state)
Impact areas reviewed:
src/engine/shared/game-state/player-stats.ts(applyQuestUpdatesToPlayerStats)src/engine/generation/tracker-snapshots.ts,src/engine/generation/start-generation.ts(persist threading)Boundary notes:
persistTrackerSnapshotSafelycallers — per-turn (passestrue) and re-run (defaultfalse).Pressure points touched:
Validation
pnpm checkpasses before PR push/handoffManual verification notes
pnpm vitest run— local-only tests confirmedapplyQuestUpdatesToPlayerStatskeeps a fully-completed quest by default and with{ autoRemoveFullyCompleted: false }, and removes it withtrue.tracker-snapshots.test.ts— 4 passed (no persist-path regression).pnpm exec tsc -b— clean.Feature Discoverability
src/features/shell/discovery/Reason:
Docs and release impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.