Skip to content
ConsoleMonster
Class

RunBoard

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
sealed

A full-screen board for a long run (an assessment, a test suite, a release pipeline) that reads at a glance: a header with the product's wordmark and a chart, the stage track, one lane per group with aligned counts, one cell per item, the running items with their full titles, a right rail of boxed panels, a row of insight panels and a footer. It draws a RunTracker with declared RunItems, as RunDashboard does, and falls back to that dashboard below RunBoard.MinimumWidth × RunBoard.MinimumHeight. Layout: from 140 columns the work area and the rail sit side by side; from 100 columns the panels move under the running work, highest priority first; from 80 columns a compact board keeps the lanes, the running work and the results. Panels drop out by priority when the height runs out; a panel is never cut and its title always shows.

Inheritance

  • object
  • RunBoard

Usage

Explore 43 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 20

Constructors

public RunBoard(RunTracker tracker) #

Creates a board over a tracker with declared RunItem metadata.

Parameters

tracker ConsoleMonster.Live.RunTracker required
The shared run state.

Methods

public Size Measure(Constraints constraints, RenderContext context) #

Takes the whole region it is given; without a height limit (an export of the whole block) it uses 40 rows.

Parameters

constraints ConsoleMonster.Layout.Constraints required
The constraints.
context ConsoleMonster.Canvas.RenderContext required
The render context.

Returns

Size The size.
Panel 3 overloads
public RunBoard Panel(RunBoardPanel panel) #

Adds a panel. Safe while the board is drawn on another thread. Live widgets in the panel join the run's session, so updates by their widget ids reach them; a widget id another widget on the board already uses is rejected.

Parameters

panel ConsoleMonster.Widgets.RunBoardPanel required
The panel.

Returns

RunBoard This instance.
public RunBoard Panel(string title, IWidget content, RunBoardPlacement placement = Rail, int priority = 50) #

Adds a panel that shows a widget the host keeps up to date.

Parameters

title string required
The literal title.
content ConsoleMonster.Layout.IWidget required
The widget.
placement ConsoleMonster.Widgets.RunBoardPlacement = Rail optional
The right rail (default) or the insight row.
priority int = 50 optional
How much it matters next to the other panels (see RunBoardPanel.Priority).

Returns

RunBoard This instance.
public RunBoard Panel(string title, Func<RunSnapshot, IWidget> build, RunBoardPlacement placement = Rail, int priority = 50) #

Adds a panel built for each frame from the run's state.

Parameters

title string required
The literal title.
build System.Func<ConsoleMonster.Live.RunSnapshot, ConsoleMonster.Layout.IWidget> required
Builds the widget from the snapshot the frame draws.
placement ConsoleMonster.Widgets.RunBoardPlacement = Rail optional
The right rail (default) or the insight row.
priority int = 50 optional
How much it matters next to the other panels (see RunBoardPanel.Priority).

Returns

RunBoard This instance.
public void Render(Region region, RenderContext context) #

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region required
The target region.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Properties

public RunDashboard Dashboard { get; } #

The dashboard that draws the run on a terminal smaller than the board needs, sharing its tracker and log.

public string Title { get; set; } #

The run name, shown as literal text when there is no RunBoard.Wordmark and in the compact header.

public string? Version { get; set; } #

The product version under the wordmark (literal, for example "v1.0.0"), or null.

public string? Subtitle { get; set; } #

A literal subtitle under the wordmark (the target, the configuration), or null.

public IWidget? Wordmark { get; set; } #

The product's wordmark (a Logo or any widget up to five rows tall), or null for the title as text. A live widget set after the run has started joins the run's session in place of the previous wordmark.

public Func<RunSnapshot, IWidget>? HeaderChart { get; set; } #
Fluent("HeaderChartBy")

Builds the chart beside the wordmark from the frame's snapshot, or null (default) for a histogram of the durations of finished items. Its caption shows the throughput and the longest item either way.

public IWidget? Stages { get; set; } #

The stage track drawn under the header (usually Phases), or null for none. A live stage track set after the run has started joins the run's session in place of the previous track, so updates by its widget ids reach the track that is drawn.

public int Workers { get; set; } #

The most items that run at once (the worker count), or 0 (default) when unknown. When set, the running list reads "3 of 4 workers busy".

public string ItemsLabel { get; set; } #

The plural word for the run's items in captions and titles (default "items"), for example "checks" or "tests".

public RunBoardParts Parts { get; set; } #

The board's own panels and charts that show (default all).

public IReadOnlyList<RunBoardPanel> Panels { get; } #

The host's panels, in the order they were added.

public IReadOnlyList<IWidget> Children { get; } #

The child widgets in layout order.

Fields

public const int MinimumWidth #

The narrowest terminal the board draws in (80 columns); below it the RunBoard.Dashboard draws the run.

Value: 80
public const int MinimumHeight #

The shortest terminal the board draws in (24 rows); below it the RunBoard.Dashboard draws the run.

Value: 24

Extension Methods

public static RunBoard Dashboard(RunBoard runBoard, Action<RunDashboard> configure) #

Configures RunBoard.Dashboard in place: The dashboard that draws the run on a terminal smaller than the board needs, sharing its tracker and log.

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
configure System.Action<ConsoleMonster.Widgets.RunDashboard> required
Configures the value.

Returns

RunBoard The same instance.
public static RunBoard HeaderChartBy(RunBoard runBoard, Func<RunSnapshot, IWidget>? value) #

Sets RunBoard.HeaderChart: Builds the chart beside the wordmark from the frame's snapshot, or null (default) for a histogram of the durations of finished items. Its caption shows the throughput and the longest item either way.

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value System.Func<ConsoleMonster.Live.RunSnapshot, ConsoleMonster.Layout.IWidget>? required
The callback.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.HeaderChart = value;    runBoard.HeaderChartBy(value);
public static RunBoard ItemsLabel(RunBoard runBoard, string value) #

Sets RunBoard.ItemsLabel: The plural word for the run's items in captions and titles (default "items"), for example "checks" or "tests".

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value string required
The value.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.ItemsLabel = value;     runBoard.ItemsLabel(value);
public static RunBoard Parts(RunBoard runBoard, RunBoardParts value) #

Sets RunBoard.Parts: The board's own panels and charts that show (default all).

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value ConsoleMonster.Widgets.RunBoardParts required
The value.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.Parts = value;          runBoard.Parts(value);
public static RunBoard Stages(RunBoard runBoard, IWidget? value) #

Sets RunBoard.Stages: The stage track drawn under the header (usually Phases), or null for none. A live stage track set after the run has started joins the run's session in place of the previous track, so updates by its widget ids reach the track that is drawn.

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value ConsoleMonster.Layout.IWidget? required
The value.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.Stages = value;         runBoard.Stages(value);
public static RunBoard Subtitle(RunBoard runBoard, string? value) #

Sets RunBoard.Subtitle: A literal subtitle under the wordmark (the target, the configuration), or null.

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value string? required
The value.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.Subtitle = value;       runBoard.Subtitle(value);
public static RunBoard Title(RunBoard runBoard, string value) #

Sets RunBoard.Title: The run name, shown as literal text when there is no RunBoard.Wordmark and in the compact header.

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value string required
The value.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.Title = value;          runBoard.Title(value);
public static RunBoard Version(RunBoard runBoard, string? value) #

Sets RunBoard.Version: The product version under the wordmark (literal, for example "v1.0.0"), or null.

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value string? required
The value.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.Version = value;        runBoard.Version(value);
public static RunBoard Wordmark(RunBoard runBoard, IWidget? value) #

Sets RunBoard.Wordmark: The product's wordmark (a Logo or any widget up to five rows tall), or null for the title as text. A live widget set after the run has started joins the run's session in place of the previous wordmark.

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value ConsoleMonster.Layout.IWidget? required
The value.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.Wordmark = value;       runBoard.Wordmark(value);
public static RunBoard Workers(RunBoard runBoard, int value) #

Sets RunBoard.Workers: The most items that run at once (the worker count), or 0 (default) when unknown. When set, the running list reads "3 of 4 workers busy".

Parameters

runBoard ConsoleMonster.Widgets.RunBoard required
The instance.
value int required
The value.

Returns

RunBoard The same instance.

Examples

// C# initializer or property    // C# fluent
runBoard.Workers = value;        runBoard.Workers(value);