Skip to content

Windows sender: portable link targets, cleanup on window close, VT fallback - #74

Open
op-q wants to merge 3 commits into
feat/cancel-and-statusfrom
feat/windows-sender
Open

op-q wants to merge 3 commits into
feat/cancel-and-statusfrom
feat/windows-sender

Conversation

@op-q

@op-q op-q commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Cross-platform plan, phase 2. Behaviour change, so it waits for your review. Stacked on #73.

  • Symlink targets from a Windows sender were recorded as ..\shared\config, which Linux and macOS receivers read as a single name. Relative targets are now written with /. Absolute ones (C:\…, \\server\…) would dangle on any other machine, so they're left out, and the warning says why. TarPlan::skipped now carries a reason per entry.
  • Closing the console window, logging off, shutting down, or Ctrl-Break now trigger the same cancel-and-clean-up path as Ctrl-C (from Cancel from either side, tell the other side; exit codes and state lines #73). Before, the process died and a compressed send's spool file, a copy of the user's data, stayed in %TEMP%.
  • Progress line on old Windows consoles: VT processing is turned on via crossterm. If that fails, the line is redrawn with \r plus space padding instead of printing ←[2K garbage.
  • New test: a spool file can be deleted while the chunk reader still has it open. On Windows that depends on how the file was opened, so it's pinned rather than assumed. It runs on all three OSes.

Tests: 252. All cfg(windows) code is compiled for the first time by the Windows CI runner, since this machine has no Windows target. It will first run in a real console during phase 5's manual checklist.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S

…ow closes

Three things only a Windows sender got wrong:

- Link targets were recorded as `read_link` gave them, `..\shared\config`,
  which a Linux or macOS receiver takes as one name with backslashes in it.
  Relative targets are now written with `/`, and absolute ones, which would
  dangle on any other machine, are left out with a reason.
- Closing the console window, logging off and shutting down are not Ctrl-C on
  Windows, and nothing handled them, so a compressed send's spool file (a copy
  of the user's data) stayed in %TEMP%. They now start the same cancel-and-clean
  path as Ctrl-C, as does Ctrl-Break.
- The progress line assumed escape sequences work. The older console that
  cmd.exe still opens prints them literally until VT processing is turned on.
  It is turned on now, and where that fails the line is redrawn with padding
  instead.

Also pinned on every platform: a spool file can be deleted while the chunk
reader has it open, which on Windows depends on how the file was opened.

The Windows-only code is compiled first by the Windows CI runner.

Cross-platform plan, phase 2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

This branch has not been deployed

No deployments
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