00a64adca818e2e95e6f1331fe513cf51934fc4e
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
00a64adca8 |
(03bdc76) Draw a symmetric relation once, and refuse the mirror, and bump to 0.32.1
`relate` refused a relation the ticket already held but never looked at what the target held, so both ends of a `relates to` could store a line. `show` then drew the same neighbour twice under the same label, since `RelatesTo` maps to itself in `inverse_label`: one row from the stored line and one derived from the far ticket's mirror of it, indistinguishable. Live on this board, where 8556048 and 8c8a520 each stored the other. Both ends of the fix, because they do different jobs. `relation_rows` drops a derived row that reads exactly like a stored one, which repairs the boards that already hold both directions without an edit. `cmd_relate` refuses to store the mirror in the first place, reporting no change since the edge is already recorded at the far end, which stops it recurring. Neither alone closes it. The dedupe keys on the **label** and the target, not the kind and the target. Two tickets each blocking the other is two facts and the block has to say both, `blocked by` from this end and `blocks` from the other; keying on the kind would fold them into one row and lose half of what the ticket says. Only a symmetric kind can collide with its own stored line, and `RelationKind::is_symmetric` derives that from `label() == inverse_label()` rather than naming `RelatesTo`, so a kind added later answers by construction. The same gate is what keeps the refusal off a cycle: a target holding `blocked by <this>` is not a duplicate. The stored row is the survivor, not the derived one, because it is the line `relate --clear` can address. The consequence is worth knowing and is written down: with both ends holding a line, clearing one leaves the other's, which then draws as the derived row. Correct, since the far end still asserts the relation. 4179958 decided that `relates to` is symmetric and "written once, not onto both files". Nothing enforced it until now. The board's own data is left alone. 8556048 and 8c8a520 still both store the line and the block now draws it once, which is what the criterion asked for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
0f0767ac00 |
(8556048) Take a relation off with relate --clear, and bump to 0.32.0
`relate` only added. A `--blocked-by` pointed at the wrong ticket was on that ticket forever, refusing every move it made until the target was done or `-f` was passed again, and a target that was deleted did not clean up either: the board carried a dead edge that nothing could clear and every later read of the ticket paid for. `--clear <kind> <target>` takes one off. It is on `relate` rather than on `set` for the reason `RELATIONS` is out of `section_args`: a relation names a target that has to be resolved first, so one writer owns both directions, the way `chown` owns setting an owner and clearing one. It names the target and not just the kind, because a ticket can hold several relations of one kind and emptying all of them is not what anybody is asking for. That is also why it is not spelled the way `set --clear` is, which names a field and empties it whole. Both spellings of the kind are taken, `blocked-by` from the flag and `blocked by` from the label: both are in front of the reader, the flag being what recorded the relation and the label what `show` prints and the file stores, so refusing the printed form would trap anyone clearing a row they had just read. `RelationKind::flag` is a match rather than a `replace` on the label, so the flag, the `--clear` value and the completion list cannot drift. `find_relation` searches the ticket's own edges by id prefix before it searches the board, and that order is the feature rather than an optimisation: no search of the board reaches a target whose ticket is gone, so the stored-target tier is the only thing that can clear a dangling edge, which is the case most likely to need clearing. Two stored targets under one prefix name the candidates instead of guessing, as an ambiguous ticket search already does. An edge the ticket does not hold reports no change, and a target naming nothing at all is an error. The two are different facts: the first is the state the caller asked for, and the second is a typo that a no-op would swallow. The resolver's own reason is carried through, so an ambiguous search says it is ambiguous rather than being reported as nothing found. Recording and clearing the same relation in one call is refused, and the check runs on what was *asked* for and not on what would be written. A relation already in the file is not among the additions, so comparing against those would have let `--blocked-by X --clear blocked-by X` quietly remove it. Removals rewrite the section from what is left and additions are appended to that, in that order and in two passes: a call with no `--clear` then takes exactly the path it always took. The last edge leaves the placeholder, which is the line `append` treats as no content, so the next `relate` replaces it rather than writing underneath it. The two values are one flag, so clap cannot type them apart. `num_args = 2` is per occurrence, which makes an odd number a usage error and every chunk a full pair, and `cleared` parses the kind before the ticket is resolved. Nothing is logged, in either direction, since `relate` never has: a log recording only the destructive half would read as though the additions had never happened. `chowns_clear_is_completed_with_tickets_and_sets_is_not` found the first rule carrying `-l clear` and there are now three, on three commands, each taking something different. It is `each_clear_flag_is_completed_for_its_own_command`, scoped per command, and `relate --clear` offers the kinds rather than a board listing, since tickets where the kind goes would be candidates it refuses. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
73ffcad733 |
Reformat with cargo fmt, and nothing else
Layout only, no behaviour and no wording. 161 hunks across 22 files, 98 of them rustfmt joining a call or a message onto the one line it fits on. The config it formats to, and how its four numbers were arrived at, is the commit before this one. Separate so that it is reviewable by not being read: nothing here is a decision, and every decision is next door. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
ae3ee1bb9e |
Show the target's status beside the relation kind, and bump to 0.15.2
A row now carries two marks, kind then status: what sort of edge this is, then
how far the ticket at the other end has got. `blocked by × ◐ (6ce2c47) Title`.
Two questions are asked of this block, which rows hold this ticket up and
whether the ones that do are finished, and one glyph could not answer both.
○ not started, ◐ under way, ● finished, in grey, orange, cyan and green: the
shape says how far the target has got and the colour tells the two middle
stages apart, since committed and reviewing are both half circles. Green is the
colour the priority ramp deliberately leaves out because it means a title; on a
one-cell mark with no title behind it nothing else wants it, and it is the
obvious colour for done. Orange keeps the meaning it already has, Status.
These are the priority meter's own circles, and what keeps a status from
reading as a level is width: the meter is always two cells, a status mark is
one. the_status_mark_is_one_cell_where_the_meter_is_two pins both halves, and a
card carries the meter and never a status mark while the block carries the
status mark and never a meter.
The kind mark survives a target the board cannot find and the status mark
cannot, since a kind is read from the ticket's own file and a status from the
board. ? holds the column so the id does not move when one target has gone, and
_missing_ is what says it is gone.
Committed and reviewing are told apart by colour alone, so a pipe cannot tell
them apart: both read as under way. Accepted, since ● and ○ are the two answers
usually wanted and show on the target settles the rest, and assets/SKILL.md now
says so outright rather than leaving an agent to work it out from a colourless
half circle.
RelationTarget is back, carrying the title and the status in one Option because
they come from the same lookup. It went out in
|
||
|
|
5ae9c7fe00 |
Mark a relation by its kind rather than its target's status, and bump to 0.15.1
A column of ▁▄▆█ read as undifferentiated blocks. What is worth seeing at a glance is which kind of edge a row is: × for blocked by and blocks, → for relates to, ← for regression of and regressed by. The labels are five long words that blur when one ticket carries several, and the rows holding it up are now the crosses. Both directions of a kind carry one mark, since blocked by and blocks are the same edge read from two ends and the label is what says which end you are on. × is BLOCKED_MARK, the constant a held-up card already draws, in the same brightred. On a card it says this ticket is held up, in the block that this edge is what holds one, which is one word, so one glyph and one definition: the constant moved to util.rs, where both renderers can reach it. Brightred rather than the red asked for, because the id one cell to the right is red and the two would have blended. The arrows are the ones the footer already draws, so they render wherever it does, and no_relation_mark_is_a_priority_glyph pins all three against every level of the meter: the circles belong to priority. The mark now survives a target the board cannot find, because a kind is read from the ticket's own file rather than from the board. Only the name is gone, and `_missing_` in grey is what says so. That is one case fewer than the status mark had, which needed a `?` for a target with no status to show. What this gives up is the status: 6ce2c47's motivation was reading whether a blocker is finished without leaving the overlay, and nothing in the block shows that now. Its criteria 1 and 3 describe the commit before this one, and the ticket says so. RelationTarget went with it. Nothing read the status field once the mark stopped keying on it, and a field written but never shown is a field that goes stale unnoticed, so RelationRow carries the kind and the title and the status is one lookup away on the index if a later ticket wants it. A patch, not a second minor: 0.15.0 was the arrival of a mark and settling which glyph it is belongs to that, where a second minor would read as two features. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
ece201e3ab |
(6ce2c47) Mark each relation with the status of the ticket it names
The Relations block named each target and said nothing about where it was, so the question actually asked of it, whether a blocker is finished, meant closing the overlay and going to find the other ticket. Each row now carries a mark for its target's status, ahead of the id, where it describes the target rather than the row. A rising bar, U+2581 through U+2588 for backlog to done, and ? for a target the board no longer holds. Not a circle: the cards spend those on the priority meter two cells from nothing at all, and another circle would be read as a level. The ramp is also the meaning, so the shape says which status it is. The colour could not. Every colour in the guideline already means one thing and the eight tag slots are reserved, so four status colours could only have come out of something else's meaning. So the shape carries the status and the colour says only that it is one: orange, which is what Status already means, and grey on the missing mark, beside the _missing_ that grey already spells. An unrecognised status reads as missing rather than as a fifth stage, and every_status_has_a_mark pins the pairing against status_dirs so a status added later fails a test instead of quietly reading as ?. The plain text was the real cost. Detail.text was one String drawn by a Paragraph, deliberately uncoloured because an escape sequence there is drawn as literal bytes, which is 6d327df. So the block cannot arrive pre-painted. Resolved.relations is now rows, content_parts returns the body as BodyPart::Text and BodyPart::Relations with the text painted and the rows untouched, and the two renderers take it from there: content_trim paints the rows into escapes, and the board styles the same cells as spans. One builder, two painters. relation_rows decides which edges there are, what they are called and which direction leads; relation_cells decides the layout, the mark and the colours; paint_cells and span_of are the only things that differ. Cell is the unit both take, the same shape the palette uses to stop a colour existing for one renderer and not the other. reference_cells is now the one spelling of a cross reference, shared with the Campaign field. Detail.body is a ratatui Text and is the only thing measured, so last_offset and the Paragraph cannot wrap the body two ways. Detail::plain() flattens it for the suite and is cfg(test): a second representation carried beside the spans is a second thing to disagree. show carries the same mark, decided here rather than discovered later. The rows are one builder so it was free, and two views disagreeing about what a relation shows is a difference nobody can explain afterwards. That is a change to what the CLI prints, so the minor goes on the last commit of this pair. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
3085b0226f |
(4179958) Add a Relations section for blocked by, regression of and relates to, and bump to 0.11.0
`relate` is the only writer of the section, the way `chown` is the only writer of Owner: a relation names a target that has to be resolved to a uuid first, so `set` and `append` are deliberately kept out of it. One flag per kind, so an unknown kind is a usage error rather than a line refused on the way back out. One direction is stored and the inverse is derived by a scan. `blocked by` goes on the gated ticket, whose move `mv` now refuses while the target is not done, naming every open blocker; `-f` bypasses it beside the backward and skipping moves. A target that is not on the board warns and allows the move. The rendered block is built outside `content_trim` and passed in, since half of it comes from other tickets. The section is created on demand rather than by `add`, so a ticket written before it existed gains it without being regenerated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |