Merged
Conversation
The branch name and PR number inputs used @Bind which defaults to onchange (fires on blur). The create button's disabled attribute checked the bound value, so it stayed disabled while typing. Changed both inputs to @Bind:event="oninput" so the value updates on every keystroke and the button enables immediately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SessionSidebar subscribed to CopilotService.OnStateChanged but not to RepoManager.OnStateChanged. When a repo was added (e.g. dotnet/maui), the sidebar never re-rendered to show the new repo group. Subscribe to RepoManager.OnStateChanged and trigger StateHasChanged so newly added repos appear immediately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ReconcileOrganization only created sidebar groups for repos that had sessions with worktrees. Repos added without creating any sessions (e.g. dotnet/maui) lost their group on restart. Now ensures every tracked repo in RepoManager.Repositories has a corresponding sidebar group during reconciliation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Repos like dotnet/maui have test files that exceed the Windows MAX_PATH limit (260 chars), causing worktree creation to fail with 'Filename too long' errors. Set core.longpaths=true on the bare clone after adding a repository so all worktrees inherit the setting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Fixes several bugs preventing worktree creation from working properly on Windows.
Changes
1. Worktree create button stays disabled while typing
File: \CreateSessionForm.razor\
The branch name and PR number inputs used @Bind\ which defaults to \onchange\ (fires on blur). The create button's \disabled\ attribute checked the bound value, so it stayed disabled while typing. Changed both inputs to @Bind:event="oninput"\ so the value updates on every keystroke.
2. Sidebar doesn't refresh when repos are added/removed
File: \SessionSidebar.razor\
\SessionSidebar\ subscribed to \CopilotService.OnStateChanged\ but not \RepoManager.OnStateChanged. When a repo was added (e.g. dotnet/maui), the sidebar never re-rendered. Added subscription with proper cleanup in \Dispose().
3. Repo groups disappear after app restart
File: \CopilotService.Organization.cs\
\ReconcileOrganization\ only created sidebar groups for repos that had sessions with worktrees. Repos added without creating sessions lost their group on restart. Now ensures every tracked repo has a sidebar group during reconciliation.
4. Worktree creation fails on repos with long file paths
File: \RepoManager.cs\
Repos like \dotnet/maui\ have test files exceeding Windows' MAX_PATH (260 chars), causing \git worktree add\ to fail with 'Filename too long'. Now sets \core.longpaths=true\ on bare clones — both for new repos and when re-fetching existing ones.
Testing