Skip to content

Conversation

@jonathanlab
Copy link
Contributor

Made our tsconfig make more sense, also resolved some type errors and vite warnings

Copy link
Contributor

@joshsny joshsny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@jonathanlab jonathanlab merged commit 39dacce into main Sep 30, 2025
1 check passed
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
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.

3 participants