- core/monitor.py: add fast metrics script (0.3s vs 1.4s sleep),
collect() now defaults to fast=True for responsive UI
- ui/workers.py: MonitorWorker changed from loop mode to single-shot
(QTimer re-arms next cycle on finished signal, avoids paramiko
blocking in infinite loop)
- ui/widgets.py: remove debug print from _kick_one_sample
- test_monitor_nonblock.py: fix sample counting by wrapping _on_sample
instead of disconnecting signals (old approach missed new workers)
- test_process_monitor.py: assertions account for MAX_RENDER_ROWS=200,
fix MEM% column index (4 not 3) in sort test
User reported: '已连接, 但终端啥也不显示'
Likely cause: command ran but stdout was empty / scrolled to wrong place
/ output widget didn't refresh before worker finished.
Changes:
- Eagerly show the typed command in the output area (\$ <cmd>) so user
sees the input was received even if the worker hangs/fails
- Show '(stdout 为空)' placeholder when worker returns no output, so it's
clear the worker actually ran
- Force output.repaint() and ensureCursorVisible() after append
- Add 2 diagnostic buttons in terminal bottom bar:
* [🔍 诊断] prints current SSH connection / worker state
* [▶ 测试命令] pre-fills a known-good test command
- Make CommandWorker explicitly check conn.connected before exec
- Surface full traceback in stderr on exception instead of bare str(e)
All 15 existing tests still pass (core 6/6 + UI 3/3 + E2E 6/6).