From 77c7d0bae3b69dc6fccc7cfea7d30aabc1543409 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 13:35:24 -0300 Subject: With no frontend attached, a detached session's messages go after MessageLinger A message lingers until input dismisses it, and a detached session with nobody attached has no input: its messages, and /screen, kept what was said long ago. The session now marks the core unattended while no client is attached, and the core drops a pane's messages once the newest has been up MessageLinger on the clock, checked as it is stepped or served. A pane's older lines go with its newest rather than each on its own clock; the render pipeline's clock is the place for that. Co-Authored-By: Claude Opus 5.5 --- src/detached/server.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/detached/server.zig') diff --git a/src/detached/server.zig b/src/detached/server.zig index b088d833..6a4b5001 100644 --- a/src/detached/server.zig +++ b/src/detached/server.zig @@ -770,6 +770,8 @@ pub const Session = struct { const completed = s.ninep_wake.swap(false, .acq_rel) or drained; for (&s.clients) |*c| if (c.fd >= 0) s.flush(c); const regridded = s.reconcile(); + // Nobody attached, nobody to dismiss a message (expireUnattended). + s.core.unattended = s.primary() == null; const now = monotonicMs(); var fds: [poll_slots]libc.pollfd = undefined; -- cgit v1.3