fix: validate Quick Connect and ~/.ssh/config imports; unknown enum values no longer reset a profile's config

- Quick Connect runs the same validation as saved profiles, so an SSH
  connection without a username fails up front with a clear message (F5).
- ~/.ssh/config imports fill a missing User (and jump-host user) with the
  local user name, as ssh does, and skip blocks that still don't validate,
  reporting how many (F6).
- An unrecognised hostKeyPolicy/lineEnding/parity/flowControl/direction in
  a stored config falls back to that field's default instead of failing
  the whole JSON column and silently resetting every other setting; parse
  failures that remain are logged (F7).
This commit is contained in:
Andy Dixon
2026-10-12 09:19:03 +01:00
parent 3b490fa6c3
commit bd1dc54e20
7 changed files with 90 additions and 14 deletions
+7 -3
View File
@@ -586,9 +586,13 @@ impl App {
Request::Connect(id) => self.connect_profile(&id, false),
Request::ConnectQuick(p) => {
let name = if p.display_name.is_empty() { p.host.clone() } else { p.display_name.clone() };
let sid = self.s.svc.connect_quick(p);
self.add_session(&sid, true);
self.s.info(format!("Connecting to {name}…"));
match self.s.svc.connect_quick(p) {
Ok(sid) => {
self.add_session(&sid, true);
self.s.info(format!("Connecting to {name}…"));
}
Err(e) => self.s.error(format!("Can't connect to {name}: {e}")),
}
}
Request::ReloadProfiles => self.s.reload_profiles(),
Request::ReloadPreferences => {