-
Couldn't load subscription status.
- Fork 773
Open
Description
Summary
When using Mosh over unstable networks, users currently have no visual cue for the connection state. This PR proposes making the terminal cursor color automatically change depending on the connection status (e.g. green = healthy, yellow = reconnecting, red = disconnected).
Motivation
- Immediate visual feedback helps users quickly recognize connectivity issues
- Keeps the UI minimal, with no extra text clutter
- Useful especially for mobile / flaky links
Design
- Hook into Mosh's internal state machine or status update loop
- Emit ANSI escape sequences to set cursor color accordingly
- Make color thresholds and states configurable (via
.moshrcor env var) - Fallback to default behavior if terminal doesn’t support cursor-color escape
Backwards Compatibility
If the client terminal does not support cursor color escapes, behavior gracefully degrades to default.
Testing
- Simulate connection drop / reconnect
- Check color changes on various supported terminals
- Ensure that no visual glitches or flicker occur
Impact
Low performance or network overhead, as this only updates style on state transitions.
Metadata
Metadata
Assignees
Labels
No labels