iteration_graph

Phased dependency graph with box-drawing connectors.

Composes the PhaseHeader and TaskRow molecules with inline branch-connector helpers to render an iteration as a phased task graph.

const BRANCH_CLOSE_LAST

source

const BRANCH_CLOSE_LAST: &str = "\u{2570}";

╰: starts the closing connector of the last phase, where the graph ends.

const BRANCH_CLOSE_MID

source

const BRANCH_CLOSE_MID: &str = "\u{251C}";

├: starts the closing connector of a phase that has another phase after it.

const BRANCH_DASH

source

const BRANCH_DASH: &str = "\u{2500}";

─: joins the tips of an opening or closing connector.

const BRANCH_OPEN

source

const BRANCH_OPEN: &str = "\u{251C}";

├: starts the opening connector of a phase with more than one task.

const BRANCH_OPEN_TIP

source

const BRANCH_OPEN_TIP: &str = "\u{256E}";

╮: opens one more parallel column in an opening connector.

const CLOSE_TIP

source

const CLOSE_TIP: &str = "\u{256F}";

╯: closes one parallel column in a closing connector.

const CONTINUATION

source

const CONTINUATION: &str = "\u{2502}";

│: the line between one phase and the next.

struct Component

source

pub struct Component

Phased dependency graph with box-drawing connectors.

Field Type Description
iteration_title String Title on the graph’s first line.
tasks Vec<GraphTask> Tasks in any order; the graph groups them by phase, lowest phase first.

Implements Display.

Component::new

source

pub fn new(iteration_title: impl Into<String>, tasks: Vec<GraphTask>) -> Self

Create a graph view for the given iteration title and task list.

Parameter Type Description
iteration_title impl Into<String> the iteration title
tasks Vec<GraphTask> the tasks to draw; an empty list renders no tasks in this iteration
returns Self The graph view.

struct GraphTask

source

pub struct GraphTask

A task entry for the graph.

Field Type Description
blocked_by Vec<String> Short ids of tasks that block this task.
id_short String Short ID used to render the task’s highlighted two-tone identifier.
is_blocking bool True when this task blocks at least one other task.
phase u32 Phase number used to group tasks under phase headers.
prefix_len usize Number of highlighted prefix characters for this task’s ID.
priority Option<u8> Task priority used to render the [Pn] badge.
status String Task status, used to select the row icon and color.
title String Task title rendered inside the row.

fn write_branch_close

source

fn write_branch_close(f: &mut Formatter<'_>, cols: usize, is_last_phase: bool) -> fmt::Result

Write the connector that merges a phase’s parallel columns back into one line.

Parameter Type Description
f &mut Formatter<'_> the formatter to write into
cols usize the number of tasks in the phase; one ─╯ is written for each column after the first
is_last_phase bool whether the phase ends the graph, which starts the line with ╰ rather than ├
returns fmt::Result Ok(()), or the error from writing to f.

fn write_branch_open

source

fn write_branch_open(f: &mut Formatter<'_>, cols: usize) -> fmt::Result

Write the connector that splits a phase into parallel columns, one per task.

Parameter Type Description
f &mut Formatter<'_> the formatter to write into
cols usize the number of tasks in the phase; one ─╮ is written for each column after the first
returns fmt::Result Ok(()), or the error from writing to f.