Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: Skip main worktree on project import and remove main badge UI#70

Merged
wesbillman merged 1 commit intomainfrom
matt2e/remove-main
Feb 12, 2026
Merged

fix: Skip main worktree on project import and remove main badge UI#70
wesbillman merged 1 commit intomainfrom
matt2e/remove-main

Conversation

@matt2e
Copy link
Contributor

@matt2e matt2e commented Feb 12, 2026

Summary

Skip the main worktree (the repo checkout itself) during project import and remove all is_main_worktree tracking from the backend and UI.

Changes

Backend (src-tauri/src/lib.rs)

  • Filter out the main worktree in import_existing_worktrees by comparing canonicalized paths against the repo root
  • Remove is_main_worktree field from BranchWithWorkdir struct
  • Remove is_main detection logic from list_branches_for_project
  • Remove main worktree deletion guard from delete_branch

Frontend

  • Remove "main worktree" badge and conditional delete button guard from BranchCard.svelte
  • Remove isMainWorktree from Branch TypeScript interface (types.ts)
  • Remove .main-badge CSS rule

@matt2e matt2e marked this pull request as draft February 12, 2026 19:28
- Filter out the main worktree (repo checkout itself) in
  import_existing_worktrees by comparing canonicalized paths
- Remove is_main_worktree field from BranchWithWorkdir struct
- Remove is_main detection logic from list_branches_for_project
- Remove main worktree deletion guard from delete_branch
- Remove 'main worktree' badge and conditional delete button guard
  from BranchCard.svelte
- Remove isMainWorktree from Branch TypeScript interface
- Remove .main-badge CSS rule
@matt2e matt2e force-pushed the matt2e/remove-main branch from 27e4140 to e081143 Compare February 12, 2026 19:36
@matt2e matt2e changed the title Skip main worktree during project import and simplify agent preference handling Skip main worktree on project import and remove main badge UI Feb 12, 2026
@matt2e matt2e changed the title Skip main worktree on project import and remove main badge UI fix: Skip main worktree on project import and remove main badge UI Feb 12, 2026
@matt2e matt2e marked this pull request as ready for review February 12, 2026 19:40
@wesbillman wesbillman merged commit ae8266b into main Feb 12, 2026
3 checks passed
@wesbillman wesbillman deleted the matt2e/remove-main branch February 12, 2026 19:44
taylorkmho added a commit that referenced this pull request Feb 12, 2026
* origin/main:
  feat: async worktree creation (#71)
  fix: Skip main worktree on project import and remove main badge UI (#70)
  feat(ui): replace long-press picker with explicit New note / New commit buttons (#67)
  fix: remember ordered list of recent agents instead of single last-used (#65)
  fix: capitalize 'Staged' in macOS application menu (#64)
  fix: dismiss new branch dialog immediately for remote branches (#57)
  feat: add Amp (Sourcegraph) as a supported ACP agent (#55)
  feat: restore subfolder autocomplete in new project dialog (#56)
  Consolidate ACP implementations into acp-client crate (#52)

# Conflicts:
#	staged/src/lib/BranchCard.svelte
#	staged/src/lib/NewSessionModal.svelte
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.

2 participants