Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions internal/tui/loopimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1085,14 +1085,6 @@ func (e *TermEnv) Sigint() <-chan os.Signal {
return sig
}

// Sigwinch subscribes to terminal resizes (FR-TUI-P-04) so the loop can
// re-probe the geometry and repaint promptly instead of at the next poll.
func (e *TermEnv) Sigwinch() <-chan os.Signal {
sig := make(chan os.Signal, 1)
signal.Notify(sig, syscall.SIGWINCH)
return sig
}

// SuspendAttach runs `herdr --session <s> agent attach <paneId>` with
// inherited stdio, exactly what `devagent attach <task> --exec` does
// (FR-VIS-02). The resolved pane id is recorded in the orchestration ledger
Expand Down
12 changes: 11 additions & 1 deletion internal/tui/rawterm_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

package tui

import "errors"
import (
"errors"
"os"
)

// rawTerm is a no-op stub on platforms without the POSIX termios interface:
// the interactive loop refuses to start (the non-TTY one-shot path never
Expand All @@ -16,3 +19,10 @@ func (r *rawTerm) enterRaw() error { return errors.New("raw mode unsupported on
func (r *rawTerm) restore() {}

func termSize(fd int) (rows, cols int) { return DefaultRows, DefaultColumns }

// Sigwinch is a stub on platforms without SIGWINCH (Windows). The TermEnv
// contract (loop.go) allows a nil channel: Run's resize select simply never
// fires and the poll path repaints instead.
func (e *TermEnv) Sigwinch() <-chan os.Signal {
return nil
}
12 changes: 12 additions & 0 deletions internal/tui/rawterm_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ package tui
// syscall — the same IFMIN..IFLAG word layout IoctlGetTermios manages.

import (
"os"
"os/signal"
"syscall"
"unsafe"
)
Expand Down Expand Up @@ -78,3 +80,13 @@ func termSize(fd int) (rows, cols int) {
}
return int(ws.Row), int(ws.Col)
}

// Sigwinch subscribes to terminal resizes (FR-TUI-P-04) so the loop can
// re-probe the geometry and repaint promptly instead of at the next poll.
// Unix-only: syscall.SIGWINCH does not exist on Windows — the TermEnv
// contract (loop.go: may return nil) covers the stub there.
func (e *TermEnv) Sigwinch() <-chan os.Signal {
sig := make(chan os.Signal, 1)
signal.Notify(sig, syscall.SIGWINCH)
return sig
}
Loading