-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Display real-time clone progress in UI #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
k11kirky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should move towards a working directory first approach.
The user should be able to use array locally with no git integration (they will not be able to use cloud (background) mode)
If a user wants to select a task assigned to a git integration that they do not have we can do the cloning then.
Onboarding should probably remove the need for a workspace, put it in setttings and only ask for it when the user wants to clone.
Final thought, the working directory for a given task can be stored in localstorage as it doesnt make sense to store that in the task itself
Adds visual feedback for repository cloning operations: - Button shows current clone stage (e.g., "Receiving objects", "Resolving deltas") - Progress bar underneath button displays percentage completion - Instant UI feedback with zero delay when initiating clone Technical improvements: - Frontend generates cloneId before IPC call to eliminate UI delay - Added --progress flag to git clone for progress output in non-interactive environments - Parse progress from git stderr and update UI in real-time - Clean architecture with frontend-controlled clone state creation
0e9d19d to
ba34212
Compare
|
@k11kirky the next changes are coming in stacked PRs. it'll be on the proposed architecture we talked about. but, i'll stack on top of this PR so we still have the UX changes for git-based flow. if we can approve this would be great |
When clicking "Run (Local)" without a directory set: - Tasks WITH repository_config: Prompt "Do you have it locally?" → "I have it locally" opens folder picker → "Clone for me" triggers clone flow with progress UI - Tasks WITHOUT repository_config: Prompt "Select working directory" → Opens folder picker Cloud mode changes: - Disable Cloud mode toggle for tasks without repository_config - Show tooltip: "Cloud mode requires a connected repository" Technical changes: - Updated runTask() in taskExecutionStore to prompt before showing error - Integrated with existing clone flow and progress UI (PR #128) - Persist selected directories via taskDirectoryStore (PR #130, #131) - Removed noisy directory source badges (simplified UX) This creates a frictionless flow where engineers can easily point to existing repos or clone them on-demand, while still supporting directory-only tasks for non-git workflows.
When clicking "Run (Local)" without a directory set: - Tasks WITH repository_config: Prompt "Do you have it locally?" → "I have it locally" opens folder picker → "Clone for me" triggers clone flow with progress UI - Tasks WITHOUT repository_config: Prompt "Select working directory" → Opens folder picker Cloud mode changes: - Disable Cloud mode toggle for tasks without repository_config - Show tooltip: "Cloud mode requires a connected repository" Technical changes: - Updated runTask() in taskExecutionStore to prompt before showing error - Integrated with existing clone flow and progress UI (PR #128) - Persist selected directories via taskDirectoryStore (PR #130, #131) - Removed noisy directory source badges (simplified UX) This creates a frictionless flow where engineers can easily point to existing repos or clone them on-demand, while still supporting directory-only tasks for non-git workflows.
When clicking "Run (Local)" without a directory set: - Tasks WITH repository_config: Prompt "Do you have it locally?" → "I have it locally" opens folder picker → "Clone for me" triggers clone flow with progress UI - Tasks WITHOUT repository_config: Prompt "Select working directory" → Opens folder picker Cloud mode changes: - Disable Cloud mode toggle for tasks without repository_config - Show tooltip: "Cloud mode requires a connected repository" Technical changes: - Updated runTask() in taskExecutionStore to prompt before showing error - Integrated with existing clone flow and progress UI (PR #128) - Persist selected directories via taskDirectoryStore (PR #130, #131) - Removed noisy directory source badges (simplified UX) This creates a frictionless flow where engineers can easily point to existing repos or clone them on-demand, while still supporting directory-only tasks for non-git workflows.
Merge activity
|
## 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
## Summary - Integrates `taskDirectoryStore` into task execution flow - Tasks now check stored directory mappings before deriving paths from workspace - Persists directory assignments when repos are set or cloned - Enables per-task directory customization and repo sharing across tasks ## Changes - **`taskExecutionStore.ts`**: Updated `initializeRepoPath()` to check `taskDirectoryStore` first, then fall back to workspace-based derivation. Updated `setRepoPath()` to persist task→directory mapping. - **`cloneStore.ts`**: Updated `handleComplete()` to save repo→directory mapping after successful clone for future task reuse. ## Test Plan - [ ] Clone a repo for a task → verify mapping is saved - [ ] Run another task with the same repo → verify it reuses the cloned directory - [ ] Manually set a directory for a task → verify it persists across app restarts - [ ] Verify tasks without `repository_config` still work --- **Stack**: Built on top of: - PR #128: Clone progress UI - PR #130: Task directory store foundation
When clicking "Run (Local)" without a directory set: - Tasks WITH repository_config: Prompt "Do you have it locally?" → "I have it locally" opens folder picker → "Clone for me" triggers clone flow with progress UI - Tasks WITHOUT repository_config: Prompt "Select working directory" → Opens folder picker Cloud mode changes: - Disable Cloud mode toggle for tasks without repository_config - Show tooltip: "Cloud mode requires a connected repository" Technical changes: - Updated runTask() in taskExecutionStore to prompt before showing error - Integrated with existing clone flow and progress UI (PR #128) - Persist selected directories via taskDirectoryStore (PR #130, #131) - Removed noisy directory source badges (simplified UX) This creates a frictionless flow where engineers can easily point to existing repos or clone them on-demand, while still supporting directory-only tasks for non-git workflows.
## Summary
Implements the frictionless directory selection flow: when clicking "Run" without a directory set, Array prompts the user to either select an existing directory or clone the repository.
## User Flow
### For tasks WITH `repository_config`:
When user clicks "Run (Local)" without a directory:
1. **Prompt**: "Do you have `org/repo` locally?"
2. **Options**:
- **"I have it locally"** → Opens native folder picker → Saves mapping → Runs task
- **"Clone for me"** → Triggers clone with progress UI → Saves mapping → User clicks Run again after clone
- **"Cancel"** → Returns to task detail
### For tasks WITHOUT `repository_config`:
When user clicks "Run (Local)" without a directory:
1. **Prompt**: "Select a working directory for this task"
2. **Opens folder picker** → Saves mapping → Runs task
### Invalid Directory Handling:
- If user selects an invalid directory → Validation fails silently → Prompt appears again
- No error spam, seamless recovery
- User can clear directory with X button and retry
### Working Directory Field:
- Shows **actual** directory that will be used (not derived fallback)
- Empty with "Not set - click Run to select" when no directory
- Clear button (X) appears only when directory is set
### Cloud Mode Gating:
- Cloud mode toggle is **disabled** for tasks without `repository_config`
- Tooltip explains: "Cloud mode requires a connected repository"
## Benefits
1. **Frictionless onboarding**: No upfront workspace configuration required
2. **Supports existing workflows**: Engineers can point to repos they already have cloned
3. **On-demand cloning**: Clone only when needed, with visual progress
4. **Flexible**: Supports both git-based and directory-only tasks
5. **Persistent**: Directory mappings survive app restarts
6. **Graceful recovery**: Invalid paths automatically re-prompt instead of erroring
7. **Clear UI**: Always shows what will actually be used
## Test Plan
- [x] Task with repo, no directory set → Prompt appears with 3 buttons
- [x] "I have it locally" → Folder picker opens → Selection persists
- [x] "Clone for me" → Clone progress shows → Directory saved after clone
- [x] Task without repo → Prompt shows "Select directory" with 2 buttons
- [x] Cloud mode disabled when no `repository_config` → Tooltip shows
- [x] Select invalid directory → Auto-prompts again (no error spam)
- [x] Clear directory with X button → Working directory shows empty → Run shows prompt
- [x] Working directory field shows actual path only
---
**Stack**: Built on top of:
- PR #128: Clone progress UI
- PR #130: Task directory store foundation
- PR #131: Integrate directory store into execution flow

Summary
Adds visual feedback for repository cloning operations to improve onboarding UX. Users now see real-time clone progress when clicking "Run (Local)" on a task that requires cloning a repository.
UI Changes
Technical Implementation
cloneIdbefore IPC call to eliminate UI delay--progressflag to git clone for progress output in non-interactive environmentsTest Plan