Documentation
¶
Overview ¶
Package board is the status board's one renderer (spc-2610031844142274): two views, the product thinker's and the facilitator's, each in two forms, text for a Terminal or a pipe and a markdown list a host session pastes unchanged.
It takes the board's data and returns lines. It never writes to a stream and never reads the environment: the front door reads the window, the colour rung and the locale and hands them in a Frame, so every view and form is a golden test. It holds its own colour rungs rather than importing internal/term, which carries raw-mode terminal code the transport-agnostic core does not depend on (spc-2610030944505997, open question 2).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Drive ¶
type Drive struct {
// State is the word: working, waiting, stalled or stopped.
State string
// Until is the wait's named end as the front door words it ("14:00"), ""
// where the wait names none.
Until string
// Line is the whole line (loop.DriveLine).
Line string
}
Drive is a drive's state as the board draws it. The product thinker's view draws its word and its until alone, as its first building line, in place of "nothing right now" where nothing else is building, since that view carries no record id and no command (spc-2610031844142274; dcn-2611280725169564). The facilitator's view draws the whole line as its drive: row, the line the drive's own terminal and `abcd implement status` print.
type Frame ¶
type Frame struct {
View View
Form Form
Width int // the window's columns; ignored by Markdown
Rung Rung // Mono in a pipe, under NO_COLOR and --no-color
ASCII bool // no UTF-8 locale: the plain-text symbols and ellipsis
}
Frame is what the front door read about where the board is drawn.
type Input ¶
type Input struct {
Dir string
Status *statusblock.Block
Rows []Row
// Version is the installed version, the same core.VersionInfo
// `abcd --version` reports; it is drawn as the board's last line in both
// views and both forms (spc-2610100613109045, decision 4), and the line is
// left out only when no version is handed in.
Version core.VersionInfo
// Merges is facilitator.mode as the merge gate resolves it
// (spc-2610161609350616): the default branch's committed configuration
// beside the machine layer. It is drawn as the facilitator: line just above
// the version line in both views and both forms; nil draws no line.
Merges *Merges
// Drive is the drive's state as the front door read it from the stored value
// (spc-2611141617199772 step 5), nil where there is none to show.
Drive *Drive
}
Input is everything the views draw from.
type Merges ¶ added in v0.16.0
type Merges struct {
Mode string // human or auto
Layer string // bundled, machine, repo, …
Origin string // the file that set it, or "bundled"
Refused string // the read's refusal; Mode is unset when this is
// HomeRefused says a refused home decided the mode, so Origin is the
// reason, not a file.
HomeRefused bool
}
Merges is facilitator.mode and the layer and origin that set it, or, when the mode could not be read, the refusal. It is drawn under its own label, `facilitator:` (iss-2610262034286775), naming the mode, whose setting it is and what becomes of a ready pull request, and never as a bare `mode`, which is abcd mode's word for whose answer the loop waits on.
type Row ¶
Row is one of the facilitator's labelled rows, already worded by the front door (the presence, peers, inbox, oracle and reviews readers live there): a label and its value, and the lines nested one level under it.
type Rung ¶
type Rung int
Rung is how much colour the Terminal shows, the front door's reading of the colour ladder (term.ResolveColorMode) in the core's own terms.