mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2373] [Issue]: Quest-tracker re-run removes just-completed quests that main keeps visible (autoRemoveFullyCompleted opt-out deleted) #1175
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#1175
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?
Originally created by @Romuromylus on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2373
Originally assigned to: @Romuromylus on GitHub.
Summary
Severity: Low — correctness (regression vs main). The refactor deleted the
autoRemoveFullyCompletedopt-out fromapplyQuestUpdatesToPlayerStats, so it now unconditionally removes a fully-completed quest fromactiveQuests. When the user presses the per-section quest refresh button in the roleplay Quest panel, a just-completed quest is dropped from the tracker. Main's re-run path keeps it visible (with line-through styling) until the next normal turn.Expected behavior
Pressing the quest-tracker refresh button in the roleplay HUD should match main: a freshly-completed quest stays visible in the tracker (shown completed / struck-through) on a manual re-run, and is removed on the next normal generation turn — not removed immediately on the re-run click.
Actual behavior
src/engine/shared/game-state/player-stats.ts:307-355—applyQuestUpdatesToPlayerStatshas nooptionsparameter; lines 343-351 unconditionally splice out any completed quest:Both refactor call sites funnel through it with no gate: the per-turn persist path (
src/engine/generation/tracker-snapshots.ts:476, viapersistTrackerSnapshotForTurn) and the client apply path (src/features/runtime/generation/hooks/use-generate.ts:792). So on refactor both per-turn and the manual re-run remove completed quests.Reachability:
RoleplayHUDQuestsTrackerSection.tsx:55-59rendersTrackerSectionRefreshwithagentType = TRACKER_SECTION_AGENT_TYPES.quests(resolves to"quest"),use-tracker-rerun.ts:30gate passes, thenretryAgents→retryGenerationAgents(server-side removes) +applyQuestUpdates(client removes).Steps to reproduce
completed = true, all objectives done).Impact area
Environment
330f69a8Logs, screenshots, or video
Static source audit, cited to
src/engine/shared/game-state/player-stats.ts:343-351and call sitesrc/engine/generation/tracker-snapshots.ts:476.Regression notes
Regression vs main — worked on main, broken on refactor. On main,
applyQuestUpdatesToPlayerStatstakesoptions: { autoRemoveFullyCompleted?: boolean } = {}and only splices completed quests whenoptions.autoRemoveFullyCompleted === true(packages/shared/src/utils/quest-state.ts:219-265). Call-site map:packages/server/src/routes/generate.routes.ts:9237passes{ autoRemoveFullyCompleted: true }(removes).packages/server/src/routes/generate/retry-agents-route.ts:1642omits it (keeps).packages/client/src/hooks/use-generate.ts:1148and client retry:1970both omit it (keep).So on main the re-run/refresh button keeps a completed quest visible; the refactor dropped the option entirely and removes on the first re-run.
Additional context
This is a narrow visual-persistence delta, not lost editable data: on main the same completed quest is removed on the very next normal turn (per-turn passes
autoRemoveFullyCompleted: true), so it only stays visible slightly longer across manual quest-refresh clicks. It changes what tracker rows the user sees, hence a regression, but minor.Fix sketch: re-add
options: { autoRemoveFullyCompleted?: boolean } = {}toapplyQuestUpdatesToPlayerStats, gate the343-351splice behindoptions.autoRemoveFullyCompleted === true, pass{ autoRemoveFullyCompleted: true }from the per-turn/persist paths, and omit it on the single-tracker re-run path to match main.Not a duplicate of #2317 / #2327 / #2294.
Template check
@Romuromylus commented on GitHub (Jun 6, 2026):
Fixed by #2430, merged into
refactor.