gitFlow/go.mod
dimitar 2656f29019 feat: M2 — TUI skeleton (bubbletea model/view/styles)
Ship a working `gitflow tui` command: static scan result rendered as a
lipgloss-styled table, with keyboard navigation and a detail pane.

TUI package (internal/tui):
- Model struct: holds scan result, cursor, detail/help toggles, loading
  state, error display, and injected app/AI/config dependencies
- Update: handles WindowSizeMsg (resize), KeyMsg for navigation (j/↑/k/↓,
  Home/End, Enter/Space for detail, ? for help, q/Ctrl-C for quit), and
  async scanResultMsg/scanErrorMsg for the M3 periodic scan loop
- View: repo list table (STATUS/REPOSITORY/BRANCH/AHEAD-BEHIND/CHGS/STASH)
  with cursor highlighting and dimmed error rows, expandable detail pane
  showing files, and a status bar (scan summary + keybinding hints)
- styles.go: lipgloss Styles (Header/Row/CursorRow/StatusBar) with
  dark/light theme palettes that mirror the CLI's ThemeMode
- Loading and empty states; help overlay with keybinding reference

Presenter API surface (needed by the TUI):
- ShortPath exported (home → ~ collapsing, reused by TUI and CLI)
- StatusSymbolFor exported (✓ ✗ ↑ ↓ ⇄ ◉ ▢ ! symbols, reused)
- ShortPath is kept as a wrapper so internal formatter callers are
  unaffected

CLI (cmd/gitflow):
- newTUICmd: resolves config, builds AI provider, calls tui.New() for the
  initial scan, and runs the bubbletea Program
- Wired into root command under `gitflow tui` with full flag set
  (--dir, --interval, --exclude, etc.)

Dependencies: bubbletea v1.3.10, lipgloss v1.1.0, a stable x/term tree

Testing:
- Model logic tests: cursor navigation (arrow + j/k), bottom/top clamping,
  detail toggle (Enter/Space), ? help, q/Ctrl-C quit, view renders
  repo names/branch/status columns, detail pane shows file lists, help
  overlay shows keybindings, loading/empty states

Verified: go build, go vet, go test -race (12 packages), gofmt clean,
`gitflow tui --help` prints command usage.
2026-08-02 09:08:10 +02:00

50 lines
2.0 KiB
Modula-2

module gitea.oblak.solutions/dimitar/gitFlow
go 1.24.0
require (
github.com/charmbracelet/bubbletea v1.3.10
github.com/charmbracelet/lipgloss v1.1.0
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
github.com/spf13/viper v1.19.0
golang.org/x/sync v0.12.0
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
github.com/charmbracelet/x/ansi v0.10.1 // indirect
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/termenv v0.16.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)