Skip to content

Fix inconsistent repo picker: use dropdown in both new session and multi-agent flows#404

Open
StephaneDelcroix wants to merge 1 commit intomainfrom
fix/in-new-session-the-repository-is-a-dropd-20260318-0939
Open

Fix inconsistent repo picker: use dropdown in both new session and multi-agent flows#404
StephaneDelcroix wants to merge 1 commit intomainfrom
fix/in-new-session-the-repository-is-a-dropd-20260318-0939

Conversation

@StephaneDelcroix
Copy link
Collaborator

Bug

In 'New Session' the repository selector is a <select> dropdown, but in 'New Multi-Agent' it was a list of clickable buttons. This inconsistency is confusing.

Fix

Changed the multi-agent repo picker (Step 1 in SessionSidebar.razor) from a button list to a <select> dropdown matching CreateSessionForm:

  • Multiple repos: <select class="ns-repo-select"> dropdown with placeholder option
  • Single repo: <div class="ns-repo-label"> label (auto-advances to Step 2)
  • No repos: Existing 'no repositories' message

Also added OnMultiAgentRepoChanged handler and auto-advance logic when there's exactly 1 repo.

Tests

Added RepoPickerConsistencyTests.cs (8 tests) verifying:

  • Both forms use <select> with ns-repo-select class
  • Multi-agent picker no longer uses button list
  • Single-repo label behavior matches
  • Auto-advance and placeholder option exist
  • Handler exists for dropdown change event

All 2760 tests pass.

…w multi-agent flows

The 'New Session' form (CreateSessionForm.razor) used a <select> dropdown for
repository selection, while the 'New Multi-Agent' flow (SessionSidebar.razor)
used a list of clickable buttons. This was confusing for users.

Changes:
- Replace button list in multi-agent Step 1 with <select class="ns-repo-select">
  dropdown, matching the CreateSessionForm pattern
- Add placeholder option ('Pick a repo') for the dropdown
- Show ns-repo-label when there's only 1 repo (matches single-repo behavior)
- Auto-advance to Step 2 (preset picker) when there's exactly 1 repo
- Add OnMultiAgentRepoChanged handler for the dropdown's onchange event

Tests:
- Add RepoPickerConsistencyTests.cs with 8 tests verifying both forms use
  the same <select> pattern, ns-repo-select class, single-repo label, and
  auto-advance behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant