mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1130] [MERGED] fix(connections): block delete when in use; warn on dangling agent refs #4937
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#4937
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/1130
Author: @etherious1804
Created: 5/24/2026
Status: ✅ Merged
Merged: 5/24/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/1129-connection-delete-cascade📝 Commits (2)
5fd1378fix(connections): block delete when in use; warn on dangling agent refsf4708bdMerge refactor and port connection safeguards📊 Changes
8 files changed (+369 additions, -12 deletions)
View changed files
📝
src-tauri/src/commands/storage/commands/entities.rs(+4 -0)➕
src-tauri/src/connection_refs.rs(+211 -0)📝
src-tauri/src/http_dispatch.rs(+7 -0)📝
src-tauri/src/lib.rs(+1 -0)➕
src/engine/generation/agent-runner.test.ts(+90 -0)📝
src/engine/generation/agent-runner.ts(+50 -10)📝
src/features/shell/connections/components/ConnectionEditor.tsx(+4 -1)📝
src/shared/api/tauri-client.ts(+2 -1)📄 Description
Linked issue
Closes #1129
Why this change
Deleting an API connection that is still referenced by agents or chats should not silently leave dangling
connectionIdvalues. On the refactor branch, the same safety behavior needs to live in the new storage/delete path and the generation runtime should make an explicit missing agent connection visible instead of falling back to the chat connection.What changed
src-tauri/src/connection_refs.rs.storage_deletecalls forconnectionsthrough the new reference-aware delete helper.connection_in_useconflict with referencing agents/chats unlessforceis passed.connectionIdvalues before deleting the connection.dangling_agent_connectionagent result instead of silently using the chat connection.Validation
pnpm checkpassed locally on the exact tree pushed to this PR.pnpm testpassed locally.cargo test --manifest-path src-tauri/Cargo.toml connection_refspassed locally.pnpm exec vitest run src/engine/generation/agent-runner.test.tspassed locally.refactorchecked: 8 files only.Notes
Review skipped; there are no inline review threads.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.