Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PolyPilot/Components/Layout/CreateSessionForm.razor
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ else
<div class="wt-new-form">
@if (newWorktreeMode == "branch")
{
<input type="text" @bind="newWorktreeBranch" placeholder="branch-name"
<input type="text" @bind="newWorktreeBranch" @bind:event="oninput" placeholder="branch-name"
class="wt-branch-input" @onkeydown="HandleNewWorktreeKeyDown" />
}
else
{
<input type="text" @bind="newWorktreePr" placeholder="PR #"
<input type="text" @bind="newWorktreePr" @bind:event="oninput" placeholder="PR #"
class="wt-branch-input" @onkeydown="HandleNewWorktreeKeyDown" />
}
<button class="wt-create-btn" @onclick="CreateAndSelectWorktree"
Expand Down
4 changes: 4 additions & 0 deletions PolyPilot/Components/Layout/SessionSidebar.razor
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ else
CopilotService.OnStateChanged += RefreshSessions;
CopilotService.OnSessionComplete += HandleSessionComplete;
CopilotService.OnUsageInfoChanged += HandleUsageInfoChanged;
RepoManager.OnStateChanged += OnRepoStateChanged;
RepoManager.Load();
RefreshSessions();
LoadPersistedSessions();
Expand Down Expand Up @@ -583,6 +584,8 @@ else
InvokeAsync(StateHasChanged);
}

private void OnRepoStateChanged() => InvokeAsync(StateHasChanged);

private void LoadPersistedSessions()
{
persistedSessions = CopilotService.GetPersistedSessions().ToList();
Expand Down Expand Up @@ -1252,5 +1255,6 @@ Important conventions:
CopilotService.OnStateChanged -= RefreshSessions;
CopilotService.OnSessionComplete -= HandleSessionComplete;
CopilotService.OnUsageInfoChanged -= HandleUsageInfoChanged;
RepoManager.OnStateChanged -= OnRepoStateChanged;
}
}
10 changes: 10 additions & 0 deletions PolyPilot/Services/CopilotService.Organization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ private void ReconcileOrganization()
}
}

// Ensure every tracked repo has a sidebar group (even if no sessions exist yet)
foreach (var repo in _repoManager.Repositories)
{
if (!Organization.Groups.Any(g => g.RepoId == repo.Id))
{
GetOrCreateRepoGroup(repo.Id, repo.Name);
changed = true;
}
}

// Build the full set of known session names: active sessions + aliases (persisted names)
var knownNames = new HashSet<string>(activeNames);
try
Expand Down
11 changes: 11 additions & 0 deletions PolyPilot/Services/RepoManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ public async Task<RepositoryInfo> AddRepositoryAsync(string url, Action<string>?
try { await RunGitAsync(existing.BareClonePath, ct, "config", "remote.origin.fetch",
"+refs/heads/*:refs/remotes/origin/*"); } catch { }
await RunGitWithProgressAsync(existing.BareClonePath, onProgress, ct, "fetch", "--progress", "origin");
// Ensure long paths are enabled for existing repos on Windows
if (OperatingSystem.IsWindows())
{
try { await RunGitAsync(existing.BareClonePath, ct, "config", "core.longpaths", "true"); } catch { }
}
return existing;
}

Expand Down Expand Up @@ -159,6 +164,12 @@ await RunGitAsync(barePath, ct, "config", "remote.origin.fetch",
await RunGitWithProgressAsync(barePath, onProgress, ct, "fetch", "--progress", "origin");
}

// Enable long paths on Windows (repos like dotnet/maui exceed MAX_PATH)
if (OperatingSystem.IsWindows())
{
try { await RunGitAsync(barePath, ct, "config", "core.longpaths", "true"); } catch { }
}

var repo = new RepositoryInfo
{
Id = id,
Expand Down
Loading