mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#3372
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 @ghost on GitHub (Sep 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6084
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Deleting a character card leaves its id inside every Roleplay and Conversation chat it belonged to. Chat Settings → Characters then shows a count one higher than the number of rows (badge
2, one row). #6026 fixed this for Game party membership (#6021); the other two modes still have it.Expected behavior
Deleting a card removes its id from every chat's
characterIds, in all three modes — the same cleanup #6026 added to the deletion transaction for Game chats. The Characters badge in Chat Settings matches the rows listed under it.Actual behavior
GET /api/chats/:idafter the delete still returns both ids:["Ho4U61zYmMks28sj0xgAL", "zQC0jHWKYWxyQXf5CdFFN"](second one is the deleted card,GET /api/characters/zQC0…→ 404).Steps to reproduce
Badge shows 2, one row. Same with a Conversation chat. A Game chat is clean (scrubbed by #6026).
Environment
staging@9bf5baaf0(clean checkout, fresh worktree)Logs, screenshots, or video
Additional context
Where it comes from, read at
9bf5baaf0:packages/server/src/services/storage/characters.storage.ts,remove(): the chat scrub added in #6026 selectswhere(eq(chats.mode, "game")), so Roleplay and Conversation rows are never touched. Groups are scrubbed for all modes right below it.packages/client/src/components/chat/ChatSettingsDrawer.tsx, the Characters section (!isGame):count={chatCharIds.length}and the twochatCharIds.length === 0empty-state checks use the raw id list, while the rows arecharacters.find(...)and skip anything unresolvable. The Game Party section already uses the resolvedchatCharacters.lengthsince #6026.Fix I intend to open as a draft PR today, same shape as #6026: drop the mode filter in the deletion transaction so every chat is scrubbed (the Game metadata branch already no-ops when there is no
gameSetupConfig), and countchatCharacters.lengthat the three Roleplay/Conversation sites so already-stale chats (imported, or deleted before this lands) also show the right number.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@ghost commented on GitHub (Sep 12, 2026):
Draft PR #6089 (server scrub for every chat mode + resolved count in the drawer + a regression that fails on
stagingat the Roleplay assertion). Before/after table in the PR.@SpicyMarinara commented on GitHub (Sep 12, 2026):
Fixed on staging in #6095.
Deleting a character card now removes its membership from Roleplay, Conversation, and Game chats. Chat Settings counts resolved cards, while keeping the count stable during loading. Original patch from #6089 is preserved; deletion/history regressions pass.