fix: deleting a workflow releases its trigger-hotkey binding (goal 0250) - #517
Merged
Conversation
DeleteWorkflow now fires an injected onWorkflowDeleted hook (wired to TriggerService.UnassignHotkey), and a one-shot boot prune (PruneOrphanedHotkeys, wiring.WireWorkflowLifecycle) heals bindings already leaked by past deletes -- the composition-state class fix, not just the call-site patch. Previously the orphaned binding 422'd any later assign of the same combo, naming the dead workflow's raw id. Splits the delete cluster out of compositionservice.go (500-line gate). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq
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.
Deleting a workflow left its hotkey binding in settings keyed by the dead id — a later assign of the same combo was refused with
this combo is already bound to "<dead-id>"(observed cross-file in e2e; first strike registered 2026-08-29). Thirteenthcomposition-stateoccurrence, so the fix targets the class:DeleteWorkflowfires an injectedonWorkflowDeletedhook (compositionsvc never imports triggersvc), wired toTriggerService.UnassignHotkey(idempotent).PruneOrphanedHotkeys(validIDs)runs once fromwiring.WireWorkflowLifecycleafter both services load persisted state — real installs that already leaked orphans recover on next launch. Deliberately not folded intoSync(which can see transient partial lists).compositionservice.goat the 500-line gate.🤖 Generated with Claude Code
https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq