dashboard

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package dashboard aggregates signals from all configured adapters into a single terminal view.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PendingCount

func PendingCount(rc *config.ResolvedConfig, role string) int

PendingCount returns the number of specs awaiting action from the current user's role. Reads local files only — never blocks on network.

func PrintAwarenessLine

func PrintAwarenessLine(rc *config.ResolvedConfig, role string) bool

PrintAwarenessLine prints the passive "you have mail" indicator. Returns true if something was printed.

func Render

func Render(data *DashboardData, userName, role, cycle string)

Render outputs the dashboard to the terminal.

func VisibleInBlocked added in v0.22.1

func VisibleInBlocked(pl config.PipelineConfig, cfg config.BlockedConfig, s SpecView, v Viewer) bool

VisibleInBlocked reports whether a blocked spec should appear in the viewer's BLOCKED section, applying the team-level blocked config.

func VisibleInDo added in v0.22.1

func VisibleInDo(pl config.PipelineConfig, s SpecView, v Viewer) bool

VisibleInDo reports whether the spec should appear in the viewer's DO section, applying the spec's current stage dashboard scope.

Types

type DashboardData

type DashboardData struct {
	Do       []DashboardItem `json:"do"`
	Review   []DashboardItem `json:"review"`
	Incoming []DashboardItem `json:"incoming"`
	Blocked  []DashboardItem `json:"blocked"`
	FYI      []DashboardItem `json:"fyi"`
}

DashboardData holds all dashboard sections.

func Aggregate

func Aggregate(ctx context.Context, rc *config.ResolvedConfig, reg *adapter.Registry, role string) (*DashboardData, error)

Aggregate collects data for the dashboard from all sources.

type DashboardItem

type DashboardItem struct {
	SpecID   string `json:"spec_id"`
	Title    string `json:"title"`
	Stage    string `json:"stage"`
	Detail   string `json:"detail"`
	Urgency  string `json:"urgency"` // "normal", "stale", "critical"
	URL      string `json:"url,omitempty"`
	Assignee string `json:"assignee,omitempty"` // assignee label or "unclaimed" for DO rows
}

DashboardItem represents a single item in a dashboard section.

type SpecView added in v0.22.1

type SpecView struct {
	Author      string
	Assignees   []string
	Status      string
	BlockedFrom string
}

SpecView is the minimal projection of a spec the visibility rules need. It keeps the resolver pure — no file or config I/O — so the policy is one table-tested place and the aggregator stays thin.

type Viewer added in v0.22.1

type Viewer struct {
	Role   string
	Name   string
	Handle string
	// Identities is the full set of handles the viewer is known by (canonical
	// handle, name, and per-provider handles). Matching checks all of them.
	Identities []string
}

Viewer identifies the person the dashboard is being rendered for. Name, Handle, and every per-provider identity are matched against spec author/assignees so display-name vs @handle drift across teams does not hide a user's own work.

Jump to

Keyboard shortcuts

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