Repository navigation
fix: show the SSH key name in SSH connection dropdowns - #1602
susheelg1197 wants to merge 1 commit into
Conversation
Two connections to the same server with separate SSH keys looked the same in the repository wizard's SSH Connection dropdown (and in the restore and source pickers), since each entry showed only user@host and the port. Each entry now also shows its SSH key's name, which the connections API already returns, so the two can be told apart. Fixes karanhudia#1601 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Description
With two Remote Machines connections to the same server, each using its own SSH key (the setup from #1498 / discussion #109), the SSH Connection dropdown showed two identical entries,
borg@host/Port 22. So under Repositories → Import Existing → Remote Client you couldn't tell which connection you were picking.The friendly name in that setup is the connection's SSH key name (for example
borgserver-repo1), whichGET /ssh-keys/connectionsalready returns asssh_key_name. Each dropdown entry now shows it on its second line, before the port:SshConnectionSelect(the shared picker used by the repository wizard's location and data-source steps and by Quick Start) gains an optionalssh_key_nameand puts it in the secondary line. A connection without a key name shows exactly what it showed before.MenuItems, shows the key name the same way.SSHConnectioninterfaces inRepositoryWizard,RestoreWizardandWizardStepRestoreDestinationdeclare the field the API already sends.No backend change was needed.
Related Issue
Fixes #1601
Type of Change
Testing
src/components/shared/__tests__/SshConnectionSelect.test.tsx.borg@borg.example.comwith keysborgserver-repo1andborgserver-repo2show different options. This test fails without the change.Port 22 • /backups.npm run typecheck,npm run lint(oxlint) andprettier --checkon the changed files pass.npx vitest run src/components: 2165 passed, 1 failed. The failure isWizardStepScheduleConfig > formats first run time with localeString inline, which fails the same way without this change; it looks tied to this machine's locale or timezone.Checklist
maintoo)Additional Context
I wrote this with an AI coding assistant (Claude Code), then reviewed the change myself and ran the checks above.
Note: By submitting this pull request, you agree that your contributions will be licensed under the GNU Affero General Public License v3.0 (AGPL-3.0), the same license as this project.
🤖 Generated with Claude Code
Visual regression report
Visual changes detected: 1 changed, 0 added, 0 removed, 1377 unchanged.
Report: https://docs.borgui.com/visual/reports/pr-1602/
Workflow run: https://github.com/karanhudia/borg-ui/actions/runs/46042878433
Changed files
- `quick-start-agent-command-copying--without-clipboard-api--mobile.png` (0.13%)New screenshots
- NoneRemoved screenshots
- None