feat(connections): working delete confirm + disconnect + set-primary guard - #88
Merged
Merged
Conversation
…guard Three issues found during manual testing of the Connection Manager: 1. Delete did nothing: native confirm() is blocked in the Tauri webview (returns falsy immediately). Replaced with an in-app confirm modal (confirm-overlay / confirm-dialog pattern, Esc/cancel supported). 2. No way to stop using a backend. Added disconnect_connection command: drops AppState.uteke_client to None (recall/search fail until reconnect) and marks the primary connection 'disconnected'. Row + primary flag kept. New store::set_status helper sets status without bumping last_tested_at. 3. Set Primary could activate a dead backend. Now the UI only offers 'Set Primary' on connections whose status is 'connected', and 'Disconnect' only on the connected primary. - disconnect button on connected primary; reconnect already existed - ipc.ts: connection.disconnect() wrapper - store: disconnect() wired through - .agent.md: connection-layer rules 6-8 (disconnect/reconnect, guard, no native confirm) - CHANGELOG updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #84 / #85 / #86 / #87 — Connection Manager manual-test fixes + new disconnect.
Issues found during manual UI testing
confirm()is blocked in the Tauri webview(it returns falsy immediately), so the delete branch never ran.
Changes
Delete confirm (fix #1)
Replaced native
confirm()with an in-app modal inConnectionManager.svelte(
confirm-overlay/confirm-dialog). Esc and Cancel dismiss; Delete proceeds.Tracks
pendingDeletestate. Matches the existingMemoryDetail.sveltepattern.Disconnect (fix #2)
disconnect_connectioncommand: dropsAppState.uteke_clienttoNone(recall/search fail until reconnect) and marks the primary connection
disconnected. The row and primary flag are preserved.store::set_status(id, status)helper — sets status without bumpinglast_tested_at(not a health check).ipc.ts:connection.disconnect()wrapper.stores/connections.svelte.ts:disconnect()wired through.Set Primary guard (fix #3)
UI now only offers "Set Primary" on connections whose status is
connected.Combined with disconnect, the lifecycle is: Test → connected → Set Primary →
(optional) Disconnect → Reconnect.
Docs
.agent.mdconnection-layer rules 6–8 (disconnect vs reconnect, guard,no native confirm/alert).
CHANGELOG.mdupdated.Validation
cargo fmt+cargo clippy --all-targets -- -D warningsclean.npm run buildclean.