Skip to content

Animated watch mode (#10) - #20

Merged
rwrife merged 1 commit into
mainfrom
issue-10-watch-mode
Jul 11, 2026
Merged

rwrife merged 1 commit into
mainfrom
issue-10-watch-mode

Conversation

@rwrife

@rwrife rwrife commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Closes #10

Adds commit-sprout watch: a minimal full-screen TUI that renders the plant and gently sways while re-reading git activity on an interval.

What changed

  • New cmd/watch.go: alternate-screen loop with raw-mode input (via golang.org/x/sys/unix), signal handling, and ANSI escapes — no new heavy deps.
  • Idle sway animation (triangle-wave indent) between reads; git re-read on --interval (default 5s).
  • Clean exit on q / Q / Ctrl-C or SIGINT/SIGTERM; alternate screen, cursor, and termios always restored via defers.
  • Low idle CPU: frames throttled (~700ms sway step) and redraw only on change.
  • Refuses to start when stdout is not a TTY; degrades gracefully outside a repo.
  • Reuses the shared runPipeline; read-only (never persists state).
  • Tests for the pure helpers (swayIndent, composeScreen); README + roadmap updated.

Acceptance criteria

  • watch opens a minimal full-screen TUI
  • Idle sway animation; re-reads git activity on an interval
  • Clean exit on q/Ctrl-C; restores terminal
  • Low CPU when idle (frame throttling + redraw-on-change)

gofmt/vet/build/test all green locally.

@rwrife rwrife mentioned this pull request Jul 10, 2026
4 tasks
@rwrife
rwrife merged commit 5fb8c73 into main Jul 11, 2026
1 check passed
@rwrife
rwrife deleted the issue-10-watch-mode branch July 11, 2026 09:01
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.

[feature] Animated watch mode

1 participant