Commit Graph
4586 Commits
Author SHA1 Message Date
Saoud Rizwan bd970dc511 fix: revert package.json navigation order to match main 2026-01-17 18:04:15 -08:00
Saoud Rizwan fff3ef3558 fix: revert Navbar.tsx to match main (JetBrains compat) 2026-01-17 18:02:42 -08:00
Saoud Rizwan f63004325e fix: revert e2e test changes to match main 2026-01-17 18:00:56 -08:00
Saoud Rizwan c60593128f fix: add worktreesEnabled to proto and fix duplicate import 2026-01-17 16:04:13 -08:00
Saoud Rizwan 104622d79a fix: clean up shadow git checkpoint data when deleting worktrees 2026-01-17 16:01:52 -08:00
Saoud Rizwan 7aa588e160 Revert "fix(e2e): increase getSidebar timeout for slower macOS CI runners"
This reverts commit 19479a019c.
2026-01-17 16:01:52 -08:00
Saoud Rizwan b2dabe437d Fix merge conflict artifacts 2026-01-17 16:01:52 -08:00
Saoud Rizwan 1fab9676e3 fix: replace DangerButton with Button variant="danger"
DangerButton component was removed from main. Use the standard
Button component with variant="danger" instead.
2026-01-17 16:01:40 -08:00
Saoud Rizwan 9b79d27da8 feat: add telemetry for worktree feature usage
Track worktree feature engagement:
- worktree.view_opened: when users open worktrees view (with source)
- worktree.created: when worktrees are created (with total count)
- worktree.merge_attempted: when merge is attempted (success/conflicts)
2026-01-17 16:01:39 -08:00
Saoud Rizwan 06c50b22b6 feat: add worktree-exp feature flag for worktrees feature
Put the worktrees feature behind a feature flag (worktree-exp) that
defaults to false. When enabled, users can toggle the feature in
settings. The home page worktree section only shows when both the
feature flag is enabled and the user setting is on.
2026-01-17 16:01:13 -08:00
Saoud Rizwan 0433f7d142 fix(ui): temporarily disable new worktree button, add tooltip to current worktree
Comment out "New Worktree Window" button until worktree creation is stable.
Add tooltip to current worktree info with "View and manage git worktrees.
Great for running parallel Cline tasks."
2026-01-17 15:59:42 -08:00
Saoud Rizwan edd1505322 fix: remove worktrees menu button from sidebar
Remove the worktrees button from the VS Code extension menu bar.
2026-01-17 15:59:42 -08:00
Saoud Rizwan 160c92fe93 fix(worktree): add option to delete branch when deleting worktree
- Update delete modal copy to accurately describe behavior
- Add checkbox to optionally delete branch (unchecked by default)
- Show warning about unpushed commits when checkbox is checked
- Update proto, handler, and UI to support delete_branch option
2026-01-17 15:59:42 -08:00
Saoud Rizwan d8b9abfe96 fix(e2e): update auth test to use aria-label instead of removed class 2026-01-17 15:59:42 -08:00
Saoud Rizwan 154039dd1b fix(worktree): wrap path instead of truncating 2026-01-17 15:59:42 -08:00
Saoud Rizwan e3fff4b1af fix(worktree): improve non-git repo message 2026-01-17 15:59:42 -08:00
Saoud Rizwan 3f1a4cc660 fix(e2e): update tests to match renamed Recent header 2026-01-17 15:59:42 -08:00
Saoud Rizwan af0e37229d fix(worktree): UI polish
- Change New Worktree Window tooltip to show above button instead of below
- Add break-all to branch names for long branch text wrapping
- Simplify merge button tooltip and modal title (remove 'and close')
2026-01-17 15:59:42 -08:00
Saoud Rizwan 40399eb858 feat(worktree): add worktrees button to sidebar header
Adds a git-branch icon button to the Cline sidebar header for quick
access to the Worktrees view. Also updates docs to mention this new
entry point and adds a typical workflow section.
2026-01-17 15:59:42 -08:00
Saoud Rizwan 99b08df8dd fix(worktree): rename Main badge to Primary 2026-01-17 15:59:42 -08:00
Saoud Rizwan e224161b8e docs(worktrees): update for new UI features
- Document quick launch button on home screen
- Update getting started to reflect auto-filled defaults
- Document Cline auto-open behavior when switching worktrees
- Update delete section with confirmation modal details
- Add limitations section for multi-root and subfolder workspaces
2026-01-17 15:59:42 -08:00
Saoud Rizwan 216584c4de fix(worktree): improve .worktreeinclude warning styling 2026-01-17 15:59:42 -08:00
Saoud Rizwan 222c242df3 refactor(ui): remove worktrees button from title bar 2026-01-17 15:59:42 -08:00
Saoud Rizwan 75d2173843 feat(worktree): add delete confirmation modal 2026-01-17 15:59:42 -08:00
Saoud Rizwan 2330dc5136 chore: ignore .worktrees directory and CLAUDE.local.md 2026-01-17 15:59:22 -08:00
Saoud Rizwan c05c4ce7d6 fix(worktree): improve quick launch UX
- Make current branch/path clickable to navigate to worktrees view
- Fix word wrap for long branch names and paths
- Show .worktreeinclude warning in create modal with learn more link
2026-01-17 15:59:22 -08:00
Saoud Rizwan 8727f1b1b6 feat(worktree): auto-open Cline sidebar on worktree launch
When switching to a worktree via quick launch button, automatically
open the Cline sidebar in the new/reloaded window. Uses globalState
to pass the target path between windows, reading directly from
context.globalState at startup to bypass StateManager cache timing.
2026-01-17 15:59:00 -08:00
Saoud Rizwan 8371503a13 refactor(ui): polish home screen and worktree modal
- Update HistoryPreview: rename to Recent, move View All to header with chevron
- Remove logo pop-in animation from HomeHeader
- Remove info icon tooltip from What can I do for you heading
- Remove fade-in animations from WelcomeSection
- Move worktree button below history preview with more spacing
- Update CreateWorktreeModal copy and reduce spacing between fields
- Add Current label with branch icon above path in worktree info
2026-01-17 15:56:41 -08:00
Saoud Rizwan 3185b3f7a7 feat(worktree): add quick launch button on home page
Extract CreateWorktreeModal as reusable component with openAfterCreate prop.
Add New Worktree Window button to WelcomeSection that creates a worktree
and opens it in a new window. Shows current worktree branch and path info.
2026-01-17 15:55:51 -08:00
Saoud Rizwan 181ff84881 feat(worktree): add clear buttons to create modal input fields 2026-01-17 15:54:41 -08:00
Saoud Rizwan 3ab39956ac fix(worktree): add cursor pointer to create modal close button 2026-01-17 15:54:41 -08:00
Saoud Rizwan b656b39f45 refactor(worktree): auto-fill defaults when create modal opens 2026-01-17 15:54:41 -08:00
Saoud Rizwan 214cab9126 feat(worktree): add multi-root and subfolder workspace warnings
- Detect and warn when multiple workspace folders are open (worktrees not supported in multi-root)
- Detect and warn when a subfolder of a git repo is open instead of the root, showing the actual git root path
- Fix UI overflow on narrow widths by using min-h-32 instead of fixed h-32
2026-01-17 15:54:41 -08:00
Saoud Rizwan 576cad2ea3 perf(worktree): optimize file copying for .worktreeinclude
Address performance feedback - worktree creation was taking ~20 seconds
for large directories like node_modules (50k+ files).

