Servers: name a machine after its hostname once it connects

A saved server still named by the app ('My server', 'This server',
'Original legacy server' or its address host/IP) takes the hostname the
machine reports in get_status the first time the app connects; typed
names are kept. New servers (legacy migration, Settings with a blank
name, onboarding) start with the address host. A browser on its page
origin with no saved profile shows the reported hostname too. No server
change: get_status already reports the hostname.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 15:58:28 +00:00
parent 3e817a189b
commit c264f865ff
16 changed files with 654 additions and 24 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ class AppTerminals {
required bool Function() connected,
required ApiGateway gateway,
required String machineId,
required String machineName,
required String Function() machineName,
required this.layout,
WindowManager? windows,
}) : machines = pool != null
@@ -29,9 +29,9 @@ class AppTerminals {
: SingleTerminalMachines(
connection: connection,
connected: connected,
machine: TerminalMachine(
machine: () => TerminalMachine(
id: machineId,
name: machineName,
name: machineName(),
gateway: gateway,
),
) {