krdc-ssh/PLAN.md

1.2 KiB

KRDC SSH Plugin

Architecture

KRDC plugin that provides SSH terminal sessions. Embeds KonsolePart (KDE's terminal KPart) inside a RemoteView subclass. KonsolePart runs ssh user@host -p port via startProgram() — handles terminal emulation, rendering, and input natively.

Key Discovery

KRDC's RemoteViewScrollArea does NOT use setWidgetResizable(true). Instead it emits resized(w, h) connected to scaleResize(). The view MUST call resize(w, h) on itself in scaleResize to get a non-zero size. The m_connected guard in resizeEvent prevents the re-entrant crash during tab insertion show sequence.

Checklist

  • Core plugin implementation
  • Configuration UI (username, identity, tunneling, options)
  • Fix crash: scaleResize during show (m_connected guard in resizeEvent)
  • Fix crash: disconnect (deleteLater instead of delete)
  • Fix blue screen: startProgram needs full path (QStandardPaths)
  • Fix blue screen: scaleResize isVisible() guard was blocking initial resize
  • Reverted to startProgram (not showShellInDir) for proper lifecycle
  • Verify: no crash, no blue screen, ssh works on first connection
  • Clean up dead code / unnecessary deferred resize in resizeEvent
  • Squash/tidy commits if desired