Optimizations:
- Use native `cp -r` for entire directories (10-20x faster)
- Parallelize file copying with batches of 100 (5-10x faster)
- Parallelize directory traversal with Promise.all

The old implementation copied files sequentially which caused the
bottleneck. Now directories like node_modules are copied using the
system's native cp command, and individual files are copied in
parallel batches.

Also adds unit tests for the worktree-include module.
2026-01-17 15:54:41 -08:00
Juan Pablo ef051c0b2a Fixes docs not rendering 2026-01-17 15:54:41 -08:00
Saoud RizwanandCopilot faea4ef161 Update webview-ui/src/components/worktrees/WorktreesView.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-17 15:54:41 -08:00
Saoud RizwanandCopilot f3021d91ee Update docs/features/worktrees.mdx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-17 15:54:41 -08:00
Saoud Rizwan e4811eeba7 fix: simplify merge request button in WorktreesView component
Removes the "Merge" text from the button label in the WorktreesView component, streamlining the user interface. This change focuses on clarity by allowing the button to simply prompt users to "Ask Cline to Resolve," enhancing the overall user experience during merge conflict resolution.
2026-01-17 15:54:41 -08:00
Saoud Rizwan 5398eb5c4b feat: add symlink functionality for .worktreeinclude to sync with .gitignore
Introduces a new section in the documentation explaining how to create a symlink from .gitignore to .worktreeinclude. This allows users to automatically sync patterns between the two files, simplifying worktree setup. Additionally, includes a note for users needing different patterns to create a regular .worktreeinclude file instead.
2026-01-17 15:54:41 -08:00
Saoud Rizwan 94babd7848 fix: improve tooltip functionality and clean up WorktreesView component
Enhances the tooltip for the current worktree indicator to provide additional context for users. Additionally, removes the display of commit hashes in the worktree list to streamline the UI, improving overall clarity and user experience.
2026-01-17 15:54:41 -08:00
Saoud Rizwan 0cfcbbf3a2 feat: update merge conflict display and task creation flow in WorktreesView
Enhances the merge conflict notification by providing a clearer list of conflicting files, including a summary for additional files. Additionally, modifies the task creation flow to close the worktrees view upon task creation, improving user experience during the merge process.
2026-01-17 15:54:41 -08:00
Saoud Rizwan b7d28cb672 refactor: optimize worktree loading to prevent UI flickering
Enhances the loadWorktrees function in WorktreesView to only update the component's state if the fetched data has changed, reducing unnecessary re-renders and preventing flickering. This change improves the user experience by providing a smoother interface when loading worktrees. Additionally, simplifies the polling mechanism for updates.
2026-01-17 15:54:41 -08:00
Saoud Rizwan 1d761ef3e6 feat: enhance mergeWorktree functionality to check target worktree status
Implements a check for uncommitted changes in the target worktree before merging, ensuring that users are informed if the target branch has uncommitted changes. This update improves error handling and user feedback during the merge process by verifying the state of both the source and target worktrees. Additionally, it integrates the listWorktrees utility to identify the correct worktree for the target branch.
2026-01-17 15:54:41 -08:00
Saoud Rizwan 83bf9af083 refactor: replace exec with simple-git for worktree operations
Refactors the worktree management code to utilize the simple-git library instead of child_process exec for executing Git commands. This change enhances code readability and maintainability by providing a more streamlined interface for Git operations in the checkoutBranch, mergeWorktree, and git-worktree modules. Additionally, it improves error handling and reduces the complexity of command execution.
2026-01-17 15:54:41 -08:00
Saoud Rizwan f2efe8767f feat: add worktree merging functionality and UI enhancements
Introduces a new feature for merging worktrees, allowing users to merge changes from a worktree's branch into the main branch with options to delete the worktree post-merge. Updates the WorktreesView component to include a merge modal, handling merge conflicts, and integrating with the WorktreeService for seamless operations. Additionally, enhances documentation to reflect these changes.
2026-01-17 15:54:41 -08:00
Saoud Rizwan 2df6586760 feat: update documentation links in WorktreesView component
Modifies the documentation links in the WorktreesView component to point to the correct feature sections, ensuring users have access to accurate resources. Additionally, adds the "features/worktrees" entry in the documentation JSON for better organization.
2026-01-17 15:54:41 -08:00
Saoud Rizwan c3bb795d76 feat: reposition New Worktree button for improved UI layout
Moves the New Worktree button to a fixed position at the bottom of the WorktreesView component, enhancing accessibility and user experience. The button is now styled to occupy the full width, ensuring better visibility and interaction within the UI.
2026-01-17 15:54:41 -08:00
Saoud Rizwan c5c92eff0d feat: add checkout branch functionality to WorktreeService and UI
Introduces a new RPC method `checkoutBranch` to the WorktreeService for switching branches within the current worktree. Updates the WorktreesView component to support this functionality, enhancing user experience by allowing seamless branch switching. Additionally, refines the UI layout for better responsiveness and improves loading/error state handling.
2026-01-17 15:54:41 -08:00
Saoud Rizwan 8fdb36d094 feat: implement .worktreeinclude file management in WorktreeService
Adds new RPC methods to the WorktreeService for managing .worktreeinclude files, including retrieving the status of the file and creating it with specified content. Updates the WorktreesView component to handle the creation and status checking of .worktreeinclude, enhancing user experience by automating file management for worktrees. Additionally, modifies the UI to reflect these changes, including updated tooltips and improved error handling.
2026-01-17 15:54:40 -08:00
Saoud Rizwan 4438e7c640 feat: add worktree defaults retrieval to WorktreeService and UI
Introduces a new RPC method `getWorktreeDefaults` to fetch suggested defaults for branch names and paths when creating new worktrees. Updates the WorktreesView component to utilize this method, enhancing the user experience by auto-generating branch names and paths. Additionally, integrates tooltips for improved UI interactions and adds a close button to the worktree creation modal.
2026-01-17 15:54:40 -08:00