Commit Graph
15 Commits
Author SHA1 Message Date
STRIX e72f1805cc chore: exclude .verify screenshots from repo 2026-09-09 09:02:47 +08:00
STRIX 6c8f687ac8 fix: robustness fixes + diagnostics validated by full E2E
Fixes (verified via real SSH E2E against WSL sshd):
- KeysPage: taskpool key generation race fix
- OhosTcpSocket: send queue + watchdog for socket teardown
- TerminalPage: refresh + activeState drive fix, password panel
- Transport: NEWKEYS pipeline block + queuedPackets flush
- SshSession: onClose timing fix
- TerminalSession: handleSshClosed, password retry state
- PacketCodec: diagnostics for decode path

Diagnostics added during E2E debugging:
- TerminalPage.sendTextLine input logging
- Channel: open conf hex / window adjust / reply / write-blocked logs
- TerminalSession: input-dropped warn, openShell result logs

E2E evidence: Haven (HavenE2E emulator) -> WSL Debian sshd :2223,
TOFU accept (SHA256:5LteCJGn...), password auth, PTY shell READY,
command 'echo HAVEN-E2E-OK> /tmp/haven_e2e_final.txt' sent via Text bar,
file verified on host via wsl cat.
2026-09-09 09:02:34 +08:00
STRIX 86db8b01bf T12: background keep-alive, last-tab persistence, startup polish
- BackgroundKeepAlive: DATA_TRANSFER continuous task held while any
  session is READY (wantAgent + backgroundTaskManager), released when
  none remain; deduped, called from SessionManager.notify()
- SessionManager: setAppContext(context) supplied by Index at startup
- Index: restore last selected tab from Settings.last_tab and persist
  every user tab change; initial tab via Tabs index param
- EntryAbility: apply persisted keep-screen-on flag when the main
  window is created; project header + Haven log tag
2026-09-08 18:56:52 +08:00
STRIX 6aed2f3634 T11: terminal canvas, keyboard toolbar, settings
TerminalSession:
- shell integration: ensureShell() opens PTY+shell with emulator created
  first (renderable during handshake); channel onClose -> CLOSED
- I/O API: sendBytes/sendText/sendKey (DECCKM-aware)/sendPaste
  (bracketed-paste aware); resizeTerminal -> emulator.resize + pty
  window-change; OSC 0/2 title wins over label; inputVersion counter
  lets the canvas snap back to live view on any user input

TerminalCanvas:
- full-area Canvas renderer; cell size from measureText('M')
- merged style runs (one fillText per run), wide-cell 2-cell spans
- dirty-row incremental redraw live, full redraw while scrolled back
- block/underline cursor, always visible on alternate screen
- xterm-256 palette + truecolor + reverse/dim/bold/italic/underline/strike
- pinch zoom 6-30vp with persisted setting; PTY resize on relayout
- touch: SGR mouse reports in mouse mode, else scrollback drag + tap
  focuses the hidden 1px IME anchor TextInput

