reviewprogress

package
v0.7.196 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package reviewprogress implements the BubbleTea TUI for chunk review passes, and the row rendering that other views (the watch dashboard's session view) share with it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Active added in v0.7.196

func Active(rows []Row) bool

Active reports whether any row is still queued or running.

func NameWidth added in v0.7.196

func NameWidth(rows []Row) int

NameWidth is the width the name column needs to fit every row.

func RenderRow added in v0.7.196

func RenderRow(st Styles, r Row, nameWidth, spinIdx int) string

RenderRow renders one prompt line, indented two columns. nameWidth pads the name column so rows align (see NameWidth); spinIdx picks the spinner frame of a running row.

func RenderSummary added in v0.7.196

func RenderSummary(st Styles, rows []Row) string

RenderSummary renders the "2 running · 1 done" tally for rows.

Types

type DoneMsg

type DoneMsg struct{ Err error }

DoneMsg signals that the review pass has finished.

type Model

type Model struct {
	RunErr error
	// contains filtered or unexported fields
}

Model is the BubbleTea model for review progress.

func New

func New(prompts []review.Prompt, poolSize int, cancelFn func()) Model

New creates a Model ready to run for the given prompts and pool size.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() tea.View

type ProgressMsg

type ProgressMsg review.ProgressEvent

ProgressMsg carries a state-change event from the review pass.

type Row added in v0.7.196

type Row struct {
	Name      string
	SidecarID string
	State     review.PromptState
	Duration  time.Duration
	Err       string
}

Row is one prompt of a review pass as the row renderers show it. It is the same whether the pass runs in this process or on the watch daemon, which is what lets `chunk review` and `chunk watch` draw a review identically.

type Styles added in v0.7.196

type Styles struct {
	Dim     lipgloss.Style
	Success lipgloss.Style
	Err     lipgloss.Style
	Running lipgloss.Style
	Muted   lipgloss.Style
	VDim    lipgloss.Style
	Emph    lipgloss.Style
}

Styles holds the computed lipgloss styles the renderers use.

func NewStyles added in v0.7.196

func NewStyles(hasDark bool) Styles

NewStyles computes the styles for a light or dark terminal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL