Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ff180645c | ||
|
|
2ac0c64001 | ||
|
|
07ac204829 | ||
|
|
19c666b5dc | ||
|
|
8e7a3f1425 |
@@ -1563,7 +1563,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "worklane"
|
||||
version = "0.33.8"
|
||||
version = "0.33.13"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert_cmd",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "worklane"
|
||||
version = "0.33.8"
|
||||
version = "0.33.13"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -56,15 +56,24 @@ patch minor major: release
|
||||
|
||||
# A release rewrites the last commit, so refuse anything that would make that
|
||||
# rewrite lose work or orphan a tag.
|
||||
#
|
||||
# Untracked character devices are not work: an agent sandbox bind-mounts /dev/null over
|
||||
# protected paths such as .bashrc, and git cannot commit a device anyway. Untracked files
|
||||
# are listed one by one, not with --directory, because the sandbox also mounts devices
|
||||
# inside an untracked .claude/, and a collapsed directory entry is never a device.
|
||||
release:
|
||||
@set -e; \
|
||||
if ! git rev-parse -q --verify HEAD >/dev/null 2>&1; then \
|
||||
echo "error: no commits yet, so there is no commit to fold a version bump into. Commit first." >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -n "$$(git status --porcelain)" ]; then \
|
||||
dirty=$$( { git status --porcelain --untracked-files=no; \
|
||||
git ls-files --others --exclude-standard | while IFS= read -r f; do \
|
||||
[ -c "$$f" ] || echo "?? $$f"; \
|
||||
done; } ); \
|
||||
if [ -n "$$dirty" ]; then \
|
||||
echo "error: working tree is dirty. Commit or stash first, and decide whether that work belongs in this version:" >&2; \
|
||||
git status --short >&2; \
|
||||
echo "$$dirty" >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -n "$$(git tag --points-at HEAD)" ]; then \
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<img src="logo/worklane-badge-256.png" width="96" alt="worklane logo">
|
||||
|
||||
# Worklane
|
||||
|
||||
Worklane is a local Kanban flow for agentic software development.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: worklane-review
|
||||
description: Review a finished worklane ticket against the code that claims to close it, and record the verdict on the board. Use when asked to review a ticket, to check whether a ticket is really done, or to verify that an implementation matches its acceptance criteria, whether the ticket is named by id, by title or as "the one in reviewing". Covers finding the commits, judging each criterion against the code, and what a reviewer may and may not write back to the board.
|
||||
description: Review a finished worklane ticket against the code that claims to close it, and record the verdict on the board. Use when asked to review a ticket, to check whether a ticket is really done, or to verify that an implementation matches its acceptance criteria, whether the ticket is named by id, by title or as "the one in reviewing". Covers finding the commits, judging each criterion against the code, what a reviewer may and may not write back to the board, and how to close a ticket whose work is already on master by filing its remaining issues as new tickets.
|
||||
---
|
||||
|
||||
# Reviewing a worklane ticket
|
||||
@@ -14,14 +14,21 @@ addressed and the argument traps, is the `worklane` skill; read that too.
|
||||
|
||||
## What a review produces
|
||||
|
||||
Three things, in this order, and nothing else:
|
||||
Steps 1 to 3 are the same for every review. What you write back depends on one question
|
||||
answered in step 2: **is the work already on the default branch** (master or main)?
|
||||
|
||||
**Not yet landed** (on a branch, or not merged): steps 4 and 5, which produce
|
||||
|
||||
1. **One comment** on the ticket, in the structure below.
|
||||
2. **Unticked criteria**, for the ones the code does not actually meet.
|
||||
3. **Appended criteria**, for work the review found that the ticket never asked for.
|
||||
|
||||
You do not tick a criterion, you do not move the ticket, and you do not fix the code.
|
||||
Each of those has a reason, given where it comes up.
|
||||
and nothing else. You do not tick a criterion, you do not move the ticket, and you do not
|
||||
fix the code. Each of those has a reason, given where it comes up.
|
||||
|
||||
**Already landed**: skip steps 4 and 5 and follow step 6 instead. The findings become new
|
||||
tickets rather than appended criteria, and the review ends with you moving the ticket to
|
||||
done. You still never tick a criterion and never fix the code.
|
||||
|
||||
## 1. Read the ticket before the code
|
||||
|
||||
@@ -59,6 +66,16 @@ Widen it with the files the description names, since a ticket that names
|
||||
`src/tui.rs` is reviewable through `git log -p -- src/tui.rs` even when no commit
|
||||
message mentions it.
|
||||
|
||||
Once you have the commits, check whether each one is on the default branch. This decides
|
||||
whether you go on to steps 4 and 5 or to step 6, so settle it now:
|
||||
|
||||
```
|
||||
git merge-base --is-ancestor 6d327df master && echo landed # use main if the repo has no master
|
||||
```
|
||||
|
||||
The work has landed only if **every** reviewed commit is on the default branch. If some
|
||||
are and some are still on a branch, it has not landed: follow steps 4 and 5.
|
||||
|
||||
**If nothing names the ticket, that is the finding.** Do not review the working tree on
|
||||
the assumption that whatever is uncommitted must be the work, and do not report a pass
|
||||
you could not check. Comment what you searched for and stop: a ticket sitting in
|
||||
@@ -87,17 +104,21 @@ Then the two questions the criteria cannot ask themselves:
|
||||
|
||||
- **What did this change break that no criterion covers?** Silent behaviour changes,
|
||||
a message or exit code something else reads, an edge case the ticket never named.
|
||||
- **What did the ticket never think of?** That is what you append in step 5.
|
||||
- **What did the ticket never think of?** That is what you append in step 5, or file as a
|
||||
ticket in step 6.
|
||||
|
||||
## 4. Write one comment
|
||||
|
||||
**If the work has landed, skip to step 6 now.** It uses this comment's structure, but only
|
||||
after the new tickets exist, so their ids can go in it.
|
||||
|
||||
One call, one comment. Not one per criterion: the board renders comments in the order
|
||||
they were written, and a review split over eight of them cannot be read as a verdict.
|
||||
|
||||
```
|
||||
worklane comment 1b78a24 "**Verdict**: two criteria unmet, the scroll clamp is off by the header
|
||||
|
||||
**Work reviewed**: 4edc7fa, 6d327df on master
|
||||
**Work reviewed**: 4edc7fa, 6d327df on feature/tui-scroll, not merged
|
||||
|
||||
**Criteria**
|
||||
1. met - PageUp and PageDown reach detail_scroll, src/tui.rs:412
|
||||
@@ -142,7 +163,54 @@ without making it clearer.
|
||||
|
||||
**Do not move the ticket.** `mv` belongs to whoever does the work, the same way ticking
|
||||
does. Your half is the recommendation in the comment; acting on it is theirs. A reviewer
|
||||
that reviews and closes in one breath leaves nobody to disagree with.
|
||||
that reviews and closes in one breath leaves nobody to disagree with. This rule holds
|
||||
for work that has not landed; landed work follows step 6.
|
||||
|
||||
## 6. When the work is already on master
|
||||
|
||||
Use this step instead of steps 4 and 5 when step 2 found every reviewed commit on the
|
||||
default branch. Do not do steps 4 and 5 as well.
|
||||
|
||||
Landed work is not sent back to committed. That would reopen code that has shipped, and
|
||||
whatever fixes the findings is a new change anyway. So every remaining issue moves to a
|
||||
new ticket, and this ticket is closed.
|
||||
|
||||
An **issue** is any of these: a criterion you judged not met, a finding from the two
|
||||
questions in step 3, and a "cannot tell" whose answer needs work, such as a missing test.
|
||||
A "cannot tell" you settle by reading or running something is not an issue: settle it.
|
||||
|
||||
Do these in order, and do not skip ahead:
|
||||
|
||||
1. **File a ticket for every issue**, the way the `worklane` skill says, searching the
|
||||
backlog first. Issues that are related, because they touch the same function or one
|
||||
fix would close them all, go into one ticket together. Unrelated issues get a ticket
|
||||
each. An issue that already has an open ticket gets a comment there, not a new one.
|
||||
2. **Link each new ticket back** to the one under review:
|
||||
`worklane relate <new> --relates-to 1b78a24`, or `worklane relate <new>
|
||||
--regression-of 1b78a24` when the reviewed change broke something that used to work.
|
||||
3. **Write the review comment**, in the structure of step 4. List each issue under
|
||||
`**Findings**` with the id of the ticket that now holds it, and recommend done.
|
||||
4. **Untick every unmet criterion** with `worklane uncheck`, as in step 5, so the closed
|
||||
ticket does not claim what the code does not do. **Do not append criteria**: work for
|
||||
a later commit belongs to the ticket that commit will close, and nobody works a done
|
||||
ticket.
|
||||
5. **Write a closing comment**, separate from the review comment, immediately before the
|
||||
move. It says why the ticket is closing and names the ticket that holds each remaining
|
||||
issue:
|
||||
|
||||
```
|
||||
worklane comment 1b78a24 "Moving to done: the work is on master, and every remaining issue has its own ticket: 7bfb9fc (wrapped-line clamp), 4179958 (footer keys)"
|
||||
```
|
||||
|
||||
With no issues at all, steps 1, 2 and 4 have nothing to do, and the closing comment
|
||||
says that: `Moving to done: the work is on master and the review found no remaining
|
||||
issues`. The review comment is the verdict; the closing comment is the reason for the
|
||||
status change, and it sits in the history right above the move. Without it, a done
|
||||
ticket with unticked criteria looks closed by mistake.
|
||||
6. **Move it to done**: `worklane mv 1b78a24 --status done`. This is the only move a
|
||||
reviewer makes. Make it last: an issue without a ticket is lost once this one is done.
|
||||
With every issue in its own ticket, nothing is left here for the implementer, and
|
||||
leaving the ticket in `reviewing` only hides that the review is finished.
|
||||
|
||||
## What a reviewer does not touch
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ The documents and the opencode tool file the binary carries, and how they are in
|
||||
- The refusal message names the document it is about, `install-skill worklane --print`, since with several installed "compare with --print" does not say compare what
|
||||
- **A refused document does not stop the ones behind it.** The loop reports an outcome per document and the "pick it up on their next session" line is printed once, and only when something was actually written
|
||||
- **A role skill is its own document, not a section of `SKILL.md`.** The frontmatter description is the whole of what decides whether a skill loads, and one description cannot name both "anything touching a ticket" and "only when a review is asked for" without fitting neither. It is also why the review document does not restate the CLI: it says to read the `worklane` skill too
|
||||
- The review skill's own rules are guarded by `the_review_skill_keeps_the_decisions_that_define_it`, because each of them is a line an edit could drop without breaking anything: **the reviewer never ticks a criterion** (a tick is the implementer's claim, unticking is the review disagreeing, and one mark for both loses the disagreement), **never moves the ticket** (`mv` belongs to whoever does the work, the reviewer's half is the recommendation), and **never reviews the working tree when no commit names the ticket** (it says what it searched for and stops, since an untraceable ticket in `reviewing` is itself the finding)
|
||||
- The review skill's own rules are guarded by `the_review_skill_keeps_the_decisions_that_define_it`, because each of them is a line an edit could drop without breaking anything: **the reviewer never ticks a criterion** (a tick is the implementer's claim, unticking is the review disagreeing, and one mark for both loses the disagreement), **never moves the ticket** (`mv` belongs to whoever does the work, the reviewer's half is the recommendation) **unless the work is already on master** (then each finding gets its own ticket, related ones sharing one, and the reviewer moves the original to done once all of them are filed, after a comment saying which ticket holds each remaining issue, since a done ticket with unticked criteria otherwise reads as closed by mistake: sending landed work back to committed reopens shipped code, and leaving it in reviewing with nothing left to do only hides that the review is over), and **never reviews the working tree when no commit names the ticket** (it says what it searched for and stops, since an untraceable ticket in `reviewing` is itself the finding)
|
||||
- **The plan skill is the one that can do damage, so its rules are the ones under test.** `set --tags` replaces the whole field, so a sweep that restates a ticket's tags incompletely deletes the rest, and a due date is neither validated nor clearable. `the_plan_skill_keeps_the_rules_that_bound_a_sweep` pins propose-then-apply and those two traps, because a document that loses them still reads like a plan
|
||||
- `.opencode/agent/feature-planner-agent.md` is **deliberately not folded into `PLAN.md`**. It decomposes a feature request into new tickets, which is intake; `PLAN.md` orders the tickets that already exist. Merging them would give one document two jobs and a frontmatter description that fits neither, which is the same reason the review skill is its own document
|
||||
- **`install-tool` is a second command, not a flag on `install-skill`, because the two artifacts are not alike.** A skill is inert markdown that any agent can read and it reaches both from one path; the tool is executable TypeScript that reaches opencode alone. Claude Code has no directory it scans for a tool definition at all: `claude mcp add` with a `stdio`, `sse` or `http` transport is the only way a tool enters its tool list, and its plugin system adopts `agents`, `hooks`, `monitors`, `workflows`, `output-styles` and `themes` and nothing named tools. So an MCP server, a different artifact, would be what reached it. Verified against Claude Code 2.1.238
|
||||
|
||||
@@ -11,6 +11,7 @@ The commit convention and the version bump that goes with it.
|
||||
- Before every commit, decide whether the change warrants a version bump in `Cargo.toml`
|
||||
- Always ask the user to confirm the bump and its kind before making it — never bump silently, and never skip the question because the answer looks obvious
|
||||
- **`make patch`, `make minor` and `make major` do the mechanics**, run after the commit is in: each bumps `Cargo.toml` and the `worklane` entry in `Cargo.lock`, appends `, and bump to <version>` to the commit's subject, folds the bump into that commit, and tags it. Bumping by hand is how a version comes to be left untagged, which is what the one action is for. It refuses on a dirty tree, on an already-tagged `HEAD` and on a `HEAD` that is already pushed, since each of those makes the amend lose work, orphan a tag or need a force push
|
||||
- **Untracked character devices do not make the tree dirty.** An agent sandbox bind-mounts `/dev/null` over protected paths such as `.bashrc`, `.gitconfig` and files inside `.claude/`, so git sees untracked entries that do not exist outside the sandbox, and `make patch` refused a clean tree. A device cannot be committed, so the check skips them. Untracked files are listed one by one rather than with `--directory`: the collapsed `.claude/` entry is a directory, not a device, and kept the refusal alive
|
||||
- Pre-1.0, so: patch for fixes and internal changes, minor for a new command, flag or changed output, major only for a deliberate 1.0
|
||||
- **Changed output means the CLI's output.** That is the surface scripts and agents read, so a changed listing, message or exit code is a minor. A change to what the board draws is a patch however visible it is, since nothing consumes the frame. See [The Board View](tui-board.md)
|
||||
- **Settling output that shipped one version ago is a patch**, not a second minor. 0.15.1 changed the relation mark 0.15.0 had just introduced, and 0.15.2 added the status mark beside it: the minor was the arrival of a marked relations block, and settling what it marks belongs to that. Three minors in an hour would tell anyone reading the tags that there were three features
|
||||
|
||||
@@ -20,7 +20,7 @@ The TUI: the columns, the cards, the frame, the pickers and the footer.
|
||||
- **`wrapped_height` is the one measurement.** `last_offset` is it less the viewport and `page_indicator` takes the same two numbers, so the clamp and the indicator cannot disagree. A second `line_count` call, or a count of the raw lines, is a number free to drift, and an indicator that says there is more to read where the scroll refuses to move is worse than none
|
||||
- **The furthest offset is the last page by definition, not by division.** The clamp stops at the wrapped height less the viewport, which is not a page boundary, so the final screenful is partial: `offset / step + 1` reads `pg 2/3` at the bottom of a 25 row ticket in a 10 row viewport and claims there is more below
|
||||
- **The pages are counted in `scroll_step`, a screenful less the overlap line, not in whole screenfuls.** The step is what the keys take, so counting in it names only pages `pgdn` can land on. Counting by screenfuls puts a 30 row ticket in a 10 row viewport at `pg 3/3` two rows short of its end, since three presses are what it takes to get there
|
||||
- The indicator is dropped whole on an overlay too narrow for it, the rule a corner and the tags row already follow, and absent entirely when nothing scrolls, the way an untagged card spends no row on tags
|
||||
- The indicator is dropped whole on an overlay too narrow for it, the rule a corner follows, and absent entirely when nothing scrolls, the way an untagged card spends no row on tags
|
||||
- `page_indicator` takes four numbers and returns an `Option<String>`, so every case above is pinned without a terminal. The drawn tests exist for the two things arithmetic cannot answer: which border it landed on and what colour it reached the screen in
|
||||
- **Columns scroll to keep the selected card in view.** `Board::offsets` holds one offset per column, parallel to `columns` and resized in step by `reload`, so a column you leave stays where it was. The keypress aligns the focused column via `follow_selection(screen)`, taking the screen size for the same reason `scroll_detail` does: the visible height belongs to the terminal, which only the caller measures between draws
|
||||
- Card heights are measured on `card_lines`, never assumed, on both the keypress and the draw side (`card_height`, and the `starts` vec as the cards are built). An alignment that trusted a fixed card height would drift from the renderer the first time the card changed shape
|
||||
@@ -46,7 +46,7 @@ The TUI: the columns, the cards, the frame, the pickers and the footer.
|
||||
- **The comment count is the same field discipline and the one entry on that pass that costs a directory listing.** The history lives outside the ticket file, so `count_comments` is a `read_dir` rather than a parse: `.md` only, the filter `read_history` applies, and no body is read, because a count needs none of them. **It counts comments and not entries**, off the kind in the filename, so a card still says how many things somebody said: a ticket that has moved three times has not been talked about, and counting the moves would put a number on every card on the board. `collect_ticket_items` derives the board from `status_path.parent()` instead of taking it as a second argument, so a status directory from one board cannot arrive with the history of another. `history_dir` spells the path once for the writer, the reader and the counter, the way `campaigns_dir` does. Zero draws nothing, not a `0` and not a blank: an uncommented card is the row it has always been, which `a_card_with_no_comments_spends_nothing_on_the_corner` pins to the exact spacing
|
||||
- **The count is cyan and the mark is `COMMENT_MARK`, U+275E, a Dingbat.** It is the only coloured thing on a row whose owner and criteria count are grey, because two counts side by side otherwise read as one number in brackets and another that lost its brackets. Not U+1F4AC SPEECH BALLOON: emoji presentation and East Asian Width Wide, so it draws two cells where `spans_width` counts one character and every corner on the card lands a cell out. Not U+1F5E8 LEFT SPEECH BUBBLE either: text presentation and Neutral, but in a pictograph block most terminal fonts leave as tofu. Check both properties before swapping the glyph
|
||||
- **`the_count_is_read_when_the_items_are_collected_and_not_per_draw` takes the history directory away after the board is built**, and is paired with `a_comment_added_after_the_board_was_built_reaches_the_card_on_reload`, because a count that never asks the filesystem again would pass the first test by never changing. The digest already moves when a comment lands, so the reload is what recounts
|
||||
- **A card names its campaign on the label row, before the tags, in bold.** `labels_line` draws both, `CAMPAIGN_MARK` (`~`) for the campaign and `#` for a tag, and the campaign takes the row's width first: two cards in one campaign is what a reader looking for a campaign is looking for, and the tags are the context around it. So a row too narrow for both drops the tags whole and keeps the campaign, the order `corner_line` and `project_label` already follow, and a campaign the row will not hold at all goes whole too. A ticket in neither spends no row, so **a ticket in no campaign renders exactly as it did before campaigns reached the card**
|
||||
- **A card names its campaign on the label row, before the tags, in bold.** `labels_line` draws both, `CAMPAIGN_MARK` (`~`) for the campaign and `#` for a tag, and the campaign takes the row's width first: two cards in one campaign is what a reader looking for a campaign is looking for, and the tags are the context around it. So a row too narrow for both gives up tags until the two fit and keeps the campaign, the order `corner_line` and `project_label` already follow, and a campaign the row will not hold at all goes whole too. A ticket in neither spends no row, so **a ticket in no campaign renders exactly as it did before campaigns reached the card**
|
||||
- **`Card::campaign` is a resolved `Cell`, not a uuid**, settled at reload the way `project` and `blocked` are. `TicketItem::campaign` already carries the uuid off the pass that builds the card; the name is in another directory, so `columns_of` reads `CampaignIndex` once per project and hands it to every card. Never per draw, the rule `criteria` and `tags` already hold. The merge carries the resolved cell rather than looking it up again, for the reason it carries `blocked`: a campaign is addressed inside one `.worklane`, so a merged lookup could answer one project's uuid with another project's campaign
|
||||
- **A campaign the board does not hold labels nothing**, the answer `mark_blocked` gives a dangling blocker. `campaign_cells` renders that case as `_missing_` because a metadata table is a place to report a dangling reference; a card is not
|
||||
- **`c` opens the campaign picker, and taking a campaign filters the tab's columns to its members.** Not a fifth tab: a campaign groups across the flow, so the shape of the answer is the statuses with fewer cards in them, which is what `campaign show` already answers the question in. Every column is kept, empty ones included. The filter is applied in `reload`, where the columns are built, so nothing downstream has to ask whether a campaign is selected — the board simply holds fewer cards, and `first_match`, `column_count` and the copy key all keep working unchanged
|
||||
@@ -84,6 +84,7 @@ The TUI: the columns, the cards, the frame, the pickers and the footer.
|
||||
- **`y` has nothing to copy from the pile's frame** — no id to shorten and no word a command line takes, `ls --campaign` being unable to say none — so the footer leaves the key out rather than naming it into a notice, and pressing it anyway still answers "nothing to copy"
|
||||
- **The picker draws two sections, open campaigns above completed, and truncates the completed tail.** One flat list by title put the finished campaigns among the open ones forever, and the tail only grows, so on a board that has run for a while the campaigns worth picking were pushed towards the bottom of the box and eventually off it. Open keeps the index's order, which is by title; completed is by `Created At` newest first, because what a reader recognises about a finished campaign is that it was finished recently. `COMPLETED_SHOWN` of them survive, behind a grey line naming how many older ones are being kept back — rows that are simply gone read as a board that never held them. An unstamped campaign sinks below every stamped one, the rule `by_status_order` holds for a column
|
||||
- **The tag sections are declared above undeclared, and truncate neither.** The same two-section shape with the opposite reason for the second: a completed campaign is finished with, so its tail is kept back before it pushes the pickable campaigns off the box, while an undeclared tag — a word somebody typed onto a ticket that the board never agreed on — is the row a reader most wants to see. A declared tag no ticket carries stays a row too: `tags.md` is what the board intends, and the vocabulary the listing reports is the one the picker offers. `campaign` and `campaigns` would have sat one under the other here, in different sections, the day the second was invented
|
||||
- **A tag with nothing open sinks to a third section, `nothing open`, below both.** Every carrier done or discarded, or none at all, whether it is declared or not. A reader opens the picker to find work, and a tag with nothing to pick up is the row in the way of that, the reason completed campaigns sit below open ones. Not truncated, for the reason the other two are not. Each tag row trails `done/total` the way a campaign row does, off a `Standing` counted in `tag_rows` through `is_open`, so finished means the same in both lists; a tag nothing carries draws no standing, as a campaign with no members does. The tag frame keeps its plain ticket count off `standing.total`
|
||||
- **`picker_list` is the one place that decides what a picker row is**, and `Picker::row` counts *drawn* rows. The sections reorder the campaigns and add rows of their own, so `Tab::campaigns` and the drawn list agree about no number past the first heading, and a row number that meant one thing to the draw and another to a keypress is how a highlight comes to name a campaign nobody chose. The list is derived on every draw and every keypress and never held, which is what keeps a campaign filed elsewhere reaching an open picker on the next tick
|
||||
- **A heading is drawn only over rows that exist**, the bargain an untagged card's label row already makes, and it says which kind its rows are for as long as they are there — which is what a query filtering down to completed campaigns alone has to go on saying
|
||||
- **`open` and `completed`, not `open` and `done`.** The split is taken from `Standing::state`, so the section a campaign lands in and the state the frame draws cannot come to disagree about what finished means, but the word is the section's own: a campaign sits in no status directory, so it is not *in* done the way a ticket under that heading is. A campaign with no members is neither, per that method, and lists as open — completed means every member is done, and it holds none to be done
|
||||
@@ -100,7 +101,9 @@ The TUI: the columns, the cards, the frame, the pickers and the footer.
|
||||
- **`Tab::standing` is gone with it.** The frame's standing is the row's, because two counts of one number are two numbers free to drift — the rule `wrapped_height` holds for the scroll. `the_standings_are_read_when_the_cards_are_and_not_per_draw` takes the status directories away after the board is built, paired with `a_member_finished_after_the_board_was_built_completes_its_campaign` for the reason the comment count's two tests are paired: a standing that never asked the filesystem again would pass the first by never changing
|
||||
- **`q` takes off one layer at a time, in the order they were put on**: the overlay, then the campaign filter, then the board. `Board::dismiss` holds all three, and it takes the screen now because clearing the filter reloads and has to follow the selection. Selecting a campaign closes an open ticket, the answer hiding the done column already gives: the ticket may not be on the filtered board at all, and swapping it for a different one without saying so is how a person acts on the wrong ticket
|
||||
- **`digest` watches the campaigns directory** as well as the statuses and the history. A campaign filed elsewhere has to reach the picker and a codename edited by hand has to reach every card that names it, and a directory's own mtime would miss the edit
|
||||
- **The tags go under the title, dimmed, each prefixed with `#`.** The field was invisible on the board: nothing said a ticket was tagged `bug` without opening it. The marker is what stops the row reading as a third line of the title, since a tag is an ordinary word and the title sits directly above it. The row is dropped whole when the column will not hold it, the rule a corner follows, and an untagged ticket spends no row at all, the way a short title spends no second one
|
||||
- **The tags go under the title, dimmed, each prefixed with `#`.** The field was invisible on the board: nothing said a ticket was tagged `bug` without opening it. The marker is what stops the row reading as a third line of the title, since a tag is an ordinary word and the title sits directly above it. An untagged ticket spends no row at all, the way a short title spends no second one
|
||||
- **A row the column will not hold draws the tags that fit and ends in `(+n)`**, the count of the ones it left out. Whole tags only, the rule a corner follows: `bug` and `bugfix` cut to the same width say the same thing. What changed in 39be95b2 is the other half of that rule — the row used to go whole, so a narrow column, which is exactly where a reader is scanning cards for a tag, showed no tags at all. A short row is allowed as long as it says it is short, and the indicator is the entire difference between a cut list and one that reads as the ticket's whole list. So a row with no room for one tag beside the count is still dropped whole: `(+3)` alone tells nobody anything, and a tag drawn without the count would lie. `tags_that_fit` measures the indicator as part of the row it counts rather than reserving it up front, because `(+9)` and `(+10)` are different widths and a list of under ten should not pay for the tenth
|
||||
- **The count is grey and parenthesised**, not a colour of its own and not bracketed: it is a fact about the row rather than another tag on it, and `[n/m]` two rows below is the criteria count
|
||||
- `tags` is a field on `TicketItem`, filled in `collect_ticket_items` through `parse_tags`, for the reason the criteria count is. `parse_tags` splits the comma-separated field into whole trimmed values, so a caller asking for `bug` is not answered by `bugfix`, and reads absent, `_None_` and empty as the same answer
|
||||
- **A held-up card carries `BLOCKED_MARK`, `×`, after its id, in brightred.** The constant lives in `util.rs` and the relations block draws the same one, since both say the same word. A ticket its blocker has not moved out of the way of looked exactly like one that is ready, and the board is where the next thing to pick up is chosen. The mark is `mv`'s own rule asked one column ahead, so it says this cannot advance rather than that a dependency was ever recorded: a card in committed whose blocker is in reviewing is unmarked, because reviewing is where it may go, and the same card is marked once it sits in reviewing and only done is left. The two terminal columns have no next stage and nothing in them is drawn blocked. Not a fourth circle from Geometric Shapes: those belong to the priority meter two cells away and would read as part of that ramp. The multiplication sign is Latin-1, like the middle dot the unset priority draws, so it renders wherever the meter does
|
||||
- **The mark goes after the id, not before it.** Ahead of the id it would push every id in the column out of line whenever one card was blocked, which costs more than one card's state is worth. It is measured before the project label and the due date, so both give way to it: those are context for a ticket somebody can start, and this is the one thing on a card that says not to. Dropped whole when the row cannot hold the identity and the mark together, the rule a corner follows
|
||||
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="512" height="512"><title>worklane</title><defs><filter id="ink2" filterUnits="userSpaceOnUse" x="-5" y="-5" width="110" height="110" color-interpolation-filters="sRGB">
|
||||
<feTurbulence type="fractalNoise" baseFrequency="0.045" numOctaves="2" seed="4" result="n"></feTurbulence>
|
||||
<feDisplacementMap in="SourceGraphic" in2="n" scale="2.2" xChannelSelector="R" yChannelSelector="G" result="d"></feDisplacementMap>
|
||||
<feTurbulence type="fractalNoise" baseFrequency="0.3" numOctaves="2" seed="11" result="g"></feTurbulence>
|
||||
<feColorMatrix in="g" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 0 0 0 11.4" result="m"></feColorMatrix>
|
||||
<feComposite in="d" in2="m" operator="in"></feComposite>
|
||||
</filter></defs><rect width="100" height="100" fill="#e7e4df"/><g transform="translate(50 50) scale(.80) translate(-50 -50)"><g filter="url(#ink2)"><polygon points="19.27,5.61 25.36,4.44 31.42,5.74 37.75,5.74 44.02,4.81 49.80,4.66 56.74,4.26 61.80,5.80 67.94,5.01 74.65,4.42 81.88,4.67 85.78,10.09 89.96,14.23 95.59,18.18 94.18,26.06 95.24,30.67 94.54,37.80 95.27,43.04 95.38,50.37 94.26,57.04 94.86,62.76 95.41,67.79 94.82,74.12 94.61,80.76 89.73,86.12 84.77,89.77 80.20,95.51 74.52,94.92 68.64,94.25 62.27,95.71 56.50,94.22 49.30,94.27 44.47,95.34 38.15,94.52 32.06,95.40 24.49,95.21 18.90,94.51 14.67,91.02 9.31,86.56 4.10,81.11 5.29,75.51 5.03,69.37 5.46,61.86 4.74,56.40 4.99,50.59 4.38,44.20 5.77,38.13 4.47,31.36 4.49,25.65 5.13,18.75 8.86,13.63 15.22,10.42" style="fill:#2a2d31"></polygon><polygon points="22.54,11.28 28.29,11.25 34.39,11.67 40.70,11.63 47.25,11.82 53.11,11.90 58.87,11.75 65.73,11.65 71.73,11.54 77.53,11.81 83.13,16.71 88.43,22.55 88.24,28.77 88.08,34.77 88.60,40.56 88.32,47.12 88.21,52.89 88.69,59.35 88.84,65.49 88.68,71.16 88.92,77.51 83.33,83.13 77.92,88.63 71.25,88.32 64.85,88.66 59.07,88.51 53.20,88.17 47.02,88.45 40.74,88.37 34.63,88.84 28.18,88.53 22.61,88.41 16.94,82.81 11.64,77.95 11.95,71.18 11.13,65.67 11.61,59.17 11.07,53.50 11.56,46.52 11.61,40.73 11.32,34.41 11.10,28.26 11.18,22.91 16.59,16.55" style="fill:#e2652a"></polygon><polygon points="24.30,13.55 30.27,13.76 36.95,14.35 43.93,13.57 50.14,14.13 56.48,14.12 62.85,14.40 69.09,14.20 76.33,14.04 81.13,19.08 85.83,23.88 85.83,30.92 85.97,37.15 85.86,43.24 85.67,50.37 85.60,56.08 86.19,63.28 86.17,69.73 86.11,76.20 81.25,81.26 75.93,85.95 69.07,85.68 62.95,86.27 56.21,85.98 49.61,85.85 43.32,85.80 37.12,85.74 30.94,86.29 24.21,85.61 18.80,80.96 14.17,75.87 13.62,69.74 14.38,63.35 13.83,56.72 13.78,50.44 14.02,43.84 13.68,36.86 14.18,30.69 14.39,24.23 19.02,19.43" style="fill:#2a2d31"></polygon><polygon points="24.08,23.77 31.08,24.03 38.23,24.17 38.23,27.12 30.88,27.03 24.18,27.06" style="fill:#e2652a"></polygon><polygon points="23.84,30.87 31.24,30.62 38.01,30.99 37.92,39.37 31.33,39.31 23.86,39.30" style="fill:#e2652a"></polygon><polygon points="24.03,41.55 30.74,42.45 37.81,42.38 38.20,50.29 30.70,49.89 24.43,50.23" style="fill:#e2652a"></polygon><polygon points="23.89,52.84 31.16,53.17 37.83,52.59 38.17,61.43 31.17,60.66 24.08,60.80" style="fill:#e2652a"></polygon><polygon points="23.66,63.69 31.12,63.85 38.10,64.10 37.61,72.29 30.71,71.76 24.21,72.38" style="fill:#e2652a"></polygon><polygon points="43.00,24.22 50.03,24.04 56.89,23.88 57.10,26.76 49.81,26.78 42.99,26.79" style="fill:#e2652a"></polygon><polygon points="43.35,31.42 49.64,30.62 57.38,30.88 57.38,39.40 50.19,39.04 43.10,39.36" style="fill:#e2652a"></polygon><polygon points="43.37,41.55 50.04,42.35 56.87,41.85 57.26,49.74 50.39,49.64 43.23,50.37" style="fill:#e2652a"></polygon><polygon points="61.85,23.90 69.23,23.93 76.04,23.89 76.02,27.11 68.97,26.99 62.24,26.87" style="fill:#e2652a"></polygon><polygon points="62.25,31.01 69.42,30.82 76.29,30.86 76.11,39.36 68.73,38.57 62.28,38.78" style="fill:#e2652a"></polygon><polygon points="58.36,53.51 64.71,51.72 71.63,50.33 73.77,58.34 66.61,59.55 59.97,61.15" style="fill:#e2652a"></polygon><polygon points="25.09,32.53 26.05,31.80 25.57,31.65" style="fill:#2a2d31"></polygon><polygon points="27.23,32.53 28.25,32.00 27.54,31.65" style="fill:#2a2d31"></polygon><polygon points="29.36,32.53 30.45,31.82 30.02,31.65" style="fill:#2a2d31"></polygon><polygon points="31.48,32.53 32.65,32.01 32.14,31.65" style="fill:#2a2d31"></polygon><polygon points="33.68,32.53 34.85,31.84 34.43,31.65" style="fill:#2a2d31"></polygon><polygon points="26.06,34.51 27.15,33.78 26.55,33.63" style="fill:#2a2d31"></polygon><polygon points="28.44,34.51 29.35,34.07 28.74,33.63" style="fill:#2a2d31"></polygon><polygon points="30.39,34.51 31.55,34.13 30.97,33.63" style="fill:#2a2d31"></polygon><polygon points="32.53,34.51 33.75,34.08 33.20,33.63" style="fill:#2a2d31"></polygon><polygon points="34.68,34.51 35.95,33.89 35.29,33.63" style="fill:#2a2d31"></polygon><polygon points="24.92,36.49 26.05,35.80 25.31,35.61" style="fill:#2a2d31"></polygon><polygon points="27.08,36.49 28.25,36.03 27.55,35.61" style="fill:#2a2d31"></polygon><polygon points="29.23,36.49 30.45,35.80 29.92,35.61" style="fill:#2a2d31"></polygon><polygon points="31.58,36.49 32.65,35.87 32.09,35.61" style="fill:#2a2d31"></polygon><polygon points="33.88,36.49 34.85,35.98 34.31,35.61" style="fill:#2a2d31"></polygon></g></g></svg>
|
||||
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 828 B |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="512" height="512"><title>worklane</title><defs><filter id="ink" filterUnits="userSpaceOnUse" x="-5" y="-5" width="110" height="110" color-interpolation-filters="sRGB">
|
||||
<feTurbulence type="fractalNoise" baseFrequency="0.045" numOctaves="2" seed="4" result="n"></feTurbulence>
|
||||
<feDisplacementMap in="SourceGraphic" in2="n" scale="2.2" xChannelSelector="R" yChannelSelector="G" result="d"></feDisplacementMap>
|
||||
<feTurbulence type="fractalNoise" baseFrequency="0.3" numOctaves="2" seed="11" result="g"></feTurbulence>
|
||||
<feColorMatrix in="g" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 0 0 0 11.4" result="m"></feColorMatrix>
|
||||
<feComposite in="d" in2="m" operator="in"></feComposite>
|
||||
</filter></defs><rect width="100" height="100" fill="#e7e4df"/><g filter="url(#ink)"><polygon points="19.27,5.61 25.36,4.44 31.42,5.74 37.75,5.74 44.02,4.81 49.80,4.66 56.74,4.26 61.80,5.80 67.94,5.01 74.65,4.42 81.88,4.67 85.78,10.09 89.96,14.23 95.59,18.18 94.18,26.06 95.24,30.67 94.54,37.80 95.27,43.04 95.38,50.37 94.26,57.04 94.86,62.76 95.41,67.79 94.82,74.12 94.61,80.76 89.73,86.12 84.77,89.77 80.20,95.51 74.52,94.92 68.64,94.25 62.27,95.71 56.50,94.22 49.30,94.27 44.47,95.34 38.15,94.52 32.06,95.40 24.49,95.21 18.90,94.51 14.67,91.02 9.31,86.56 4.10,81.11 5.29,75.51 5.03,69.37 5.46,61.86 4.74,56.40 4.99,50.59 4.38,44.20 5.77,38.13 4.47,31.36 4.49,25.65 5.13,18.75 8.86,13.63 15.22,10.42" style="fill:#2a2d31"></polygon><polygon points="22.54,11.28 28.29,11.25 34.39,11.67 40.70,11.63 47.25,11.82 53.11,11.90 58.87,11.75 65.73,11.65 71.73,11.54 77.53,11.81 83.13,16.71 88.43,22.55 88.24,28.77 88.08,34.77 88.60,40.56 88.32,47.12 88.21,52.89 88.69,59.35 88.84,65.49 88.68,71.16 88.92,77.51 83.33,83.13 77.92,88.63 71.25,88.32 64.85,88.66 59.07,88.51 53.20,88.17 47.02,88.45 40.74,88.37 34.63,88.84 28.18,88.53 22.61,88.41 16.94,82.81 11.64,77.95 11.95,71.18 11.13,65.67 11.61,59.17 11.07,53.50 11.56,46.52 11.61,40.73 11.32,34.41 11.10,28.26 11.18,22.91 16.59,16.55" style="fill:#e2652a"></polygon><polygon points="24.30,13.55 30.27,13.76 36.95,14.35 43.93,13.57 50.14,14.13 56.48,14.12 62.85,14.40 69.09,14.20 76.33,14.04 81.13,19.08 85.83,23.88 85.83,30.92 85.97,37.15 85.86,43.24 85.67,50.37 85.60,56.08 86.19,63.28 86.17,69.73 86.11,76.20 81.25,81.26 75.93,85.95 69.07,85.68 62.95,86.27 56.21,85.98 49.61,85.85 43.32,85.80 37.12,85.74 30.94,86.29 24.21,85.61 18.80,80.96 14.17,75.87 13.62,69.74 14.38,63.35 13.83,56.72 13.78,50.44 14.02,43.84 13.68,36.86 14.18,30.69 14.39,24.23 19.02,19.43" style="fill:#2a2d31"></polygon><polygon points="24.08,23.77 31.08,24.03 38.23,24.17 38.23,27.12 30.88,27.03 24.18,27.06" style="fill:#e2652a"></polygon><polygon points="23.84,30.87 31.24,30.62 38.01,30.99 37.92,39.37 31.33,39.31 23.86,39.30" style="fill:#e2652a"></polygon><polygon points="24.03,41.55 30.74,42.45 37.81,42.38 38.20,50.29 30.70,49.89 24.43,50.23" style="fill:#e2652a"></polygon><polygon points="23.89,52.84 31.16,53.17 37.83,52.59 38.17,61.43 31.17,60.66 24.08,60.80" style="fill:#e2652a"></polygon><polygon points="23.66,63.69 31.12,63.85 38.10,64.10 37.61,72.29 30.71,71.76 24.21,72.38" style="fill:#e2652a"></polygon><polygon points="43.00,24.22 50.03,24.04 56.89,23.88 57.10,26.76 49.81,26.78 42.99,26.79" style="fill:#e2652a"></polygon><polygon points="43.35,31.42 49.64,30.62 57.38,30.88 57.38,39.40 50.19,39.04 43.10,39.36" style="fill:#e2652a"></polygon><polygon points="43.37,41.55 50.04,42.35 56.87,41.85 57.26,49.74 50.39,49.64 43.23,50.37" style="fill:#e2652a"></polygon><polygon points="61.85,23.90 69.23,23.93 76.04,23.89 76.02,27.11 68.97,26.99 62.24,26.87" style="fill:#e2652a"></polygon><polygon points="62.25,31.01 69.42,30.82 76.29,30.86 76.11,39.36 68.73,38.57 62.28,38.78" style="fill:#e2652a"></polygon><polygon points="58.36,53.51 64.71,51.72 71.63,50.33 73.77,58.34 66.61,59.55 59.97,61.15" style="fill:#e2652a"></polygon><polygon points="25.09,32.53 26.05,31.80 25.57,31.65" style="fill:#2a2d31"></polygon><polygon points="27.23,32.53 28.25,32.00 27.54,31.65" style="fill:#2a2d31"></polygon><polygon points="29.36,32.53 30.45,31.82 30.02,31.65" style="fill:#2a2d31"></polygon><polygon points="31.48,32.53 32.65,32.01 32.14,31.65" style="fill:#2a2d31"></polygon><polygon points="33.68,32.53 34.85,31.84 34.43,31.65" style="fill:#2a2d31"></polygon><polygon points="26.06,34.51 27.15,33.78 26.55,33.63" style="fill:#2a2d31"></polygon><polygon points="28.44,34.51 29.35,34.07 28.74,33.63" style="fill:#2a2d31"></polygon><polygon points="30.39,34.51 31.55,34.13 30.97,33.63" style="fill:#2a2d31"></polygon><polygon points="32.53,34.51 33.75,34.08 33.20,33.63" style="fill:#2a2d31"></polygon><polygon points="34.68,34.51 35.95,33.89 35.29,33.63" style="fill:#2a2d31"></polygon><polygon points="24.92,36.49 26.05,35.80 25.31,35.61" style="fill:#2a2d31"></polygon><polygon points="27.08,36.49 28.25,36.03 27.55,35.61" style="fill:#2a2d31"></polygon><polygon points="29.23,36.49 30.45,35.80 29.92,35.61" style="fill:#2a2d31"></polygon><polygon points="31.58,36.49 32.65,35.87 32.09,35.61" style="fill:#2a2d31"></polygon><polygon points="33.88,36.49 34.85,35.98 34.31,35.61" style="fill:#2a2d31"></polygon></g></svg>
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="512" height="512"><title>worklane</title><defs><filter id="ink" filterUnits="userSpaceOnUse" x="-5" y="-5" width="110" height="110" color-interpolation-filters="sRGB">
|
||||
<feTurbulence type="fractalNoise" baseFrequency="0.045" numOctaves="2" seed="4" result="n"></feTurbulence>
|
||||
<feDisplacementMap in="SourceGraphic" in2="n" scale="2.2" xChannelSelector="R" yChannelSelector="G" result="d"></feDisplacementMap>
|
||||
<feTurbulence type="fractalNoise" baseFrequency="0.3" numOctaves="2" seed="11" result="g"></feTurbulence>
|
||||
<feColorMatrix in="g" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 0 0 0 11.4" result="m"></feColorMatrix>
|
||||
<feComposite in="d" in2="m" operator="in"></feComposite>
|
||||
</filter></defs><g filter="url(#ink)"><polygon points="19.27,5.61 25.36,4.44 31.42,5.74 37.75,5.74 44.02,4.81 49.80,4.66 56.74,4.26 61.80,5.80 67.94,5.01 74.65,4.42 81.88,4.67 85.78,10.09 89.96,14.23 95.59,18.18 94.18,26.06 95.24,30.67 94.54,37.80 95.27,43.04 95.38,50.37 94.26,57.04 94.86,62.76 95.41,67.79 94.82,74.12 94.61,80.76 89.73,86.12 84.77,89.77 80.20,95.51 74.52,94.92 68.64,94.25 62.27,95.71 56.50,94.22 49.30,94.27 44.47,95.34 38.15,94.52 32.06,95.40 24.49,95.21 18.90,94.51 14.67,91.02 9.31,86.56 4.10,81.11 5.29,75.51 5.03,69.37 5.46,61.86 4.74,56.40 4.99,50.59 4.38,44.20 5.77,38.13 4.47,31.36 4.49,25.65 5.13,18.75 8.86,13.63 15.22,10.42" style="fill:#2a2d31"></polygon><polygon points="22.54,11.28 28.29,11.25 34.39,11.67 40.70,11.63 47.25,11.82 53.11,11.90 58.87,11.75 65.73,11.65 71.73,11.54 77.53,11.81 83.13,16.71 88.43,22.55 88.24,28.77 88.08,34.77 88.60,40.56 88.32,47.12 88.21,52.89 88.69,59.35 88.84,65.49 88.68,71.16 88.92,77.51 83.33,83.13 77.92,88.63 71.25,88.32 64.85,88.66 59.07,88.51 53.20,88.17 47.02,88.45 40.74,88.37 34.63,88.84 28.18,88.53 22.61,88.41 16.94,82.81 11.64,77.95 11.95,71.18 11.13,65.67 11.61,59.17 11.07,53.50 11.56,46.52 11.61,40.73 11.32,34.41 11.10,28.26 11.18,22.91 16.59,16.55" style="fill:#e2652a"></polygon><polygon points="24.30,13.55 30.27,13.76 36.95,14.35 43.93,13.57 50.14,14.13 56.48,14.12 62.85,14.40 69.09,14.20 76.33,14.04 81.13,19.08 85.83,23.88 85.83,30.92 85.97,37.15 85.86,43.24 85.67,50.37 85.60,56.08 86.19,63.28 86.17,69.73 86.11,76.20 81.25,81.26 75.93,85.95 69.07,85.68 62.95,86.27 56.21,85.98 49.61,85.85 43.32,85.80 37.12,85.74 30.94,86.29 24.21,85.61 18.80,80.96 14.17,75.87 13.62,69.74 14.38,63.35 13.83,56.72 13.78,50.44 14.02,43.84 13.68,36.86 14.18,30.69 14.39,24.23 19.02,19.43" style="fill:#2a2d31"></polygon><polygon points="24.08,23.77 31.08,24.03 38.23,24.17 38.23,27.12 30.88,27.03 24.18,27.06" style="fill:#e2652a"></polygon><polygon points="23.84,30.87 31.24,30.62 38.01,30.99 37.92,39.37 31.33,39.31 23.86,39.30" style="fill:#e2652a"></polygon><polygon points="24.03,41.55 30.74,42.45 37.81,42.38 38.20,50.29 30.70,49.89 24.43,50.23" style="fill:#e2652a"></polygon><polygon points="23.89,52.84 31.16,53.17 37.83,52.59 38.17,61.43 31.17,60.66 24.08,60.80" style="fill:#e2652a"></polygon><polygon points="23.66,63.69 31.12,63.85 38.10,64.10 37.61,72.29 30.71,71.76 24.21,72.38" style="fill:#e2652a"></polygon><polygon points="43.00,24.22 50.03,24.04 56.89,23.88 57.10,26.76 49.81,26.78 42.99,26.79" style="fill:#e2652a"></polygon><polygon points="43.35,31.42 49.64,30.62 57.38,30.88 57.38,39.40 50.19,39.04 43.10,39.36" style="fill:#e2652a"></polygon><polygon points="43.37,41.55 50.04,42.35 56.87,41.85 57.26,49.74 50.39,49.64 43.23,50.37" style="fill:#e2652a"></polygon><polygon points="61.85,23.90 69.23,23.93 76.04,23.89 76.02,27.11 68.97,26.99 62.24,26.87" style="fill:#e2652a"></polygon><polygon points="62.25,31.01 69.42,30.82 76.29,30.86 76.11,39.36 68.73,38.57 62.28,38.78" style="fill:#e2652a"></polygon><polygon points="58.36,53.51 64.71,51.72 71.63,50.33 73.77,58.34 66.61,59.55 59.97,61.15" style="fill:#e2652a"></polygon><polygon points="25.09,32.53 26.05,31.80 25.57,31.65" style="fill:#2a2d31"></polygon><polygon points="27.23,32.53 28.25,32.00 27.54,31.65" style="fill:#2a2d31"></polygon><polygon points="29.36,32.53 30.45,31.82 30.02,31.65" style="fill:#2a2d31"></polygon><polygon points="31.48,32.53 32.65,32.01 32.14,31.65" style="fill:#2a2d31"></polygon><polygon points="33.68,32.53 34.85,31.84 34.43,31.65" style="fill:#2a2d31"></polygon><polygon points="26.06,34.51 27.15,33.78 26.55,33.63" style="fill:#2a2d31"></polygon><polygon points="28.44,34.51 29.35,34.07 28.74,33.63" style="fill:#2a2d31"></polygon><polygon points="30.39,34.51 31.55,34.13 30.97,33.63" style="fill:#2a2d31"></polygon><polygon points="32.53,34.51 33.75,34.08 33.20,33.63" style="fill:#2a2d31"></polygon><polygon points="34.68,34.51 35.95,33.89 35.29,33.63" style="fill:#2a2d31"></polygon><polygon points="24.92,36.49 26.05,35.80 25.31,35.61" style="fill:#2a2d31"></polygon><polygon points="27.08,36.49 28.25,36.03 27.55,35.61" style="fill:#2a2d31"></polygon><polygon points="29.23,36.49 30.45,35.80 29.92,35.61" style="fill:#2a2d31"></polygon><polygon points="31.58,36.49 32.65,35.87 32.09,35.61" style="fill:#2a2d31"></polygon><polygon points="33.88,36.49 34.85,35.98 34.31,35.61" style="fill:#2a2d31"></polygon></g></svg>
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
@@ -526,6 +526,9 @@ mod tests {
|
||||
"nothing names the ticket", // and the no-work-found case is answered
|
||||
"Never tick a criterion",
|
||||
"Do not move the ticket",
|
||||
"already on master", // landed work: findings become tickets, then done
|
||||
"File a ticket for every issue",
|
||||
"Write a closing comment", // and says so before the move
|
||||
"worklane uncheck",
|
||||
"worklane append",
|
||||
"cannot tell",
|
||||
|
||||
@@ -425,13 +425,13 @@ pub struct TagRow {
|
||||
/// from `None` and the reason this is not a bare string: one was agreed on and left
|
||||
/// unexplained, the other was never agreed on at all.
|
||||
pub annotation: Option<String>,
|
||||
/// How many cards on this tab carry it, drawn or not.
|
||||
/// How many cards on this tab carry it, drawn or not, and how many of those are finished.
|
||||
///
|
||||
/// Every column, done included, for the reason `standings_of` counts every column:
|
||||
/// hiding done changes what is drawn and never what is counted. Zero is what a declared
|
||||
/// tag nothing carries shows, which is what makes picking it and getting an empty board
|
||||
/// something the reader saw coming.
|
||||
pub count: usize,
|
||||
/// hiding done changes what is drawn and never what is counted. A [`Standing`] rather
|
||||
/// than a bare count so the picker can say what a campaign row says, how much is left,
|
||||
/// and so finished means one thing for both: done or discarded, through `is_open`.
|
||||
pub standing: Standing,
|
||||
}
|
||||
|
||||
impl TagRow {
|
||||
@@ -440,6 +440,12 @@ impl TagRow {
|
||||
self.annotation.is_some()
|
||||
}
|
||||
|
||||
/// Whether any ticket carrying it is still open, which decides whether it sinks to the
|
||||
/// bottom section. A tag nothing carries has nothing open either.
|
||||
pub fn has_open(&self) -> bool {
|
||||
self.standing.done < self.standing.total
|
||||
}
|
||||
|
||||
/// The opening line of what it means, or empty for a tag with nothing said about it.
|
||||
///
|
||||
/// The cut lives here rather than on the field, the way [`CampaignRow::summary`] takes
|
||||
@@ -1166,6 +1172,7 @@ const OPEN_SECTION: &str = "open";
|
||||
const COMPLETED_SECTION: &str = "completed";
|
||||
const DECLARED_SECTION: &str = "declared";
|
||||
const UNDECLARED_SECTION: &str = "undeclared";
|
||||
const NOTHING_OPEN_SECTION: &str = "nothing open";
|
||||
|
||||
/// How many completed campaigns the list shows before it starts keeping them back.
|
||||
///
|
||||
@@ -1323,7 +1330,8 @@ fn campaign_picker_rows<'a>(tab: &'a Tab, query: &str) -> Vec<PickerRow<'a>> {
|
||||
rows
|
||||
}
|
||||
|
||||
/// The tag rows: declared above undeclared, and neither truncated.
|
||||
/// The tag rows: declared above undeclared above the tags with nothing open, and none
|
||||
/// truncated.
|
||||
///
|
||||
/// The same two-section shape as the campaigns and the opposite reason for the second
|
||||
/// section. A completed campaign is finished with and the tail of them is truncated because
|
||||
@@ -1335,12 +1343,19 @@ fn campaign_picker_rows<'a>(tab: &'a Tab, query: &str) -> Vec<PickerRow<'a>> {
|
||||
/// So nothing is kept back, and the headings are drawn even when only one section has rows:
|
||||
/// which of the two a tag is in is the fact the split is for, and a single unlabelled list
|
||||
/// would leave the reader to guess it.
|
||||
///
|
||||
/// A tag with no open ticket, every carrier done or discarded or none at all, sinks to a
|
||||
/// third section below both, whichever of the two it would otherwise sit in. A reader opens
|
||||
/// the picker to find work, and a tag with nothing to pick up is the row that gets in the way
|
||||
/// of that, the reason the completed campaigns sit below the open ones.
|
||||
fn tag_picker_rows<'a>(tab: &'a Tab, query: &str) -> Vec<PickerRow<'a>> {
|
||||
let (declared, undeclared): (Vec<&TagRow>, Vec<&TagRow>) = tab
|
||||
let (live, nothing_open): (Vec<&TagRow>, Vec<&TagRow>) = tab
|
||||
.tags
|
||||
.iter()
|
||||
.filter(|tag| tag_matches(tag, query))
|
||||
.partition(|tag| tag.declared());
|
||||
.partition(|tag| tag.has_open());
|
||||
let (declared, undeclared): (Vec<&TagRow>, Vec<&TagRow>) =
|
||||
live.into_iter().partition(|tag| tag.declared());
|
||||
|
||||
let mut rows: Vec<PickerRow> = Vec::new();
|
||||
if !declared.is_empty() {
|
||||
@@ -1351,6 +1366,10 @@ fn tag_picker_rows<'a>(tab: &'a Tab, query: &str) -> Vec<PickerRow<'a>> {
|
||||
rows.push(PickerRow::Heading(UNDECLARED_SECTION));
|
||||
rows.extend(undeclared.into_iter().map(PickerRow::Tag));
|
||||
}
|
||||
if !nothing_open.is_empty() {
|
||||
rows.push(PickerRow::Heading(NOTHING_OPEN_SECTION));
|
||||
rows.extend(nothing_open.into_iter().map(PickerRow::Tag));
|
||||
}
|
||||
|
||||
rows
|
||||
}
|
||||
@@ -3397,26 +3416,28 @@ fn campaign_rows(
|
||||
/// `Bug` and `bug` stay two rows and land next to each other, which is where a near
|
||||
/// duplicate is spotted. Case is kept apart because `--tag` keeps it apart.
|
||||
fn tag_rows(tags: &TagIndex, columns: &[Column]) -> Vec<TagRow> {
|
||||
let mut counts: BTreeMap<&str, usize> = BTreeMap::new();
|
||||
let mut standings: BTreeMap<&str, Standing> = BTreeMap::new();
|
||||
|
||||
// Declared first, so a tag nothing carries still gets a row, at zero.
|
||||
for name in tags.names() {
|
||||
counts.entry(name).or_default();
|
||||
standings.entry(name).or_default();
|
||||
}
|
||||
for column in columns {
|
||||
for card in &column.cards {
|
||||
for tag in &card.ticket.tags {
|
||||
*counts.entry(tag.as_str()).or_default() += 1;
|
||||
let standing = standings.entry(tag.as_str()).or_default();
|
||||
standing.total += 1;
|
||||
standing.done += usize::from(!is_open(column.status));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
counts
|
||||
standings
|
||||
.into_iter()
|
||||
.map(|(name, count)| TagRow {
|
||||
.map(|(name, standing)| TagRow {
|
||||
name: name.to_string(),
|
||||
annotation: tags.annotation(name).map(str::to_string),
|
||||
count,
|
||||
standing,
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
@@ -3439,7 +3460,8 @@ fn merged_tag_rows(per_project: &[Vec<TagRow>]) -> Vec<TagRow> {
|
||||
for row in rows {
|
||||
match merged.get_mut(row.name.as_str()) {
|
||||
Some(held) => {
|
||||
held.count += row.count;
|
||||
held.standing.done += row.standing.done;
|
||||
held.standing.total += row.standing.total;
|
||||
if held.annotation.is_none() {
|
||||
held.annotation = row.annotation.clone();
|
||||
}
|
||||
@@ -3971,7 +3993,7 @@ fn frame_content(tab: &Tab, width: u16) -> Option<FrameContent> {
|
||||
}),
|
||||
Filter::Tag(_) => tab.selected_tag().map(|tag| FrameContent {
|
||||
title: tag_title(&tag.name, width),
|
||||
standing: count_spans(tag.count),
|
||||
standing: count_spans(tag.standing.total),
|
||||
prose: tag_prose(tag),
|
||||
}),
|
||||
Filter::NoCampaign => Some(FrameContent {
|
||||
@@ -4557,11 +4579,19 @@ fn card_lines(card: &Card, selected: bool, width: u16) -> Vec<Line<'static>> {
|
||||
/// use — the stronger fact takes the row and the weaker one gives way. Bold is what stops
|
||||
/// it reading as another tag when a card carries five.
|
||||
///
|
||||
/// A row the column will not hold is dropped whole, the rule `corner_line` applies to a
|
||||
/// corner: a cut list reads as a shorter one, and `bug` and `bugfix` truncated to the
|
||||
/// same width say the same thing. A ticket with neither a campaign nor a tag spends no row
|
||||
/// at all, the way a short title spends no second one, so a ticket in no campaign renders
|
||||
/// exactly as it did before campaigns reached the card.
|
||||
/// A row that will not hold every tag draws the ones it can and ends in `(+n)`, the count
|
||||
/// of the ones it left out. No tag is ever cut in half, the rule `corner_line` applies to
|
||||
/// a corner: `bug` and `bugfix` truncated to the same width say the same thing. What the
|
||||
/// row may do is be short, as long as it says so — the indicator is the whole difference
|
||||
/// between a list that was cut and one that reads as complete, which is why the row is
|
||||
/// dropped whole when it cannot hold one tag and the indicator together. A cut list
|
||||
/// without the count is the thing this must never draw. Parentheses rather than brackets,
|
||||
/// which are the criteria count's two rows below, and grey like the owner and that count,
|
||||
/// because it is a fact about the row rather than another tag on it.
|
||||
///
|
||||
/// A ticket with neither a campaign nor a tag spends no row at all, the way a short title
|
||||
/// spends no second one, so a ticket in no campaign renders exactly as it did before
|
||||
/// campaigns reached the card.
|
||||
///
|
||||
/// Each tag carries its own colour, from `tag_color`, so the same tag is the same
|
||||
/// colour on every card in every column, and the campaign carries its own from
|
||||
@@ -4578,21 +4608,13 @@ fn labels_line(campaign: Option<&Cell>, tags: &[String], width: u16) -> Option<L
|
||||
|
||||
// The space between the campaign and the first tag, which the row has to hold too.
|
||||
let room = width.saturating_sub(used + usize::from(campaign.is_some()));
|
||||
let row = tags
|
||||
.iter()
|
||||
.map(|tag| format!("#{tag}"))
|
||||
.collect::<Vec<_>>()
|
||||
.join(" ");
|
||||
let tags: &[String] = match !row.is_empty() && row.chars().count() <= room {
|
||||
true => tags,
|
||||
false => &[],
|
||||
};
|
||||
let (tags, omitted) = tags_that_fit(tags, room);
|
||||
|
||||
if campaign.is_none() && tags.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let mut spans = Vec::with_capacity(tags.len() * 2 + 2);
|
||||
let mut spans = Vec::with_capacity(tags.len() * 2 + 3);
|
||||
if let Some(cell) = campaign {
|
||||
spans
|
||||
.push(span_of(cell.clone()).patch_style(Style::default().add_modifier(Modifier::BOLD)));
|
||||
@@ -4605,9 +4627,70 @@ fn labels_line(campaign: Option<&Cell>, tags: &[String], width: u16) -> Option<L
|
||||
spans.push(Span::styled(format!("#{tag}"), Style::default().fg(tag_color(tag).into())));
|
||||
}
|
||||
|
||||
if omitted > 0 {
|
||||
spans.push(Span::raw(" "));
|
||||
spans.push(Span::styled(
|
||||
omitted_label(omitted),
|
||||
Style::default().fg(Color::Grey.into()),
|
||||
));
|
||||
}
|
||||
|
||||
Some(Line::from(spans))
|
||||
}
|
||||
|
||||
/// How many tags `room` cells will hold, and how many that leaves over.
|
||||
///
|
||||
/// Whole tags only, single spaced, in the order the ticket carries them: the first tags
|
||||
/// are the ones a reader is scanning for, and reordering them would mean the same ticket
|
||||
/// reads differently in two columns of different widths.
|
||||
///
|
||||
/// The indicator is measured as part of the row it counts, not added to a row that was
|
||||
/// already full, so the answer is the largest prefix whose tags **and** `(+n)` fit. It
|
||||
/// shrinks as tags are dropped — `(+9)` for nine and `(+10)` for ten — so the fit is
|
||||
/// recomputed against each candidate rather than reserved once up front, which would
|
||||
/// spend a cell the row does not owe on every list of under ten.
|
||||
///
|
||||
/// A prefix of nothing and a count of everything is a row saying only how much it is not
|
||||
/// showing, which is no use to anybody, so that case comes back as no tags at all and the
|
||||
/// caller spends no row on it. Every other answer either shows every tag or says how many
|
||||
/// it left out; a short list that reads as a complete one is the one thing this cannot
|
||||
/// return.
|
||||
fn tags_that_fit(tags: &[String], room: usize) -> (&[String], usize) {
|
||||
// The whole list first, which is the common case and the only one that draws no
|
||||
// indicator at all.
|
||||
// The hash and the space before the next tag, less the space the first one does not pay.
|
||||
let whole = tags
|
||||
.iter()
|
||||
.map(|tag| tag.chars().count() + 2)
|
||||
.sum::<usize>()
|
||||
.saturating_sub(1);
|
||||
if !tags.is_empty() && whole <= room {
|
||||
return (tags, 0);
|
||||
}
|
||||
|
||||
let mut width = 0;
|
||||
let mut kept = 0;
|
||||
for (n, tag) in tags.iter().enumerate() {
|
||||
// The space before this tag, which the first one does not pay.
|
||||
width += tag.chars().count() + 1 + usize::from(n > 0);
|
||||
// The space before the indicator is its own, the way the space before a tag is.
|
||||
if width + 1 + omitted_label(tags.len() - n - 1).chars().count() > room {
|
||||
break;
|
||||
}
|
||||
kept = n + 1;
|
||||
}
|
||||
|
||||
match kept {
|
||||
0 => (&[], 0),
|
||||
kept => (&tags[..kept], tags.len() - kept),
|
||||
}
|
||||
}
|
||||
|
||||
/// The count of the tags a row left out, as it is drawn.
|
||||
fn omitted_label(omitted: usize) -> String {
|
||||
format!("(+{omitted})")
|
||||
}
|
||||
|
||||
/// The project name as it fits beside whatever the row already carries.
|
||||
///
|
||||
/// The mark, the id and the blocked mark are the ticket's identity and its state, and
|
||||
@@ -5388,16 +5471,17 @@ fn hidden_line(count: usize) -> String {
|
||||
format!("… {count} older completed {campaigns} hidden")
|
||||
}
|
||||
|
||||
/// One tag row: `bug 23 What the tag means`.
|
||||
/// One tag row: `bug What the tag means 5/23`.
|
||||
///
|
||||
/// The tag in its own colour and nothing else, which is how a card draws it: the mark and
|
||||
/// the bold belong to a campaign label, and this list holds no campaigns to be told apart
|
||||
/// from. `tag_color` is a pure function of the word, so the row and the card agree without
|
||||
/// anything being stored.
|
||||
///
|
||||
/// The count is what the row is chosen on as much as the name: it says what picking this
|
||||
/// will give, and a declared tag at zero says the board is about to go empty before the
|
||||
/// reader presses anything. Grey, because it is context around the word being chosen.
|
||||
/// The standing trails the row the way it does a campaign's in `picker_line`, grey and
|
||||
/// reserved before the annotation is cut, and dropped whole when it does not fit. A tag
|
||||
/// nothing carries draws none, as a campaign with no members does; the section it sits in
|
||||
/// already says there is nothing under it.
|
||||
///
|
||||
/// The annotation takes what is left and gives way first, the trade `picker_line` makes
|
||||
/// with a description: half a sentence still says what a tag is for.
|
||||
@@ -5408,18 +5492,15 @@ fn tag_picker_line(tag: &TagRow, selected: bool, width: u16) -> Line<'static> {
|
||||
};
|
||||
let grey = Style::default().fg(Color::Grey.into()).add_modifier(emphasis);
|
||||
|
||||
let mut spans = vec![
|
||||
Span::styled(
|
||||
tag.name.clone(),
|
||||
Style::default()
|
||||
.fg(tag_color(&tag.name).into())
|
||||
.add_modifier(emphasis),
|
||||
),
|
||||
Span::raw(" "),
|
||||
Span::styled(tag.count.to_string(), grey),
|
||||
];
|
||||
let mut spans = vec![Span::styled(
|
||||
tag.name.clone(),
|
||||
Style::default()
|
||||
.fg(tag_color(&tag.name).into())
|
||||
.add_modifier(emphasis),
|
||||
)];
|
||||
|
||||
let used = spans_width(&spans);
|
||||
let standing = standing_text(&tag.standing, spans_width(&spans), width);
|
||||
let used = spans_width(&spans) + standing.as_ref().map_or(0, |text| text.chars().count() + 2);
|
||||
let summary = tag.summary();
|
||||
if !summary.is_empty()
|
||||
&& let Some(room) = (width as usize).checked_sub(used + 2).filter(|room| *room >= 3)
|
||||
@@ -5432,9 +5513,27 @@ fn tag_picker_line(tag: &TagRow, selected: bool, width: u16) -> Line<'static> {
|
||||
spans.push(Span::styled(cut, grey));
|
||||
}
|
||||
|
||||
if let Some(text) = standing {
|
||||
spans.push(Span::raw(" "));
|
||||
spans.push(Span::styled(text, grey));
|
||||
}
|
||||
|
||||
Line::from(spans)
|
||||
}
|
||||
|
||||
/// A standing as a picker row trails it, `2/3`, or nothing when there is nothing to count
|
||||
/// or the rest of the row after `used` will not hold the whole of it: half a count reads as
|
||||
/// the wrong number.
|
||||
fn standing_text(standing: &Standing, used: usize, width: u16) -> Option<String> {
|
||||
if standing.total == 0 {
|
||||
return None;
|
||||
}
|
||||
|
||||
let text = format!("{}/{}", standing.done, standing.total);
|
||||
let room = (width as usize).saturating_sub(used + 2);
|
||||
(text.chars().count() <= room).then_some(text)
|
||||
}
|
||||
|
||||
/// The no-campaign row: `no campaign 12`.
|
||||
///
|
||||
/// Words where a campaign carries an id, because that is what the filter is: not a thing on
|
||||
@@ -5506,18 +5605,7 @@ fn picker_line(campaign: &CampaignRow, selected: bool, width: u16) -> Line<'stat
|
||||
// number, so the whole of it drops when the row will not hold it. A campaign with no
|
||||
// members shows nothing, the way a card with no criteria spends no corner on it.
|
||||
let used_base = spans_width(&spans);
|
||||
let standing = match campaign.standing.total {
|
||||
0 => None,
|
||||
_ => {
|
||||
let text = format!("{}/{}", campaign.standing.done, campaign.standing.total);
|
||||
let room = (width as usize).saturating_sub(used_base + 2);
|
||||
if text.chars().count() <= room {
|
||||
Some(text)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
};
|
||||
let standing = standing_text(&campaign.standing, used_base, width);
|
||||
let standing_w = standing.as_ref().map_or(0, |text| text.chars().count() + 2);
|
||||
|
||||
// What the campaign is *called* takes the row first, and the prose takes what is left.
|
||||
@@ -6536,23 +6624,101 @@ mod tests {
|
||||
assert!(!rows.iter().any(|row| row.contains('#')), "{rows:?}");
|
||||
}
|
||||
|
||||
/// A row too wide for the column goes whole, the rule a corner follows: a cut list
|
||||
/// reads as a shorter one, and bug and bugfix cut to the same width say the same
|
||||
/// thing.
|
||||
/// A row that holds every tag draws every tag and says nothing about a count, which
|
||||
/// is the common card and the one the indicator must not appear on.
|
||||
#[test]
|
||||
fn a_tag_row_too_wide_for_the_column_is_dropped_whole() {
|
||||
fn a_row_that_holds_every_tag_spends_nothing_saying_so() {
|
||||
let dir = board_dir();
|
||||
write_tagged_card(&dir, "Short", "2026-12-31", "- [ ] One", "frontend, operations");
|
||||
|
||||
// One character short of "#frontend #operations", and one over it.
|
||||
let narrow = only_card_at(&dir, 20);
|
||||
assert_eq!(narrow.len(), 4, "the row was kept: {narrow:?}");
|
||||
assert!(!narrow.iter().any(|row| row.contains('#')), "{narrow:?}");
|
||||
|
||||
// Exactly "#frontend #operations".
|
||||
let fits = only_card_at(&dir, 21);
|
||||
assert_eq!(fits[2], "#frontend #operations", "{fits:?}");
|
||||
}
|
||||
|
||||
/// One character short of the whole list, the card draws what it can and counts the
|
||||
/// rest. The row used to go whole there, so a narrow column — which is exactly where
|
||||
/// a reader is scanning cards for a tag — showed no tags at all.
|
||||
#[test]
|
||||
fn a_row_too_narrow_for_every_tag_keeps_what_fits_and_counts_the_rest() {
|
||||
let dir = board_dir();
|
||||
write_tagged_card(&dir, "Short", "2026-12-31", "- [ ] One", "frontend, operations");
|
||||
|
||||
let narrow = only_card_at(&dir, 20);
|
||||
assert_eq!(narrow.len(), 5, "the row was dropped: {narrow:?}");
|
||||
assert_eq!(narrow[2], "#frontend (+1)", "{narrow:?}");
|
||||
}
|
||||
|
||||
/// Whole tags only: half a tag is a different tag, and `bug` and `bugfix` cut to the
|
||||
/// same width say the same thing. So the row gives up a tag before it gives up a
|
||||
/// character of one, and what it draws stays inside the column.
|
||||
#[test]
|
||||
fn a_cut_row_cuts_whole_tags_and_stays_inside_the_column() {
|
||||
let dir = board_dir();
|
||||
write_tagged_card(&dir, "Short", "2026-12-31", "- [ ] One", "cli, tui, docs, tests");
|
||||
|
||||
for inner in 5..=23u16 {
|
||||
let rows = only_card_at(&dir, inner);
|
||||
let row = rows.iter().find(|row| row.contains('#'));
|
||||
let Some(row) = row else { continue };
|
||||
assert!(
|
||||
row.chars().count() <= inner as usize,
|
||||
"past the column at {inner}: {row:?}"
|
||||
);
|
||||
for word in row.split_whitespace().filter(|word| word.starts_with('#')) {
|
||||
assert!(
|
||||
["#cli", "#tui", "#docs", "#tests"].contains(&word),
|
||||
"a tag was cut at {inner}: {row:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The count is of the tags left out, not of the tags on the ticket, and it grows as
|
||||
/// the column narrows rather than standing for whatever the first cut happened to be.
|
||||
#[test]
|
||||
fn the_indicator_counts_the_tags_the_row_left_out() {
|
||||
let dir = board_dir();
|
||||
write_tagged_card(&dir, "Short", "2026-12-31", "- [ ] One", "cli, tui, docs, tests");
|
||||
|
||||
assert_eq!(only_card_at(&dir, 20)[2], "#cli #tui #docs (+1)");
|
||||
assert_eq!(only_card_at(&dir, 16)[2], "#cli #tui (+2)");
|
||||
assert_eq!(only_card_at(&dir, 11)[2], "#cli (+3)");
|
||||
}
|
||||
|
||||
/// A row with no room for one tag beside the count goes whole, as it always did: a
|
||||
/// row saying only how many tags it is not showing is no use to anybody, and a tag
|
||||
/// drawn without the count would read as the ticket's whole list.
|
||||
#[test]
|
||||
fn a_row_too_narrow_for_one_tag_and_the_count_is_dropped_whole() {
|
||||
let dir = board_dir();
|
||||
write_tagged_card(&dir, "Short", "2026-12-31", "- [ ] One", "frontend, operations");
|
||||
|
||||
// One short of "#frontend (+1)".
|
||||
let narrow = only_card_at(&dir, 13);
|
||||
assert_eq!(narrow.len(), 4, "the row was kept: {narrow:?}");
|
||||
assert!(!narrow.iter().any(|row| row.contains('#')), "{narrow:?}");
|
||||
}
|
||||
|
||||
/// The count is grey like the owner and the criteria count, not a colour of its own:
|
||||
/// it is a fact about the row rather than another tag on it.
|
||||
#[test]
|
||||
fn the_indicator_is_drawn_in_grey_rather_than_as_a_tag() {
|
||||
let dir = board_dir();
|
||||
write_tagged_card(&dir, "Short", "2026-12-31", "- [ ] One", "frontend, operations");
|
||||
|
||||
let board = one_board(&dir);
|
||||
let card = board.selected().expect("no card");
|
||||
let colour = card_lines(card, false, 20)
|
||||
.into_iter()
|
||||
.flat_map(|line| line.spans)
|
||||
.find(|span| span.content == "(+1)")
|
||||
.map(|span| span.style.fg)
|
||||
.expect("no indicator on the row");
|
||||
|
||||
assert_eq!(colour, Some(Color::Grey.into()));
|
||||
}
|
||||
|
||||
/// And a title that fits gets one row, or the second is wasted on every short
|
||||
/// ticket in the column.
|
||||
#[test]
|
||||
@@ -11845,11 +12011,11 @@ approach";
|
||||
rows,
|
||||
vec![
|
||||
"declared",
|
||||
"bug 2 Behaviour that contradicts what the tool says.",
|
||||
"chore 0 Work with nothing to see.",
|
||||
"cli 1 The command line surface.",
|
||||
"undeclared",
|
||||
"sync 1",
|
||||
"bug Behaviour that contradicts what the tool says. 0/2",
|
||||
"cli The command line surface. 0/1",
|
||||
"nothing open",
|
||||
"chore Work with nothing to see.",
|
||||
"sync 1/1",
|
||||
],
|
||||
"the picker does not list the vocabulary"
|
||||
);
|
||||
@@ -11860,6 +12026,7 @@ approach";
|
||||
#[test]
|
||||
fn an_undeclared_tag_sits_in_its_own_section() {
|
||||
let dir = board_dir();
|
||||
write_tag_ticket(&dir, "backlog", "44444444-0000-4000-8000-000000000000", "Four", "infra");
|
||||
let mut board = tag_board(&dir);
|
||||
|
||||
let rows = open_tag_picker(&mut board);
|
||||
@@ -11874,11 +12041,43 @@ approach";
|
||||
|
||||
assert!(declared < undeclared, "the sections are the wrong way round: {rows:?}");
|
||||
assert!(
|
||||
rows.iter().skip(undeclared).any(|row| row.starts_with("sync")),
|
||||
rows.iter().skip(undeclared).any(|row| row.starts_with("infra")),
|
||||
"the carried tag is not under the undeclared heading: {rows:?}"
|
||||
);
|
||||
}
|
||||
|
||||
/// A tag whose every ticket is finished has nothing to pick up, so it sinks below the
|
||||
/// live ones whichever section it would have sat in, and a discarded ticket counts as
|
||||
/// finished the way it does in a campaign.
|
||||
#[test]
|
||||
fn a_tag_with_nothing_open_sinks_below_both_sections() {
|
||||
let dir = board_dir();
|
||||
write_tag_ticket(&dir, "backlog", "11111111-0000-4000-8000-000000000000", "One", "cli");
|
||||
write_tag_ticket(&dir, "done", "22222222-0000-4000-8000-000000000000", "Two", "bug");
|
||||
write_tag_ticket(
|
||||
&dir,
|
||||
"discarded",
|
||||
"33333333-0000-4000-8000-000000000000",
|
||||
"Three",
|
||||
"bug,cli",
|
||||
);
|
||||
write_vocabulary(&dir, &[("bug", "Wrong."), ("cli", "Commands.")]);
|
||||
let mut board = one_board(&dir);
|
||||
|
||||
let rows = open_tag_picker(&mut board);
|
||||
|
||||
assert_eq!(
|
||||
rows,
|
||||
vec![
|
||||
"declared",
|
||||
"cli Commands. 1/2",
|
||||
"nothing open",
|
||||
"bug Wrong. 2/2"
|
||||
],
|
||||
"{rows:?}"
|
||||
);
|
||||
}
|
||||
|
||||
/// Every column, so a tag answers the same question the listing does.
|
||||
#[test]
|
||||
fn picking_a_tag_filters_every_column_to_the_cards_carrying_it() {
|
||||
@@ -11908,7 +12107,8 @@ approach";
|
||||
}
|
||||
|
||||
/// A word the board agreed on and has not used is worth picking, and an empty board is
|
||||
/// the honest answer to it: the count on the row said so before it was pressed.
|
||||
/// the honest answer to it: the row sitting under `nothing open` said so before it was
|
||||
/// pressed.
|
||||
#[test]
|
||||
fn a_declared_tag_nothing_carries_can_be_picked_and_empties_the_board() {
|
||||
let dir = board_dir();
|
||||
@@ -11934,7 +12134,7 @@ approach";
|
||||
|
||||
let rows = open_tag_picker(&mut board);
|
||||
|
||||
assert_eq!(rows, vec!["undeclared", "bug 1", "cli 1"], "{rows:?}");
|
||||
assert_eq!(rows, vec!["undeclared", "bug 0/1", "cli 0/1"], "{rows:?}");
|
||||
}
|
||||
|
||||
/// The query reads the annotation as well as the tag, which is the rule the campaign
|
||||
@@ -11963,7 +12163,7 @@ approach";
|
||||
rows,
|
||||
vec![
|
||||
"declared",
|
||||
"bug 2 Behaviour that contradicts what the tool says."
|
||||
"bug Behaviour that contradicts what the tool says. 0/2"
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -12439,7 +12639,7 @@ approach";
|
||||
let rows = open_tag_picker(&mut board);
|
||||
assert_eq!(
|
||||
rows,
|
||||
vec!["declared", "bug 2 Something wrong."],
|
||||
vec!["declared", "bug Something wrong. 0/2"],
|
||||
"the tags did not merge"
|
||||
);
|
||||
|
||||
@@ -12556,7 +12756,9 @@ approach";
|
||||
|
||||
/// The campaign takes the row first and the tags give way, the order a corner and a
|
||||
/// project label already follow: two cards in one campaign is what a reader looking
|
||||
/// for a campaign is looking for, and the tags are the context around it.
|
||||
/// for a campaign is looking for, and the tags are the context around it. They give
|
||||
/// way a tag at a time, with the count for the ones that went, and give way whole
|
||||
/// only when what the campaign left will not hold one tag and the count.
|
||||
#[test]
|
||||
fn the_campaign_keeps_the_row_and_the_tags_give_way() {
|
||||
let dir = board_dir();
|
||||
@@ -12564,11 +12766,16 @@ approach";
|
||||
write_member_card(&dir, "Short", "frontend, operations", V1);
|
||||
|
||||
// One character short of "~v1 #frontend #operations", and one over it.
|
||||
let narrow = only_card_at(&dir, 24);
|
||||
assert_eq!(narrow[2], "~v1", "the tags took the row from the campaign: {narrow:?}");
|
||||
let cut = only_card_at(&dir, 24);
|
||||
assert_eq!(cut[2], "~v1 #frontend (+1)", "{cut:?}");
|
||||
|
||||
let fits = only_card_at(&dir, 25);
|
||||
assert_eq!(fits[2], "~v1 #frontend #operations", "{fits:?}");
|
||||
|
||||
// One character short of "~v1 #frontend (+1)", where the tags have nothing left
|
||||
// to give up and the campaign keeps the row alone.
|
||||
let narrow = only_card_at(&dir, 17);
|
||||
assert_eq!(narrow[2], "~v1", "the tags took the row from the campaign: {narrow:?}");
|
||||
}
|
||||
|
||||
/// And a campaign the row will not hold goes whole, never cut: half a codename is a
|
||||
|
||||