Skip to content

Fix dmsgpty#341

Merged
0pcom merged 2 commits intoskycoin:developfrom
0pcom:improve-dmsgpty
Mar 5, 2026
Merged

Fix dmsgpty#341
0pcom merged 2 commits intoskycoin:developfrom
0pcom:improve-dmsgpty

Conversation

@0pcom
Copy link
Collaborator

@0pcom 0pcom commented Mar 5, 2026

  • Add Env field to CommandReq struct for passing environment variables through the RPC protocol
  • Update Pty.Start to accept and merge client environment variables with host environment (client vars override host vars)
  • Capture essential env vars (TERM, COLORTERM, LANG, LC_ALL) from CLI client and pass to remote PTY
  • Default to TERM=xterm-256color if not set by client
  • Set TERM=xterm-256color for UI sessions (web terminal)
  • Remove debug log.Print("xxxx") in ui.go
  • Update dependencies

This fixes terminal rendering issues caused by missing TERM variable when connecting to remote PTY sessions.

0pcom added 2 commits March 5, 2026 14:50
- Add Env field to CommandReq struct for passing environment variables
  through the RPC protocol
- Update Pty.Start to accept and merge client environment variables
  with host environment (client vars override host vars)
- Capture essential env vars (TERM, COLORTERM, LANG, LC_ALL) from
  CLI client and pass to remote PTY
- Default to TERM=xterm-256color if not set by client
- Set TERM=xterm-256color for UI sessions (web terminal)
- Remove debug log.Print("xxxx") in ui.go
- Update dependencies

This fixes terminal rendering issues caused by missing TERM variable
when connecting to remote PTY sessions.
UI improvements:
- Add terminal resize support: client sends resize events to server,
  server updates PTY dimensions via SetPtySize
- Add automatic reconnection with up to 5 retry attempts
- Add visual connection status messages (connecting, connected,
  disconnected, reconnecting)
- Improve terminal styling with VS Code-like dark theme
- Add cursor blinking and better font settings
- Debounce resize events to prevent excessive updates
- Fix duplicate HTML closing tags at end of term.html

Server improvements:
- Add wsReader that intercepts JSON resize messages from WebSocket
- Parse resize messages with type="resize", cols, rows fields
- Forward regular terminal data to PTY unchanged
- Add bounds checking for terminal dimensions
@0pcom 0pcom merged commit 8a2d1dc into skycoin:develop Mar 5, 2026
3 checks passed
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