Skip to content

fix: deleting a workflow releases its trigger-hotkey binding (goal 0250) - #517

Merged
alicoding merged 1 commit into
mainfrom
fix/0250-hotkey-binding-release
Aug 29, 2026
Merged

fix: deleting a workflow releases its trigger-hotkey binding (goal 0250)#517
alicoding merged 1 commit into
mainfrom
fix/0250-hotkey-binding-release

Conversation

@alicoding

Copy link
Copy Markdown
Owner

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). Thirteenth composition-state occurrence, so the fix targets the class:

  • Release on delete: DeleteWorkflow fires an injected onWorkflowDeleted hook (compositionsvc never imports triggersvc), wired to TriggerService.UnassignHotkey (idempotent).
  • Boot heal: PruneOrphanedHotkeys(validIDs) runs once from wiring.WireWorkflowLifecycle after both services load persisted state — real installs that already leaked orphans recover on next launch. Deliberately not folded into Sync (which can see transient partial lists).
  • Tests: delete releases the binding and frees the combo for reassign; prune drops orphans, keeps live bindings, and a no-op prune never persists.
  • Rider: the delete cluster split out of compositionservice.go at the 500-line gate.

🤖 Generated with Claude Code

https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq

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
@alicoding
alicoding enabled auto-merge (squash) August 29, 2026 14:50
@alicoding
alicoding merged commit 1036d21 into main Aug 29, 2026
30 checks passed
@alicoding
alicoding deleted the fix/0250-hotkey-binding-release branch August 29, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant