Skip to main content

format_selector_row

Function format_selector_row 

Source
pub fn format_selector_row(
    branch: &str,
    age: &str,
    busy: bool,
    path: &str,
    branch_col: usize,
) -> String
Expand description

Compose a single row for the gw rm -i multi-select TUI.

Columns, left to right, separated by one space: branch (padded to branch_col) | age (padded to 9) | busy (7, colored) | path

The busy column carries an ANSI-colored [busy] token when busy is true, or 7 spaces when false. arrow_select::visible_len is ANSI-aware, so the colored and plain variants have identical visible width.

The path column is appended verbatim. The caller is expected to run the returned string through arrow_select::truncate to cap line width; that truncation clips the trailing path column, which is the correct behavior per the row-decorations spec (badges and age must survive, path may shrink).