[PR #7290] [MERGED] fix(trackers): Clear Trackers removes Tracker Panel edits on every swipe #7665

Closed
opened 2026-10-24 04:06:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix/tracker-manual-edit-base-behaviour-followup


📝 Commits (2)

  • c81dd84 fix(trackers): Clear Trackers removes Tracker Panel edits on every swipe
  • 62a470b Merge origin/staging into fix/tracker-manual-edit-base-behaviour-followup

📊 Changes

3 files changed (+40 additions, -3 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/server/src/routes/chats.routes.ts (+4 -3)
📝 scripts/regressions/tracker-manual-edit-base.regression.ts (+35 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7286 (follow-up to #7288, which is merged)

Why this change

#7288 makes a regeneration start from the Tracker Panel edits on any swipe of the reply it replaces. Clear Trackers still wiped only the edit record of the swipe on screen.

In a real browser this brought a cleared correction back:

  1. Regenerate a reply.
  2. Go back to the first swipe and set Temperature to "Scorching". The second swipe has no temperature.
  3. Go to the second swipe, open Agent activity → Clear Trackers, confirm, then regenerate.

The new prompt said "Scorching" again. The confirmation asks "Clear all trackers for this chat?", so an edit should not survive it.

#7288's newest-edit fix retires an edit only when Clear actually changes that value on the cleared swipe. A value that swipe already had empty, such as the temperature above, was never retired.

What changed

  • packages/server/src/routes/chats.routes.ts: clearOverrides (sent only by Clear Trackers) now wipes manualOverrides on every snapshot row of the chat that has one, not only on the row it cleared.
  • scripts/regressions/tracker-manual-edit-base.regression.ts: a new case repeats the steps above and sends the payload the Clear Trackers button sends. It fails on origin/staging (a regeneration after Clear Trackers does not show temp-hot) and passes with this change.
  • CHANGELOG entry at the top of [Unreleased].

The row data is unchanged: Clear still empties only the swipe on screen, as before. No docs change: the guide already says the next reply starts from your corrected values.

Local CodeRabbit (coderabbit review --agent --committed) raised one finding. It suggested limiting the wipe to the cleared reply's swipes. That was not done:

  • The dialog clears all trackers for this chat, and the code comment says "Wipe all manual overrides".
  • An edit kept on an older reply would come back if that reply is regenerated after later messages are deleted. That is the same kind of resurrection this PR fixes.

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

Agent-run checks (for the reviewer to confirm, not ticked):

  • pnpm check exited 0.
  • tracker-manual-edit-base regression: fails on staging, passes with the fix.
  • 29 related regressions passed, among them:
    • tracker-sections, agent-context-generation, roleplay-swipe-media;
    • the regeneration-context files;
    • checkpoint, game-tool, inventory, ruleset and combat-director.
  • Browser check of the steps above, using the real World State package and a fake provider:
    • On staging, the prompt still contains "Scorching" (desktop-chromium).
    • With the fix, it contains "Old town" and not "Scorching" (desktop-chromium, mobile-chromium, mobile-webkit).

Manual verification notes

  • Manually verify in the browser: on a reply with two swipes, correct a value in the Tracker Panel on the first swipe that the second swipe does not have. Switch to the second swipe, run Clear Trackers, and regenerate. Peek Prompt and the new swipe should not show the corrected value.
  • Manually verify that Clear Trackers still empties the panel for the swipe on screen, and that other swipes still show their own values when you swipe to them.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

Summary by CodeRabbit

  • Bug Fixes
    • Clear Trackers now removes manual corrections from all swipes in a chat, not just the active swipe.
    • After clearing trackers, regenerating a reply no longer brings back corrections made on another swipe.

🔄 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/7290 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/tracker-manual-edit-base-behaviour-followup` --- ### 📝 Commits (2) - [`c81dd84`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c81dd84bb3fd3b34496ce0b8e69e8fff061dc036) fix(trackers): Clear Trackers removes Tracker Panel edits on every swipe - [`62a470b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/62a470b534daa0e569599bdc440822a782f9dd02) Merge origin/staging into fix/tracker-manual-edit-base-behaviour-followup ### 📊 Changes **3 files changed** (+40 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/server/src/routes/chats.routes.ts` (+4 -3) 📝 `scripts/regressions/tracker-manual-edit-base.regression.ts` (+35 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #7286 (follow-up to #7288, which is merged) ## Why this change #7288 makes a regeneration start from the Tracker Panel edits on **any** swipe of the reply it replaces. **Clear Trackers** still wiped only the edit record of the swipe on screen. In a real browser this brought a cleared correction back: 1. Regenerate a reply. 2. Go back to the first swipe and set **Temperature** to "Scorching". The second swipe has no temperature. 3. Go to the second swipe, open **Agent activity → Clear Trackers**, confirm, then regenerate. The new prompt said "Scorching" again. The confirmation asks "Clear all trackers for this chat?", so an edit should not survive it. #7288's newest-edit fix retires an edit only when Clear actually changes that value on the cleared swipe. A value that swipe already had empty, such as the temperature above, was never retired. ## What changed - `packages/server/src/routes/chats.routes.ts`: `clearOverrides` (sent only by Clear Trackers) now wipes `manualOverrides` on every snapshot row of the chat that has one, not only on the row it cleared. - `scripts/regressions/tracker-manual-edit-base.regression.ts`: a new case repeats the steps above and sends the payload the Clear Trackers button sends. It fails on `origin/staging` (`a regeneration after Clear Trackers does not show temp-hot`) and passes with this change. - CHANGELOG entry at the top of `[Unreleased]`. The row data is unchanged: Clear still empties only the swipe on screen, as before. No docs change: the guide already says the next reply starts from your corrected values. **Local CodeRabbit** (`coderabbit review --agent --committed`) raised one finding. It suggested limiting the wipe to the cleared reply's swipes. That was not done: - The dialog clears all trackers for this chat, and the code comment says "Wipe all manual overrides". - An edit kept on an older reply would come back if that reply is regenerated after later messages are deleted. That is the same kind of resurrection this PR fixes. ## 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` Agent-run checks (for the reviewer to confirm, not ticked): - `pnpm check` exited 0. - `tracker-manual-edit-base` regression: fails on staging, passes with the fix. - 29 related regressions passed, among them: - `tracker-sections`, `agent-context-generation`, `roleplay-swipe-media`; - the regeneration-context files; - checkpoint, game-tool, inventory, ruleset and combat-director. - Browser check of the steps above, using the real World State package and a fake provider: - On staging, the prompt still contains "Scorching" (desktop-chromium). - With the fix, it contains "Old town" and not "Scorching" (desktop-chromium, mobile-chromium, mobile-webkit). ### Manual verification notes - Manually verify in the browser: on a reply with two swipes, correct a value in the Tracker Panel on the first swipe that the second swipe does not have. Switch to the second swipe, run **Clear Trackers**, and regenerate. Peek Prompt and the new swipe should not show the corrected value. - Manually verify that **Clear Trackers** still empties the panel for the swipe on screen, and that other swipes still show their own values when you swipe to them. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Clear Trackers now removes manual corrections from all swipes in a chat, not just the active swipe. * After clearing trackers, regenerating a reply no longer brings back corrections made on another swipe. <!-- 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-24 04:06:19 +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#7665
No description provided.