[AIDE-123] Update Command Targets - #96
Merged
Merged
Conversation
Replace the single targetRepositoryId with a many-to-many CommandDefinitionRepository relation so repository-worktree commands can target multiple repositories. Keep targetRepositoryId as a deprecated single-value alias and add tests for the migration, service, and dialogs.
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.
Summary
Commands previously targeted a single repository (one
targetRepositoryId). This change allows a command scoped toREPOSITORY_WORKTREEto target multiple repositories at once via a new many-to-many join table, so a single command definition can run in worktrees of several repositories. Existing singular targets are migrated into the new structure, and deprecated singular fields remain for compatibility while new plural fields (targetRepositoryIds/targetRepositories) are introduced.Changes
CommandDefinitionRepositoryjoin table and removed the singulartargetRepositoryIdcolumn fromCommandDefinition; SQLite migration backfills join rows from existing targets with cascading deletes and a covering index.repositories.create. Worktree eligibility and run-target authorization now check membership across all assigned repositories.targetRepositories(canonical origin + name); import matches each by origin/name and keeps partial matches (widening, quick action disabled) instead of failing the whole import. Legacy schema-v1 exports by repository name still import.targetRepositoryIds/-targetRepositoriesfields and input; marked singulartargetRepositoryId/-targetRepositoryas deprecated. Singular fields are still returned when exactly one repository is assigned.targetRepositoryIdsarrays (deprecatingtargetRepositoryId) and adds the previously missingconcurrencyandblocksGitOperationsinputs.Ticket: AIDE-123