(61879a4) Surface campaigns on the board, and bump to 0.20.0

A card label and a frame, not a campaign tab. A tab had to say what its
columns are, and a campaign groups across the flow rather than within one
status, so the answer is the four columns filtered: a filter on the board
it already has, not a fifth tab.

So a card names its campaign on the label row, before the tags, marked ~
and bold, and the row drops the tags whole before it drops the campaign.
`c` opens a picker; taking a campaign filters every column to its members
and draws a frame above them carrying the id, the codename, the name, the
opening line of the description and the standing. The standing comes from
the columns, since while a campaign is selected the columns are its
members. `q` takes off one layer at a time: the overlay, the filter, the
board.

The label needs something to say, which the stored uuid is not, so
campaigns gained `Codename`: one word, `v1` or `beaver`, written by
`campaign add --codename` and validated at parse time. `campaign ls`
prints it and `resolve_in` gained an exact-codename tier above the uuid
prefix, or it would be a field you can read and cannot type. Only
campaigns carry the field, so the tier is empty for a ticket and ticket
resolution is unchanged.

The campaigns index is read once per project in `columns_of`, on the pass
that already builds the cards, and `digest` now watches the campaigns
directory: without it a campaign filed elsewhere never reached the picker.
`frame_rows` grew a row, so the two bools deciding the geometry became one
`Chrome` and the row indices are named.

Left out and filed as d637288: nothing can give a codename to a campaign
that is already on the board.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ansho Rei
2026-08-23 12:09:07 +02:00
co-authored by Claude Opus 5
parent c65e1b4ed7
commit 528566d103
13 changed files with 1945 additions and 104 deletions
+21 -2
View File
@@ -1037,7 +1037,12 @@ pub fn cmd_relate(args: &RelateArgs, start: &Path) -> Result<()> {
/// half-written campaign behind. `cmd_add` predates that primitive and still uses the
/// plain write; the difference is noted on the ticket rather than fixed here.
pub fn cmd_campaign_add(args: &CampaignAddArgs, start: &Path) -> Result<()> {
let CampaignAddArgs { title, description, owner } = args;
let CampaignAddArgs {
title,
description,
codename,
owner,
} = args;
let worklane_dir = find_worklane_dir(start)?;
let dir = ensure_campaigns_dir(&worklane_dir)?;
@@ -1054,6 +1059,7 @@ pub fn cmd_campaign_add(args: &CampaignAddArgs, start: &Path) -> Result<()> {
let body = campaign_body(
title,
description,
codename.as_deref(),
&id,
owner.as_deref(),
&Local::now().format(TIMESTAMP_FORMAT).to_string(),
@@ -1099,9 +1105,22 @@ pub fn cmd_campaign_ls(worklane_dir: &Path, ids: bool) -> Result<()> {
None => String::new(),
};
// The codename between the id and the title, in the colour the board draws it in
// and with the same mark: the answer to "which campaign is this" is one word, and
// it should be the same word wherever it is read. A campaign filed without one
// spends nothing on it, the way an untagged card spends no row.
let codename = match campaign.codename.is_some() {
true => {
let label = campaign_label(&campaign.uuid, campaign.codename.as_deref());
format!("{} ", paint_cells(&[label], colored))
}
false => String::new(),
};
println!(
" ({}) {} | {}{}",
" ({}) {}{} | {}{}",
paint(short_id(&campaign.uuid), Color::Red, colored),
codename,
campaign.title,
standing.label(),
state,