KeyboardToolbar (Haven default two-row layout):
- Row1: snippets/keyboard/Esc/Tab/Paste/Text///Home/Up/End/PgUp
- Row2: Shift/Ctrl/Alt/arrows/PgDn/|/~/\backslash/`
- sticky modifiers: one-shot tap, double-tap lock (bordered), consume
  on dispatch; Ctrl+symbol via ch & 0x1f; Alt prefixes ESC

TerminalPage:
- READY body mounts canvas + toolbar + whole-line text input overlay
  (CJK path) + snippet macro panel (^C ^D ^Z ^L ^A ^E ^W ^U Shift-Tab)
- soft-keyboard toggle via FocusController on the hidden IME anchor

SettingsPage:
- color scheme picker with live preview blocks (4 schemes)
- font size slider 6-30vp, keep-screen-on toggle (window API)
- about (AGPL-3.0 + upstream attribution), diagnostics entry
2026-09-08 18:48:25 +08:00
STRIX 72a4e127e3 T10: key management UI
- KeysPage: list (name / algorithm / SHA256 fingerprint / date) with
  long-press menu (copy public key / rename / delete)
- FAB menu: generate / paste import / file import
- generate: name + type chips (Ed25519 / ECDSA P-256 / RSA-4096),
  taskpool background thread (@Concurrent generateKeyTask), busy overlay
- paste import: TextArea + parse preview (type + fingerprint) + confirm
- file import: DocumentViewPicker (.pem/.key/.txt) + chunked read +
  parse (encrypted containers rejected by parser)
- import re-serializes to canonical openssh-key-v1 with name as comment
- delete guarded by KeyRepository.isUsed (hosts referencing the key)
- copy public key builds authorized_keys one-liner onto clipboard
2026-09-08 18:19:45 +08:00
STRIX 12c73d7a87 T9: main UI shell + connection management
- session/TerminalSession: kit-free connect orchestrator (CONNECTING ->
  HOSTKEY_WAIT -> AUTHENTICATING/AUTH_REQUIRED -> READY/CLOSED/ERROR),
  fresh SshSession per attempt, inline password retry with optional
  remember+persist, friendly error mapping
- session/SessionManager: process-wide session registry with listener
  notify and active-session tracking
- ui/SessionLaunch: SessionDeps assembly (repos + TOFU dialog + crypto
  envelopes), host-key AlertDialog (save/once/reject), toast/clipboard,
  quick-connect and host-profile spec builders
- pages/Index: bottom Tabs shell (connections/terminal/keys/settings)
  with AppStorage-driven cross-page tab switching
- ui/ConnectionsPage: quick-connect bar, search, LazyForEach host list,
  long-press context menu (edit/copy/forget-password/delete), FAB +
  bindContentCover editor, delete/forget confirm dialogs
- ui/HostEditSheet: full-screen host editor (label/host/port/user,
  password/key auth chips, key Select, 8-color tag picker)
- ui/TerminalPage: session tab strip + per-state overlays (progress,
  inline password prompt, error/closed with reconnect)
- ui/KeysPage/SettingsPage: stage placeholders (diag entry kept)
- ssh/SshSession: optional onClosed callback for transport loss
- data/KnownHostRepository: fix missing KnownHostStore import (T8
  post-build regression)
2026-09-08 18:06:40 +08:00
STRIX b60f634b76 T8: data layer (RDB schema, SecretStore, OpenSSH key containers, repositories)
- data/Models.ts: AuthMethod/SshKeyType enums, HostProfile/KeyRecord/KnownHostRow
- data/Database.ts: haven.db (S3) with version-ladder migration, getInstance/openFresh
- data/SecretStore.ts: Asset-backed master key (Preferences fallback), ENC: password
  envelopes, AES-256-GCM private key files under files/keys/
- data/OpenSshKey.ts: kit-free openssh-key-v1 serialize/parse (raw magic, mpint-style
  EC scalars, checkint/padding validation, cross-checked pub blobs) + PKCS#1/SEC1/
  PKCS#8 PEM import, encrypted containers rejected
- data/KeyGenerator.ts: ed25519/ecdsa-p256/rsa-4096 generation with fingerprints
- HostRepository/KeyRepository/KnownHostRepository(DbKnownHostStore)/SettingsRepository
- common/QuickConnect.ts: user@host[:port] parser incl. bracketed IPv6
- DiagPage button 12: generate Ed25519, persist, reopen fresh handles, read back
- Node self-test 19/19 incl. real ssh-keygen interop both directions (-y roundtrip)
2026-09-08 17:20:05 +08:00
STRIX b18039991b T7: VT terminal emulator (parser, buffer, emulator, input, self-test)
- VtParser: Paul Williams state machine subset - UTF-8 decode (strict,
  FFFD on overlong/surrogate/interrupt), C0 execute, C1 shortcuts,
  ESC/ESC_INT/SS3/CSI/OSC(BEL|ST)/DCS(prefix+hook+data)/STR strings,
  CAN/SUB abort, reprocess semantics for aborted strings
- TerminalBuffer: main + lazy alt grids, scrollback 5000 (main only,
  region top==0), DECSTBM margins, tab stops, IL/DL/ICH/DCH/ECH/SU/SD/
  RI with wide-cell orphan repair, per-row dirty flags, resize
- TerminalEmulator: SGR (16/256/truecolor, 38;2/48;2), deferred wrap
  (DECAWM), DECSET/RST 1/6/7/25/47/1000/1002/1003/1004/1006/1047/1048/
  1049/2004, origin mode, IRM, DECSC/RC + CSI s/u, DECSTBM, RIS, DECALN,
  REP; replies DA1 ESC[?1;2c, DA2 ESC[>0;100;0c, DSR 5/6, XTVERSION
  DCS >|HavenOH(0.1) ST, CSI 18t size report; OSC 0/2/7/8/9/52/777 with
  hyperlink scheme whitelist
- VtInput: xterm key encodings (arrows/DECCKM/Home/End/PgUp..F12 with
  modifier params, F1-F4 SS3, ctrl/alt maps), bracketed paste, SGR mouse
- VtSelfTest: 12 cases incl. CJK double-width, alt-screen round-trip,
  scrollback growth, scroll region + RI, query replies, and the
  'echo ni hao && vim' byte-stream replay (T7 acceptance) - 12/12 pass
- DiagPage: button 11 runs the emulator self-test

Verified: Node 24 transform-types run 12/12 PASS; hvigor BUILD SUCCESSFUL
2026-09-08 15:50:09 +08:00
STRIX edb66effd9 T6 review: suppress orphaned open() timer rejection when sendPacket fails first 2026-09-08 14:48:17 +08:00
STRIX 9346cbb646 T6: user auth (none/publickey/password), session channel, keepalive, SshSession facade
- Auth.ts: SERVICE_REQUEST handshake, none probe, publickey query + signed
  request (sig over string(session_id) || payload-without-signature;
  Ed25519 raw / ECDSA DER->mpint r||s / RSA PKCS1 SHA256/512), password
  fallback; skip-list wait loop (DISCONNECT/IGNORE/UNIMPLEMENTED/DEBUG/
  EXT_INFO/BANNER); msg60 dual meaning handled per phase
- Channel.ts: open/confirm, pty-req/shell/exec/window-change, chunked
  flow-controlled write, WINDOW_ADJUST at half local window, stderr via
  EXTENDED_DATA, exit-status, EOF/CLOSE lifecycle, per-channel promise
  slots (never overlaps transport.waitPacket)
- KeepAlive.ts: keepalive@openssh.com global request every 15s, dead
  after 3 unanswered probes
- SshSession.ts: state machine (IDLE..CLOSED), KEX with TOFU host key
  verify, post-auth dispatcher routes keepalive replies + channel packets,
  server channels/global requests refused, execCommand collects
  stdout/stderr/exitStatus
- Transport.ts: fix stale waitPacket timer rejecting a fresh waiter
  (clear timer on resolve/reject/re-arm) - latent since T3, amplified by
  the T6 auth loop
- DiagPage: username/password inputs + button 10 (connect -> auth ->
  exec 'echo haven-ok && uname -a')
2026-09-08 14:46:41 +08:00
STRIX 1b8f5caeff T5 review: HostKeyStatus/HostKeyDecision as string enums (ArkTS subset), Kex.parseExtInfo export + diag EXT_INFO reuse 2026-09-08 12:56:39 +08:00
STRIX e6a842d61d T5: KEX engine (curve25519/ecdh-p256, strict-kex, guess-skip), TOFU host key verifier, SHA256 fingerprint, live KEX diag 2026-09-08 12:38:31 +08:00
ROG-X57R e7ef63e042 T4: crypto suite — GCM/CTR/etM/plain MAC packet ciphers, KDF expansion, DerUtils, KeyImport host-key verify, RFC vector self-test 2026-09-08 10:39:24 +08:00
ROG-X57R f8eefa702b T2+T3: platform spike diag page + SSH wire/transport 2026-09-08 08:06:10 +08:00
ROG-X57R e2e79a1d1a T1: scaffold Haven HarmonyOS project (API 26), AGPL-3.0 compliance, permissions 2026-09-08 07:25:24 +08:00