git: a creation gate that never writes history, a git tab with Paperclip's worktree scan, and a warning line in every pane

This commit is contained in:
Sam
2026-11-12 20:38:44 +11:00
parent f7b77f370f
commit c419de5b48
18 changed files with 2223 additions and 82 deletions

View File

@@ -40,6 +40,14 @@ func main() {
fmt.Fprintln(os.Stderr, "warning: PAPERCLIP_BOARD_KEY is not set, so replies and status changes will be refused")
}
// One git read, here, before the terminal is taken over: the banner in every
// pane depends on it and no git command may run inside Update or View.
screenFolder := *folder
if screenFolder == "" {
screenFolder, _ = os.Getwd()
}
setGitBanner(screenFolder)
var m tea.Model
switch *screen {
case "board":
@@ -138,7 +146,8 @@ func main() {
// Alternate screen: TUIOS keeps its own scrollback, and a full-screen
// program that redraws in place must not fight it.
p := tea.NewProgram(m, tea.WithAltScreen(), tea.WithMouseCellMotion())
// The setup warning is drawn once for the whole screen, not once per panel.
p := tea.NewProgram(bannerModel{inner: m}, tea.WithAltScreen(), tea.WithMouseCellMotion())
if _, err := p.Run(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)