A screen for the machines, and failures a phone can act on
The other half of making setups editable: add, rename, rediscover and remove, with a Test that tries a machine before anything is saved. The screen cannot name a program, which is the point rather than an omission -- providers are what the server found when it asked, so this app has no way to introduce something to run. The dialog says so, because "what it can run is discovered, not typed" is the answer to the question a person will otherwise ask when they look for a command field. Two things running it changed. The card showed "this machine / this machine", because the seeded setup is *called* that and my fallback line for a local setup said the same -- the line now says something the name cannot also be. And the header row absorbed a fifth action without complaint, which is the earlier title-and-actions split paying off exactly as its comment predicted. **Host key verification is the failure that would have made this look broken.** Every machine fails it the first time, because its key is not in known_hosts yet, and ssh's own words -- "Host key verification failed." -- are written for somebody at a terminal on the backend, which is exactly who is not reading a phone. It now says what to do: ssh to it once from the backend and try again. Permission denied gets the same treatment. Deliberately *not* fixed by relaxing StrictHostKeyChecking. Accepting a new key is a decision somebody should make with the key in front of them, not something this app does quietly on their behalf while adding a machine. Verified on the emulator against a running server: the seeded setup renders with what was discovered on it, the add dialog explains itself, and Test against an untrusted machine produces the full explanation rather than ssh's four words. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017xn8nHw1tw1R6PtiY1eEtw
This commit is contained in:
1 parent
19e3531c5d
commit
3c144f8070
5 files changed
+506
-19
No files matched your search
@@ -24,6 +24,8 @@ private sealed class Screen {
|
||||
|
||||
data object Models : Screen()
|
||||
|
||||
data object Setups : Screen()
|
||||
|
||||
data object Settings : Screen()
|
||||
}
|
||||
|
||||
@@ -76,6 +78,7 @@ fun AppRoot(settingsVersion: Int) {
|
||||
onSpawn = { screen = Screen.Spawn },
|
||||
onUsage = { screen = Screen.Usage },
|
||||
onModels = { screen = Screen.Models },
|
||||
onSetups = { screen = Screen.Setups },
|
||||
onSettings = { screen = Screen.Settings },
|
||||
)
|
||||
is Screen.Session ->
|
||||
@@ -95,6 +98,7 @@ fun AppRoot(settingsVersion: Int) {
|
||||
)
|
||||
is Screen.Usage -> UsageScreen(settings = current, onBack = goToList)
|
||||
is Screen.Models -> ModelsScreen(settings = current, onBack = goToList)
|
||||
is Screen.Setups -> SetupsScreen(settings = current, onBack = goToList)
|
||||
is Screen.Settings ->
|
||||
SettingsScreen(
|
||||
existing = current,
|
||||
|
||||
Reference in new issue
Block a user