Give the phone the rest of its screens, and a way in
ci / build and test (push) Failing after 2s
ci / android head (push) Failing after 1s

All seven screens of the design, plus the two it does not draw because it starts at an
enrolled phone: naming a server, and choosing a passphrase.

The five states docs/android-port.md worried about losing at 360dp are all here and none
of them softened. The changed-key refusal is a full-screen panel rather than a bottom
sheet, because a sheet is swipe-to-dismiss by convention and that screen must have no way
forward. The recovery code raises FLAG_SECURE for its own state and lowers it afterwards,
so the sentence about screenshots is true rather than decorative. The delete
confirmations keep their counts and replace the row in place.

Signing in works, and the seam it needed is worth more than the implementation:
IAuthorizationCallback now sits between OidcClient and the loopback listener, so the two
heads differ in where the response arrives and in nothing else. PKCE, the state check,
discovery, the token exchange and the key binding stay one implementation — a second OIDC
client would be a second place for a security bug to live. The phone registers a
private-use scheme with the system rather than binding a loopback port, which on a shared
device any other app can do first.

The accessory key row needed TerminalWorkspace.SendInputAsync: ordinary typing goes from
the renderer straight down the socket, and there was no way in for the keys a software
keyboard does not have. Ctrl latches, because one thumb cannot chord, and the latch is
drawn — a modifier that is on and does not look on is how somebody sends ^L to a database
prompt believing they typed an l.

597 client tests green, including two new ones for the input path and one for the
terminal surface command. Nothing has run on a device.
This commit is contained in:
2026-07-31 21:43:11 +02:00
parent 81e7e6d939
commit 7a3a521c59
51 changed files with 2144 additions and 134 deletions
@@ -0,0 +1,56 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:DodoSSH.Client.Shell.ViewModels"
x:Class="DodoSSH.Client.Android.Views.ServerScreen"
x:DataType="vm:MainWindowViewModel"
Background="{StaticResource Canvas}">
<!--
Not in the design, which starts at an enrolled phone — but it is ShellState.NeedsServer and the only
state that requires a network, so a head without it cannot be used on a phone that has never signed in.
One field and one button. Everything about the identity provider comes from the server's own
/.well-known/dodossh-configuration, so there is no authority, client id or scope to type — which is the
whole reason this screen is one box on a phone rather than a form.
-->
<ScrollViewer>
<StackPanel Margin="24,0" VerticalAlignment="Center" Spacing="0">
<StackPanel Spacing="10" HorizontalAlignment="Center" Margin="0,48,0,36">
<Border Width="44" Height="44" BorderBrush="{StaticResource Accent}" BorderThickness="1"
HorizontalAlignment="Center">
<TextBlock Text="&gt;_" Foreground="{StaticResource Accent}" FontFamily="{StaticResource MonoFont}"
FontSize="16" FontWeight="SemiBold"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<TextBlock Classes="title" Text="DodoSSH" HorizontalAlignment="Center" />
</StackPanel>
<TextBlock Classes="label" Text="SERVER" />
<TextBox Classes="field" Margin="0,6,0,0" Text="{Binding ServerUrl}"
PlaceholderText="https://dodossh.example.com"
IsEnabled="{Binding !IsBusy}">
<TextBox.KeyBindings>
<KeyBinding Gesture="Enter" Command="{Binding SignInCommand}" />
</TextBox.KeyBindings>
</TextBox>
<Button Classes="primary" Content="SIGN IN" Margin="0,10,0,0"
Command="{Binding SignInCommand}" IsEnabled="{Binding !IsBusy}" />
<!--
Said before the browser opens rather than after. RFC 8252 §8.12 requires the system browser and not
an embedded one, which means the user is about to be handed to another application — and an SSH
client that bounces you out to Chrome with no warning looks like it has crashed.
-->
<TextBlock Classes="detail" Margin="0,14,0,0" TextWrapping="Wrap" TextAlignment="Center"
Text="opens your browser to sign in · DodoSSH never sees your password" />
<TextBlock Classes="body" Margin="0,16,0,0" TextAlignment="Center" Text="{Binding StatusMessage}" />
</StackPanel>
</ScrollViewer>
</UserControl>