Merged
Conversation
lucasheriques
added a commit
that referenced
this pull request
Nov 17, 2025
- Create taskDirectoryStore with localStorage persistence - Support two-level mapping (taskId → dir, repoKey → dir) - Auto-map tasks to existing repo clones - Use existing expandTildePath utility Foundation for PR #3 (directory integration).
lucasheriques
added a commit
that referenced
this pull request
Nov 18, 2025
- Create taskDirectoryStore with localStorage persistence - Support two-level mapping (taskId → dir, repoKey → dir) - Auto-map tasks to existing repo clones - Use existing expandTildePath utility Foundation for PR #3 (directory integration).
lucasheriques
added a commit
that referenced
this pull request
Nov 18, 2025
## Summary Creates the foundation for task-to-directory mappings with localStorage persistence. This store enables tasks to remember which directory they should run in, and allows multiple tasks to share a single clone of a repository. **Part of the task directory mapping refactor** - this is PR #2 in a stack of 5 PRs. ## Changes - **New file**: `src/renderer/stores/taskDirectoryStore.ts` - Two-level mapping: - `taskDirectories`: Direct task → directory assignments - `repoDirectories`: Repository → directory mappings (shared across tasks) - `getTaskDirectory()`: Checks task mapping first, falls back to repo mapping, auto-saves if found - Uses existing `expandTildePath` utility for tilde expansion - Persists to localStorage via Zustand persist middleware ## Architecture When resolving a directory for a task: 1. Check `taskDirectories[taskId]` - direct mapping 2. If not found and task has repo, check `repoDirectories[repoKey]` - shared clone 3. If found in step 2, auto-map task to that directory for future lookups 4. If not found, return null (will prompt user in future PRs) ## Next Steps PR #3 will integrate this store into the task execution flow. ## Stack - PR 1: ✅ Clone progress UI (#128) - **PR 2: ← You are here** - PR 3: Integrate directory store - PR 4: UI enhancements - PR 5: Cleanup and migration
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.
No description provided.