mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1655] [MERGED] [codex] Clear chat activity on deleted chats #5186
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#5186
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/1655
Author: @Xelvanis
Created: 5/30/2026
Status: ✅ Merged
Merged: 5/30/2026
Merged by: @Xelvanis
Base:
refactor← Head:cleanup/clear-chat-activity-on-delete📝 Commits (4)
046d9abClear chat activity on deleted chats8fce989Handle missing chat group delete ids6b5516bFix chat delete clippy warningf77e3a5Make chat group delete ids optional📊 Changes
5 files changed (+309 additions, -12 deletions)
View changed files
📝
src-tauri/src/commands/storage/chats.rs(+88 -8)📝
src-tauri/src/commands/storage/commands/entities.rs(+44 -2)➕
src/features/catalog/chats/hooks/use-chats.test.tsx(+149 -0)📝
src/features/catalog/chats/hooks/use-chats.ts(+22 -1)📝
src/shared/api/chat-command-api.ts(+6 -1)📄 Description
Linked issue
No linked issue. This is a local Knip unused-export triage cleanup slice.
Why this change
Chat deletion removed persisted chat records and cache state, but autonomous chat activity lived in an in-memory engine map keyed by chat id. Deleted chats, including cascade-deleted roleplay scene chats, could leave stale autonomous activity state behind until reload.
What changed
deletedChatIdsfrom chat deletion commands, including scene-chat cascades.deletedChatIds.Refactor impact
Primary owner:
Catalog chats, chat autonomous engine state, shared API chat command wrapper, and Rust storage chat deletion commands.
Impact areas reviewed:
storage_deleteandchat_group_deletecommand response contracts.Boundary notes:
chat_group_deleteis already routed through the embedded Tauri command and remote/api/invokeallowlist/dispatch path; the response shape change is shared by both.Pressure points touched:
src-tauri/src/lib.rscommand registration, or import modules changed.Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
Commands run locally:
pnpm vitest run src/features/catalog/chats/hooks/use-chats.test.tsxpassed.cargo test --manifest-path src-tauri/Cargo.toml delete_chat_group_reports_exact_deleted_chat_ids_including_scene_childrenpassed.cargo test --manifest-path src-tauri/Cargo.toml deleting_chat_reports_cascade_deleted_chat_idspassed.pnpm typecheckpassed.pnpm check:architecturepassed.cargo check --manifest-path src-tauri/Cargo.toml --workspacepassed.cargo clippy --manifest-path src-tauri/Cargo.toml --workspace --all-targets -- -D warningspassed after fixing the CI clippy finding.pnpm exec eslint src/features/catalog/chats/hooks/use-chats.ts src/features/catalog/chats/hooks/use-chats.test.tsx src/shared/api/chat-command-api.tspassed.pnpm buildpassed with the existing large chunk warning.git diff --checkpassed.Manual app/Tauri QA was not run. Remote runtime was not smoke checked separately.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs or release note files were changed. This checkout has no
CHANGELOG.md, and the change is internal cleanup/bugfix behavior rather than a documented workflow change.UI evidence
No visible UI changes; no screenshots or recordings added.
Summary by CodeRabbit
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.