Commit Graph

4 Commits

Author SHA1 Message Date
373294e2b9 Fix frozen client on ctrl+q: send bye instead of half-closing
Dropping the client's channel sender never closed the socket (the
server's reader thread keeps the connection open), so the client froze
waiting for frames. The server now sends a bye message; the client
exits cleanly on it and its socket close lets the server clean up.
Messages from already-disconnected clients are ignored. Verified
end-to-end with the real client in a PTY (exits 0, daemon survives).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 19:08:04 +02:00
db18c42481 Add --help, terminal scrollback + scrollbar, run-dialog fix, client-safe exit, true rounded corners
- -h/--help prints a full usage overview (modes, config keys, keys, mouse)
- Run dialog now executes the typed command directly in the new window
  (previously it spawned the default shell and typed the command into
  it, which showed up as just an empty terminal)
- Virtual terminals get vt100 scrollback (config scrollback_lines,
  default 1000): mouse wheel scrolls history when the app doesn't
  capture the mouse, arrow-key fallback on the alternate screen, any
  keypress jumps back to the bottom; optional scrollbar on the right
  border (show_scrollbar) plus configurable default_window_size
- Exit triggered from a connected display client (ctrl+q / panel
  button) now only disconnects that client — the daemon/standalone
  session and its programs keep running
- Windows now paint the border zone in the desktop background color so
  rounded corners actually look rounded instead of a filled square
  with an inner rounded frame; popup dialogs rounded too
- Integration suite extended to 19 checks (scrollback, run dialog,
  client-safe exit) — all passing

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 18:58:45 +02:00
6aee7ce00a Fix wide-char (emoji/CJK) column drift through the whole render chain
Wide characters shifted everything after them one column to the right:

- render.rs: vt100's empty wide-continuation cell was padded to a
  space, making wide chars occupy 2+1 columns — skip it entirely
- ipc.rs buffer_to_ansi: same bug for daemon frames — skip cells
  covered by a preceding wide symbol (unicode-width)
- app.rs: clamp virtual terminals to >= 2 columns (vt100 0.16 has a
  subtraction underflow panic on wide chars in a 1-col grid) and give
  content_area a sane 80x24 default so windows spawned before the
  first layout pass aren't degenerate
- main.rs: use try_send for display frames so one slow/stalled client
  can no longer freeze the whole WM
- integration test: new end-to-end check that emoji do not shift the
  row, plus fix a false match against the window title

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:33:06 +02:00
f0bed7a14e Full remote input parity: forward mouse and structured key events over IPC
- New key_event/mouse_event client messages (crossterm serde) that run
  through the complete WM event handling on the server — remote clients
  get window focus, drag/resize and mouse forwarding into virtual
  terminals (SGR/UTF-8/X10) identical to standalone mode
- tui-wm -c now forwards mouse events; previously only keyboard worked
  remotely
- IPC unit tests + end-to-end integration test (tests/integration.py):
  daemon, frames, click/scroll SGR forwarding, popups, TUI-FM in a
  window — 12/12 passing
- Document the new messages in SOCKET_API.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 19:50:27 +02:00