ui

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRunner added in v1.8.0

type ActionRunner interface {
	ApplyCodemod(context.Context, CodemodApplyRequest) (report.Report, error)
	SaveBaseline(context.Context, BaselineSaveRequest) (report.Report, string, error)
}

type BaselineSaveRequest added in v1.8.0

type BaselineSaveRequest struct {
	RepoPath          string
	TopN              int
	Language          string
	BaselineStorePath string
	BaselineKey       string
	BaselineLabel     string
	Features          featureflags.Set
}

type CodemodApplyRequest added in v1.8.0

type CodemodApplyRequest struct {
	RepoPath   string
	Dependency string
	TopN       int
	Language   string
	AllowDirty bool
	Features   featureflags.Set
}

type Detail

type Detail struct {
	Analyzer analysis.Analyser
	Out      io.Writer
	RepoPath string
	Language string
}

func NewDetail

func NewDetail(out io.Writer, analyzer analysis.Analyser, repoPath string, language string) *Detail

func (*Detail) Show

func (d *Detail) Show(ctx context.Context, dependency string) error

type Options

type Options struct {
	RepoPath          string
	Language          string
	TopN              int
	Filter            string
	Sort              string
	PageSize          int
	BaselinePath      string
	BaselineStorePath string
	BaselineKey       string
	Features          featureflags.Set
	UseStavePreview   bool
	Width             int
	ASCII             bool
	Color             *bool
}

type ParityAction added in v1.8.8

type ParityAction struct {
	Name      string
	Supported bool
	GapReason string
}

type ParityCapabilities added in v1.8.8

type ParityCapabilities struct {
	Width                     int
	ASCII, Color, Interactive bool
}

type ParityDiff added in v1.8.8

type ParityDiff struct{ Path, Want, Got string }

type ParityFrame added in v1.8.8

type ParityFrame struct {
	Rows                       []ParityRow
	Warnings                   []string
	Page, TotalPages, PageSize int
	Capabilities               ParityCapabilities
	Actions                    []ParityAction
}

func LegacyParityProjection added in v1.8.8

func LegacyParityProjection(view summaryDisplayView, state summaryState, totalPages int, caps ParityCapabilities) ParityFrame

LegacyParityProjection is derived from the actual display view and state.

func StaveParityProjection added in v1.8.8

func StaveParityProjection(tree semantic.Tree, caps ParityCapabilities) (ParityFrame, error)

StaveParityProjection reads the actual Stave snapshot, not the source model.

type ParityReport added in v1.8.8

type ParityReport struct{ Violations, CapabilityGaps []ParityDiff }

func CompareParity added in v1.8.8

func CompareParity(want, got ParityFrame) ParityReport

func (*ParityReport) EqualWithKnownGaps added in v1.8.8

func (r *ParityReport) EqualWithKnownGaps(known map[string]bool) bool

EqualWithKnownGaps is the explicit oracle for the preview's documented one-shot/action limitations. Unknown, missing, or duplicate capability gaps remain failures so improvements and regressions both require an explicit contract update.

type ParityRow added in v1.8.8

type ParityRow struct {
	Identity, Language, Name string
	Waste                    int64
	Used                     float64
}

type StavePreview added in v1.8.8

type StavePreview struct {
	// contains filtered or unexported fields
}

StavePreview is deliberately a delegating TUI: the default path remains byte-for-byte owned by Summary, while explicit opt-in routes both Start and Snapshot through Stave without changing Lopper's command grammar or action authority.

func (*StavePreview) Snapshot added in v1.8.8

func (p *StavePreview) Snapshot(ctx context.Context, opts Options, outputPath string) error

func (*StavePreview) Start added in v1.8.8

func (p *StavePreview) Start(ctx context.Context, opts Options) error

type Summary

type Summary struct {
	Analyzer  analysis.Analyser
	Actions   ActionRunner
	Formatter summaryFormatter
	Out       io.Writer
	In        io.Reader
	TopN      int
	PageSize  int
	Language  string
}

func NewSummary

func NewSummary(out io.Writer, in io.Reader, analyzer analysis.Analyser, formatter *report.Formatter) *Summary

func (*Summary) Snapshot

func (s *Summary) Snapshot(ctx context.Context, opts Options, outputPath string) error

func (*Summary) Start

func (s *Summary) Start(ctx context.Context, opts Options) error

type TUI

type TUI interface {
	Start(ctx context.Context, opts Options) error
	Snapshot(ctx context.Context, opts Options, outputPath string) error
}

func NewStavePreview added in v1.8.8

func NewStavePreview(legacy *Summary) TUI

Jump to

Keyboard shortcuts

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