Skip to content

feat(ssh): rich connection screen with live connection log - #83

Merged
thangnm93 merged 2 commits into
developfrom
feat/ssh-connecting-screen
Jun 24, 2026
Merged

feat(ssh): rich connection screen with live connection log#83
thangnm93 merged 2 commits into
developfrom
feat/ssh-connecting-screen

Conversation

@thangnm93

@thangnm93 thangnm93 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replaces the bare "Connecting to host…" spinner in the SSH session tab with a richer connection screen: a host card, an animated connection graphic, a per-session connection log behind a Show logs panel, and Close/Retry actions.

Closes #82

Changes

  • New SessionConnectingView (app/lib/widgets/session_connecting_view.dart) — host card (OS icon avatar, label, SSH host:port), animated node → line → terminal graphic (spinning while connecting; red/grey on error/disconnected), Show logs panel, Close always, Retry on error/disconnected. Scrolls (centered when it fits) so it never overflows on short/split panes.
  • terminal_view.dart — every non-connected status now renders SessionConnectingView; the old _statusView is removed.
  • Connection log model (app/lib/models/connection_log.dart) — ConnectionLogLevel + ConnectionLogLine, bounded to kMaxConnectionLogLines (200). SshSession gains connectionLog / logConnection() / clearConnectionLog().
  • SessionProvider — logs each connect step (resolve, auth method, jump-host tunnel, host-key verify, established/failed, reconnect countdown) without touching SshService.connect's shared signature. New reconnectSession() for manual retry reuses the same tab/terminal and starts a fresh log.

Type of change

  • feat — new feature
  • fix — bug fix
  • refactor / polish — no behavior change
  • docs — documentation only
  • test — tests only
  • release — version release to master

How was this tested?

  • cd app && flutter analyze — no new warnings on changed files
  • cd app && flutter test — all tests pass (full suite, exit 0)
  • Manually verified on: macOS (real widget rendered via integration_test/connecting_screenshots_test.dart)

New tests: connection-log model (append/bounding/clear), SessionConnectingView (states, Show logs toggle, Close/Retry callbacks, no overflow on a short pane), and SessionProvider connection-log + reconnectSession (logs steps, clears on manual retry, no-op while connecting).

Screenshots

Connecting
Error + logs

Regenerate with: cd app && flutter test integration_test/connecting_screenshots_test.dart -d macos

Checklist

  • PR title follows Conventional Commits
  • Code and comments are written in English
  • New/changed behavior is covered by tests
  • No secrets, credentials, or personal data in the diff

Replace the bare connecting/error/disconnected status view in the session
tab with a host card (OS icon, label, host:port), an animated
node -> line -> terminal graphic, a "Show logs" panel over a new
per-session connection log, and Close/Retry actions.

Connection steps (resolve, auth method, jump-host tunnel, host-key verify,
established/failed, reconnect countdown) are recorded at the SessionProvider
level, so SshService.connect's shared signature is untouched. Manual retry
reuses the same tab/terminal and starts a fresh log. The card scrolls
instead of overflowing on short panes.

Refs #82
Adds integration_test/connecting_screenshots_test.dart (render-tree capture,
no Screen-Recording permission) that pumps SessionConnectingView in its
connecting and error+logs states, plus the captured PNGs under
screenshots/01-terminal-ssh/.

Refs #82
@thangnm93
thangnm93 merged commit a285f30 into develop Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant