mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-21 16:02:20 +00:00
fix(remote): name the machine, not its profile UUID, when a reconnect fails
A reconnect labelled its target with RemoteTarget's Display, which spells a Profile target as the config UUID behind it. The banner's own half of the sentence resolves the name through the live config, so one line said both 'Reconnecting to java-box' and 'could not reach 51d32f65-...'. Use target_label, which #485 added for exactly this.
This commit is contained in:
@@ -1773,7 +1773,11 @@ fn client_id_for(cx: &gpui::App, host: HostId, store_key: &str) -> Option<Worksp
|
||||
}
|
||||
|
||||
fn launch_attempt(cx: &mut gpui::App, host: HostId, target: RemoteTarget) {
|
||||
let label = target.to_string();
|
||||
// Not `target.to_string()`: a `Profile` target spells itself as its config
|
||||
// UUID, and this label is what the failure the strip shows names the
|
||||
// machine (#485). The reconnect banner beside it already reads the live
|
||||
// config for the same name, so the two disagreed mid-sentence.
|
||||
let label = remote_connect::target_label(cx, &target);
|
||||
let header = match remote_connect::control_route(&target, cx) {
|
||||
Ok(header) => header,
|
||||
Err(e) => {
|
||||
@@ -1833,7 +1837,7 @@ fn finish_attempt(
|
||||
target: &RemoteTarget,
|
||||
outcome: Result<(remote_connect::Connected, Vec<String>), String>,
|
||||
) {
|
||||
let label = target.to_string();
|
||||
let label = remote_connect::target_label(cx, target);
|
||||
match outcome {
|
||||
Ok((connected, sent)) => {
|
||||
let restarted = server_restarted(cx, host, &connected.host);
|
||||
|
||||
Reference in New Issue
Block a user