This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

Resolve sendData on 'finish' instead of 'close' (closes #18)

sendData was hanging in Linux namespace containers (e.g. Namespace.so
CI runners) because it resolved on the socket's 'close' event, which
requires both sides to half-close. Some container network stacks don't
reliably trigger the server's auto-half-close, so the client waits
forever for a FIN that never comes.

'finish' fires when socket.end() has flushed the writable side to the
kernel — for a fire-and-forget send over a Unix domain socket that's
exactly the right guarantee: the bytes are in the server's recv buffer,
which the kernel will hold until the server reads them regardless of
what happens to our userspace socket.

Only sendData had this bug. The other socket.on('close', ...) sites
(SessionConnection lifecycle, peekScreen safety net) are correctly
waiting for the full close signal.

Nathan Herald (Apr 16, 2026, 1:50 PM +0200) 86d4a74d 3e647c61

+10 -1
+1
CHANGELOG.md
··· 23 23 - BUG-5: The Unix-socket file is now created under `umask 0o077`, closing the microsecond window where the inode was group/world-readable before `chmod 0o600`. 24 24 25 25 ### Fixes 26 + - Fix `sendData` hanging in Linux namespace containers. The Promise was resolving on the socket's `'close'` event, which requires both sides to half-close; some container network stacks don't reliably trigger the server's auto-half-close, so the client hangs forever. Resolve on `'finish'` instead — the writable side has been flushed to the kernel, which is exactly the guarantee a fire-and-forget send needs. (closes #18) 26 27 - Fix `pty list --remote` not rendering tags or displayName on remote sessions. Remote sessions now go through the same render path as local — displayName in parens, strategy marker, user-facing tags as `#key=value` — whenever the relay includes them in its `ls --json` output. 27 28 - Fix mouse tracking modes (1000/1002/1003) not being replayed when a client reattaches to a session with mouse tracking already enabled — the server previously only replayed the SGR encoding (1006), cursor visibility, and kitty keyboard flags. Clients (e.g., pty-layout) checking tracking mode to decide whether to forward mouse events will now see the correct state. 28 29 - Fix `EventFollower` starting at EOF when its directory watcher detected a brand-new `.events.jsonl` — `session_start` was already on disk by the time the dir event fired, so followers were skipping it. New-file detections now start at offset 0 while existing-file watches still start at EOF.
+9 -1
src/connection.ts
··· 174 174 } 175 175 }); 176 176 177 - socket.on("close", () => { 177 + // Resolve on 'finish' (writable side fully flushed to the kernel) rather 178 + // than 'close' (both halves closed). 'close' requires the server's FIN 179 + // to come back, which is unreliable in Linux namespace containers where 180 + // the auto-half-close behavior on the server's socket can stall. For a 181 + // fire-and-forget send over a Unix domain socket, 'finish' is exactly 182 + // the right guarantee: the bytes are in the server's recv buffer, which 183 + // the kernel will hold until the server reads them regardless of what 184 + // happens to our userspace socket. (closes #18) 185 + socket.on("finish", () => { 178 186 resolve(); 179 187 }); 180 188 });