Give DodoSSH a phone, and a shared shell for both heads to drive

The Android head from docs/android-port.md, taken as far as its step 6.

Step 3, the spike, is answered and its throwaway screen is gone: libsodium.so and
libe_sqlite3.so are both in the arm64 APK, so NSec resolves its native half on Android
despite shipping no Android build, and the local cache opens. Two findings the audit
could not have had: Avalonia.Controls.WebView only ships net10.0-android36.0, which
settles the open "which Android versions" question at targetSdk 36; and Android has
blocked cleartext HTTP since API 28, so the terminal renderer needs a network security
config scoped to 127.0.0.1 or the WebView loads nothing.

DodoSSH.Client.Shell is new and is why the phone can exist: the view models, the terminal
renderer files and the palette moved there so both heads drive one state machine and draw
from one set of tokens. The desktop head is otherwise untouched and its 144 tests still
pass.

The platform pieces behind interfaces that already existed: the profile directory from
filesDir, a device key wrapped by a StrongBox-backed key that a fingerprint releases, and
a foreground service so a shell outliving a vault lock stays true on a platform that
stops backgrounded processes.

Sign-in is deliberately absent rather than approximated. It needs an app link, because
reusing the desktop loopback listener is the attack RFC 8252 section 8.3 names.
This commit is contained in:
2026-07-31 20:58:48 +02:00
parent 03e902a2d2
commit fe9d7fc289
65 changed files with 3034 additions and 103 deletions
@@ -0,0 +1,69 @@
/*
The page is the terminal surface and nothing else. No chrome, no scrollbars of its own: the
window, tabs and splits are Avalonia's job, and duplicating any of it here would mean two
layout systems disagreeing about the same pixels.
*/
:root {
--dodo-background: #10131a;
--dodo-foreground: #d5d8de;
--dodo-muted: #7b8394;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
background: var(--dodo-background);
color: var(--dodo-foreground);
font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}
#root {
position: absolute;
inset: 0;
}
/*
Every session gets a pane, and all but the active one are hidden rather than destroyed. On a
dropped connection the DOM and its scrollback must survive: rebuilding the terminal would
discard everything the user was reading, which is the one thing they cannot get back.
*/
.pane {
position: absolute;
inset: 0;
display: none;
/* A little breathing room, and it keeps the WebGL canvas off the window edge. */
padding: 4px 2px 2px 6px;
}
.pane[data-active="true"] {
display: block;
}
.pane > .xterm {
height: 100%;
}
#status {
position: absolute;
left: 0;
right: 0;
bottom: 0;
padding: 6px 10px;
font-size: 12px;
color: var(--dodo-muted);
background: color-mix(in srgb, var(--dodo-background) 88%, white);
border-top: 1px solid color-mix(in srgb, var(--dodo-background) 70%, white);
}
/* Once a session is running the banner is noise, so it only shows when it has something to say. */
#status:empty {
display: none;
}