Skip to content

Commit cf8e229

Browse files
docs: --rain quit/scan cancel and TUI layout notes
Document q/ctrl+c and scan cancellation in README; point maintainers at panel_layout and runRainTUIStream shutdown in CLAUDE.md. Co-authored-by: bschellenberger2600 <bschellenberger2600@gmail.com>
1 parent 8518dca commit cf8e229

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ main.go
5656
**Key design decisions:**
5757
- Uses native `git` binary via `exec.Command` — not go-git.
5858
- Default run: `git fetch --all` with optional `--prune` (resolved per repo: CLI → `rain.fetchprune` → registry `fetch_prune``global.fetch_prune`) and optional `--tags`. Mainline-only: `internal/git.MainlineFetchRemotes` when `--fetch-mainline`. Local hydrate: `RainRepository` when `--sync`, non-mainline `branch_mode`, or risky-only config forces full sync.
59-
- Interactive picker: `--rain`.
59+
- Interactive picker: `--rain` (streaming scan + Bubble Tea UI). Panel width math lives in `internal/ui/panel_layout.go` (`PanelBlockWidth` / `PanelTextWidth`); keep it aligned with `boxStyle` horizontal padding. On exit, `runRainTUIStream` cancels the scan context before draining channels so in-flight `git` from `ScanRepositoriesStream` can abort; OS SIGINT maps to the same cancel path as `q` via `tea.ErrInterrupted``ErrCancelled`.
6060
- Backup branch prefix: `git-rain-backup-`.
6161
- Config env prefix: `GIT_RAIN_`.
6262
- Safe mode (default): never rewrites local-only commits (applies to `--sync` path).

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ GIT_RAIN_GLOBAL_SCAN_PATH=/tmp/repos git-rain
304304

305305
## Interactive TUI
306306

307-
`git-rain --rain` opens an interactive picker. Repositories stream in as the filesystem scan finds them — no waiting for the full scan to complete before you can start picking. After you confirm, the tool runs the **default full fetch** (`git fetch --all`, prune opt-in) unless you passed **`--fetch-mainline`**, or **full branch hydration** is implied by **`--sync`**, **`--risky`**, **`risky_mode`** in config, a **non-mainline `branch_mode`**, or **any `--branch-mode`** on the CLI.
307+
`git-rain --rain` opens an interactive picker. Repositories stream in as the filesystem scan finds them — no waiting for the full scan to complete before you can start picking. After you confirm, the tool runs the **default full fetch** (`git fetch --all`, prune opt-in) unless you passed **`--fetch-mainline`**, or **full branch hydration** is implied by **`--sync`**, **`--risky`**, **`risky_mode`** in config, a **non-mainline `branch_mode`**, or **any `--branch-mode`** on the CLI. Quitting (**`q`** or **`ctrl+c`**) cancels the in-progress scan (in-flight `git` subprocesses are aborted via the scan context); **`ctrl+c`** outside raw TTY mode is treated like cancel.
308308

309309
**Key bindings:**
310310

@@ -313,7 +313,8 @@ GIT_RAIN_GLOBAL_SCAN_PATH=/tmp/repos git-rain
313313
| `space` | Toggle repo selection |
314314
| `a` | Select all / deselect all |
315315
| `enter` | Confirm selection and begin fetch or sync |
316-
| `q` / `esc` | Abort |
316+
| `q` / `ctrl+c` | Abort picker |
317+
| `c` / `Esc` | Back from settings (ignored list uses `Esc` / `i` / `b`) |
317318
| `` / `` | Navigate |
318319

319320
## Safe Mode vs Risky Mode

0 commit comments

Comments
 (0)