Stop drawing client overlay over TUIs
ci / test (push) Has been cancelled
ci / remote-bench (push) Has been cancelled

This commit is contained in:
DuProcess
2026-06-12 13:03:39 -04:00
parent fd7849f889
commit f8df38efb0
-29
View File
@@ -601,7 +601,6 @@ async fn run_terminal(
let addr = resolve_addr(&cred.udp_host, cred.udp_port)?;
let mut send_seq = 2u64;
let mut last_packet_at = Instant::now();
let mut status_visible = false;
let mut status_tick = tokio::time::interval(Duration::from_secs(1));
let mut resize_tick = tokio::time::interval(Duration::from_millis(250));
let mut last_size = size().unwrap_or((80, 24));
@@ -671,10 +670,6 @@ async fn run_terminal(
recv = socket.recv_from(&mut recv_buf) => {
let (n, _) = recv?;
last_packet_at = Instant::now();
if status_visible {
clear_status_bar()?;
status_visible = false;
}
let packet = protocol::decode(&recv_buf[..n])?;
match packet.header.kind {
PacketKind::Frame | PacketKind::ResumeOk => {
@@ -698,12 +693,6 @@ async fn run_terminal(
_ = status_tick.tick() => {
let stale = last_packet_at.elapsed();
if stale >= Duration::from_secs(2) {
draw_status_bar(&format!(
"DOSH disconnected for {}s | session {} | trying UDP",
stale.as_secs(),
cred.session
))?;
status_visible = true;
let packet = protocol::encode_encrypted(
PacketKind::Ping,
cred.client_id,
@@ -788,24 +777,6 @@ fn render_frame(frame: &Frame) -> Result<()> {
Ok(())
}
fn draw_status_bar(message: &str) -> Result<()> {
let mut stdout = std::io::stdout();
write!(
stdout,
"\x1b7\x1b[1;1H\x1b[44;97m\x1b[K {} \x1b[0m\x1b8",
message
)?;
stdout.flush()?;
Ok(())
}
fn clear_status_bar() -> Result<()> {
let mut stdout = std::io::stdout();
stdout.write_all(b"\x1b7\x1b[1;1H\x1b[K\x1b8")?;
stdout.flush()?;
Ok(())
}
fn cache_path(root: &str, server: &str, session: &str, mode: &str) -> std::path::PathBuf {
let safe = format!("{server}_{session}_{mode}")
.chars()