Handoff — 2026-09-17 — terminal windows and tools on Windows
State
Done, tested where it can be, gate green, documented in the library and in the six editors, not committed, on main. git status in turbo-core lists the touched files; nothing is staged. The Windows path is compiled and vetted, never run.
Next steps
- Commit and tag turbo-core
v0.9.0— minor, becausetools.Shell(a constant) becametools.Shell()andtools.ShellArgs().01-release.tag.shrunsmake check; in this sandboxrelease_test.gofails on thecp-NUL problem (documented insummary.md), not on the code — run it on the Mac. - Re-pin the six editors (
go get codeberg.org/turbo-editors/turbo-core@v0.9.0 && go mod tidy && GOWORK=off make check), then tag each. Their documentation already describes Windows terminal windows; until the re-pin the binaries do not have them. - Run the five-step protocol on a Windows machine, the first anyone will have: (a)
F8— a cmd.exe prompt appears anddirlists the directory; (b) drag the window's corner — the prompt repaints at the new width (mode conreports it); (c)Alt-<toolchain>▸ a tool withoutput = "terminal"(Run) — the program runs and, when it ends,Ctrl-Wcloses the window (the console-closing goroutine gave the reader its EOF); (d) a long command in a terminal window —Ctrl-Cinterrupts it; (e) a tool withoutput = "popup"— output arrives, andEscapewhile it runs stops the whole tree (the job object). Report what the window showed, in SGR if possible. - If (c) hangs — the window never says the command finished — the suspect is the order in
windowsChild.Close/closeConsoleWhenTheShellExits: conhost may need the input pipe closed beforeClosePseudoConsolereturns. If the first screen is garbage, the suspect is conhost's start-up sequences reaching an emulator that has only ever read Unix shells; capture the raw bytes (TURBO_ACP_TRACEdoes not cover terminals — add a temporaryio.TeeReaderinView.read).
Watch out for
unsafe.Pointer(handle)is whatgo vetflags, which is whyUpdateProcThreadAttributeis called through aLazyProcwithuintptrarguments. Do not "simplify" it back to x/sys'sUpdate.- cmd.exe's command line is composed verbatim (
"cmd.exe" /S /C "<command>"), in two places that cannot share code without breaking the package layering:terminal/windows.go(windowsCommandLine) andtools/shell.go(cmdExeCommandLine). Change both or neither. - The job object is assigned after
Start; a child cmd.exe spawns in those first milliseconds escapes it. Accepted; documented intools/README.md. GOOS=windows go test -c ./terminalcompiles the Windows tests but cannot run them here.windows_test.gois untagged on purpose so its ten tests run on Linux.- The sandbox truncated one
Writeto zero bytes (tools/shell_unix.go); it was rewritten from Python with a byte comparison. Check file sizes after any write here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|