[PR #2596] [MERGED] Lock tracker emoji edits and prune stale locks #5680

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2596
Author: @Xelvanis
Created: 6/16/2026
Status: ✅ Merged
Merged: 6/16/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/tracker-lock-emoji-and-prune-stale-locks


📝 Commits (2)

  • 8a88771 fix: lock tracker emoji edits and prune stale locks
  • 6f50c03 docs: note tracker field locks in changelog

📊 Changes

14 files changed (+389 additions, -31 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 packages/client/src/components/chat/RoleplayHUD.tsx (+33 -6)
📝 packages/client/src/components/chat/RoleplayHUDPanels.tsx (+63 -4)
📝 packages/client/src/features/tracker-panel/components/TrackerDataSidebar.tsx (+5 -2)
📝 packages/client/src/features/tracker-panel/components/TrackerLockContext.tsx (+5 -2)
📝 packages/client/src/features/tracker-panel/components/character-card/CharacterTrackerAvatar.tsx (+29 -2)
📝 packages/client/src/features/tracker-panel/components/character-card/CharacterTrackerCard.tsx (+5 -0)
📝 packages/client/src/features/tracker-panel/components/character-card/FeaturedCharacterNameplate.tsx (+22 -2)
📝 packages/client/src/features/tracker-panel/components/controls/StatList.tsx (+8 -2)
📝 packages/client/src/features/tracker-panel/components/sections/CustomTrackerPanel.tsx (+9 -2)
📝 packages/client/src/features/tracker-panel/components/sections/quest-tracker/QuestRow.tsx (+6 -1)
➕ packages/client/src/features/tracker-panel/hooks/use-tracker-field-lock-updater.ts (+28 -0)
📝 packages/client/src/features/tracker-panel/hooks/use-tracker-mutations.ts (+15 -3)
📝 packages/shared/src/utils/tracker-field-locks.ts (+157 -5)

📄 Description

Linked issue

No linked issue yet. Per CONTRIBUTING.md, one should be opened or linked before merge.

Why this change

  • Tracker field locks from #2568 need to cover editable character emoji fields in tracker card/nameplate/HUD surfaces, so generated tracker updates cannot overwrite a user-pinned emoji.
  • Deleting tracker rows should not leave stale lock keys behind or cause locks to drift onto the wrong shifted row.

What changed

  • Added lock controls for character emoji fields in tracker cards, featured nameplates, and HUD panels.
  • Added shared lock-prefix helpers for persona stats, inventory, characters, quests, and custom tracker fields.
  • Pruned or shifted field locks when deleting stats, inventory rows, characters, quest objectives, quests, and custom tracker rows.
  • Added a shared client hook for field-lock map updates with a no-op equality guard to avoid redundant fieldLocks patches.
  • Deduplicated indexed lock removal/shifting logic in shared tracker lock utilities.
  • Updated CHANGELOG.md to document the tracker field-lock feature added by #2568.

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

Commands and proof run locally:

  • pnpm --filter @marinara-engine/shared lint
  • pnpm --filter @marinara-engine/client lint
  • pnpm check
  • git diff --check
  • git diff --cached --check
  • Node runtime sanity check for tracker lock pruning/equality helpers
  • node scratch/browser-qa-2596/qa-pass.mjs

Manual verification notes

  • Chromium QA used an isolated seeded server/client on 7869/5174; the saved Gemma 4 connection was present.
  • Loaded the seeded roleplay chat and tracker panel.
  • Verified tracker side panel character emoji locking persisted characters.id:_Ik82GD2w4tCG-CGTg1Zg.emoji.
  • Deleted inventory, custom tracker, character, and quest objective rows through real tracker delete-mode UI.
  • Verified stale locks were pruned and later indexed locks shifted for inventory, custom tracker fields, character locks, and quest objective locks.
  • Opened HUD widgets for present characters, inventory, and world state.
  • Reloaded at mobile viewport and verified the tracker panel still rendered.
  • Browser signals from the Chromium pass: 0 console errors, 0 page errors, 0 failed requests, and 0 bad API/browser responses.
  • Local screenshot/evidence artifacts: scratch/browser-qa-2596/desktop-clean-before.png, scratch/browser-qa-2596/desktop-clean-after.png, scratch/browser-qa-2596/mobile-clean-after.png, and scratch/browser-qa-2596/qa-results.json.

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)

No install, update, release, launcher, Android, or version behavior changed.

UI evidence (if applicable)

Local Chromium screenshots were captured under scratch/browser-qa-2596/; no PR image attachments were added.

Summary by CodeRabbit

  • New Features

    • Added inline emoji editing for characters with lock state support.
    • Introduced a field lock updater hook for coordinated lock state management.
  • Bug Fixes

    • Tracker lock state now automatically updates when removing inventory items, characters, quests, and custom trackers.
  • Refactor

    • Expanded tracker lock context to support bulk lock updates via callbacks.
    • Added lock prefix and removal utilities for consistent lock key generation across tracker entities.

🔄 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/2596 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 6/16/2026 **Status:** ✅ Merged **Merged:** 6/16/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/tracker-lock-emoji-and-prune-stale-locks` --- ### 📝 Commits (2) - [`8a88771`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8a887719d54734f0300bd97f51caaf9a00a7aad7) fix: lock tracker emoji edits and prune stale locks - [`6f50c03`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6f50c0303f41218166b120ea13f9431dba2821c4) docs: note tracker field locks in changelog ### 📊 Changes **14 files changed** (+389 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `packages/client/src/components/chat/RoleplayHUD.tsx` (+33 -6) 📝 `packages/client/src/components/chat/RoleplayHUDPanels.tsx` (+63 -4) 📝 `packages/client/src/features/tracker-panel/components/TrackerDataSidebar.tsx` (+5 -2) 📝 `packages/client/src/features/tracker-panel/components/TrackerLockContext.tsx` (+5 -2) 📝 `packages/client/src/features/tracker-panel/components/character-card/CharacterTrackerAvatar.tsx` (+29 -2) 📝 `packages/client/src/features/tracker-panel/components/character-card/CharacterTrackerCard.tsx` (+5 -0) 📝 `packages/client/src/features/tracker-panel/components/character-card/FeaturedCharacterNameplate.tsx` (+22 -2) 📝 `packages/client/src/features/tracker-panel/components/controls/StatList.tsx` (+8 -2) 📝 `packages/client/src/features/tracker-panel/components/sections/CustomTrackerPanel.tsx` (+9 -2) 📝 `packages/client/src/features/tracker-panel/components/sections/quest-tracker/QuestRow.tsx` (+6 -1) ➕ `packages/client/src/features/tracker-panel/hooks/use-tracker-field-lock-updater.ts` (+28 -0) 📝 `packages/client/src/features/tracker-panel/hooks/use-tracker-mutations.ts` (+15 -3) 📝 `packages/shared/src/utils/tracker-field-locks.ts` (+157 -5) </details> ### 📄 Description ## Linked issue No linked issue yet. Per `CONTRIBUTING.md`, one should be opened or linked before merge. ## Why this change - Tracker field locks from #2568 need to cover editable character emoji fields in tracker card/nameplate/HUD surfaces, so generated tracker updates cannot overwrite a user-pinned emoji. - Deleting tracker rows should not leave stale lock keys behind or cause locks to drift onto the wrong shifted row. ## What changed - Added lock controls for character emoji fields in tracker cards, featured nameplates, and HUD panels. - Added shared lock-prefix helpers for persona stats, inventory, characters, quests, and custom tracker fields. - Pruned or shifted field locks when deleting stats, inventory rows, characters, quest objectives, quests, and custom tracker rows. - Added a shared client hook for field-lock map updates with a no-op equality guard to avoid redundant `fieldLocks` patches. - Deduplicated indexed lock removal/shifting logic in shared tracker lock utilities. - Updated `CHANGELOG.md` to document the tracker field-lock feature added by #2568. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` Commands and proof run locally: - `pnpm --filter @marinara-engine/shared lint` - `pnpm --filter @marinara-engine/client lint` - `pnpm check` - `git diff --check` - `git diff --cached --check` - Node runtime sanity check for tracker lock pruning/equality helpers - `node scratch/browser-qa-2596/qa-pass.mjs` ### Manual verification notes - Chromium QA used an isolated seeded server/client on `7869`/`5174`; the saved `Gemma 4` connection was present. - Loaded the seeded roleplay chat and tracker panel. - Verified tracker side panel character emoji locking persisted `characters.id:_Ik82GD2w4tCG-CGTg1Zg.emoji`. - Deleted inventory, custom tracker, character, and quest objective rows through real tracker delete-mode UI. - Verified stale locks were pruned and later indexed locks shifted for inventory, custom tracker fields, character locks, and quest objective locks. - Opened HUD widgets for present characters, inventory, and world state. - Reloaded at mobile viewport and verified the tracker panel still rendered. - Browser signals from the Chromium pass: `0` console errors, `0` page errors, `0` failed requests, and `0` bad API/browser responses. - Local screenshot/evidence artifacts: `scratch/browser-qa-2596/desktop-clean-before.png`, `scratch/browser-qa-2596/desktop-clean-after.png`, `scratch/browser-qa-2596/mobile-clean-after.png`, and `scratch/browser-qa-2596/qa-results.json`. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No install, update, release, launcher, Android, or version behavior changed. ## UI evidence (if applicable) Local Chromium screenshots were captured under `scratch/browser-qa-2596/`; no PR image attachments were added. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added inline emoji editing for characters with lock state support. * Introduced a field lock updater hook for coordinated lock state management. * **Bug Fixes** * Tracker lock state now automatically updates when removing inventory items, characters, quests, and custom trackers. * **Refactor** * Expanded tracker lock context to support bulk lock updates via callbacks. * Added lock prefix and removal utilities for consistent lock key generation across tracker entities. <!-- 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-22 04:18:25 +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#5680
No description provided.