v0.4.0 — inline fzf-style mode + manage rebind
sshs v0.4.0 introduces an inline (fzf-style) host browser as the
default command. Type to filter, Enter to ssh, and you're back to
your shell — no alternate-screen takeover, no UI re-entry after ssh.
The full v0.3 management TUI is one flag away: sshc -m (or --manage).
Added
- Inline mode (default
sshc). Opens a ~15-line viewport BELOW
the shell prompt via ratatui'sViewport::Inline. Type to filter
immediately (fzf muscle memory),↑/↓orj/kto navigate,
Enterto ssh,Esc/Ctrl+Cto cancel,rto reconnect to the
last alias. Viewport area is cleared on exit so the shell sees no
residue. Terminal below 12 rows falls back to manage mode with a
one-line stderr notice. - Manage mode (
-m/--manage). The v0.3 alternate-screen
TUI, retained behind a flag. Default behaviour changed in v0.4 —
intentional breaking change for a single-user tool. - Manage-mode key rebind (BRIEF §5):
Enteropens the modify form for sshs.conf-managed hosts;
falls through to$EDITORfor external-source hosts.s— ssh connect (wasEnterin v0.3).m— unbound (merged intoEnter).
ScreenMode { Alternate, Inline(u16) }on TerminalGuard.
RAW_ACTIVE and ALT_ACTIVE tracked separately so the panic hook
doesn't emitLeaveAlternateScreenin inline mode (would
corrupt a normal-mode terminal).InlineApp— lean read-only host browser (no probes, no
modals, no forms, no storage writes).tui::inline_runtime— single-shot event loop +
handle_connect_inlinethat tears down the viewport before ssh
spawn and exits the process with an SshResult-derived ExitCode.src/run.rs—inline()/manage()dispatch helpers.
Keepsmain.rsthin (41 LOC, R-G4).- R-G9 boundary gate enforces inline_app's read-only scope.
examples/inline_prototype.rs— standalone ratatui Viewport
smoke test, useful for terminal-compat triage.
Changed
main()returnsExitCode(Termination). ssh exit codes
propagate to the parent shell from inline mode (Quit→ SUCCESS;
Connect/Reconnect→ low byte of the ssh code;
Crashed/UnknownTermination→ FAILURE).- TerminalGuard's
acquiretakes aScreenMode. Existing v0.3
callers passScreenMode::Alternatefor unchanged behaviour.
Tests
162 (v0.3.0) → 190 (v0.4.0). New: 13 InlineApp unit tests + 5
inline integration tests + ScreenMode equality + 3 manage-rebind
tests (s connects, Enter on external, Enter on managed, m
unbound). All R-G1..R-G9 grep gates clean.
Compatibility
- v0.3 users running
sshcland in inline mode on first launch.
Selection + Enter ssh-connect work as expected. - For the v0.3 behaviour, use
sshc -m. ~/.ssh/config,~/.ssh/config.d/sshs.conf,state.toml
unchanged. First-run setup flow (Include injection) runs in
manage mode only.
See CHANGELOG.md for the full diff vs v0.3.0.