b63b60eefc5a39f653577ecd76d817fdb5f4c028
67
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7470255a22 |
(a1a5d69) Add tags to a ticket with append --tags, keeping the ones it carries, and bump to 0.32.18
`set --tags` writes the whole field, so adding one tag to a ticket that
already carries some meant reading it first and retyping every one of
them.
|
||
|
|
96cddc14ad |
(53ffb94) Run the command the prompt parsed, and redraw the board on what it wrote, and bump to 0.32.16
The prompt parsed a line and named what it resolved to. This is the half that does it: the parsed command goes to the same cmd_* handler main.rs hands it to, against the selected tab's own .worklane, with a Sink over a buffer collecting what the handler says instead of stdout. One dispatch table, not two. main.rs's match on Command is lifted into `dispatch`, over the command, the start path and the sink, and both callers go through it. A second copy in tui.rs would drift the first time a command was added and would drift silently, since both halves go on compiling; the match is exhaustive so a new verb cannot fall into an `_` arm either. Only `tui` is matched outside it, in main, because the board is that table's caller rather than an entry in it, and reached from the prompt it is refused in those words. Two things the board has to do that the CLI never had to. It reloads unconditionally after a command returns rather than waiting for the digest, so a reader does not watch their own mv take up to a poll interval to appear, and either way, since a handler that failed part way through has still written. And the selection is restored by uuid across that reload: mv puts the card in another column, set --title renames its file, and a filter can drop it out of view, so the slot is not the ticket. Where the board cannot follow it, the notice says so and which key shows it. What the handler says is what the board reports, word for word. Notice therefore holds as many lines as the command used, and notice_on_row is the one rule for where they go: one line on the footer row where a copy's notice has always gone, anything else as a box at the foot of the columns. A box rather than more rows of footer, because a footer that grew and shrank as notices came and went would reflow the columns on every keypress. A handler that errors leaves the prompt open with the line intact, the usual cause being an ambiguous id. `without_escapes` in util.rs is the guard at the seam. A handler's own output is plain because the sink is, but an error message is built with color_text, which asks the process about its stdout and under the board answers yes about a terminal the message is not going to; a ratatui paragraph prints an escape rather than obeying it. That is 6d327df's fault on a new path. The merge tab is refused for now, resolved by index rather than by the tab's name, which is a label two projects can share. Routing by the card a command names is ebc5755. Not done here, and both tracked: check with no criterion still reaches ask_which_criterion and reads a raw-mode stdin, which is 6d37042's criterion 4 and commented there; and check_blockers warns about a dangling blocker with eprintln!, which reaches the alternate screen because it never passes through dispatch's result, filed as c680e24. |
||
|
|
69bc2feef5 | (fa5662a) Write handler output through a caller-supplied sink, and bump to 0.32.13 | ||
|
|
e26e5893f7 | (ca2a124) Add --actor-from-git beside every --actor, and bump to 0.32.8 | ||
|
|
bfce4cf2f4 | (5a46b59) Say campaign where a campaign write fails, and bump to 0.32.7 | ||
|
|
8c599440e5 | (8020e48) Quote a comment behind a gutter bar that survives wrapping, and bump to 0.32.4 | ||
|
|
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> |
||
|
|
7994d98913 |
(76d10d7) Strike through a relation to a discarded ticket, and bump to 0.31.5
The relations block marked a target `○ ◐ ●` or `?`, and none of those can say the target was discarded: the status mark is one cell in a column of five states, and `●` in grey against `●` in green is a colour a pipe does not get. A row pointing at abandoned work therefore read as a live dependency, which is exactly what it is not. The row is struck through instead, the whole of it, gutter and padding included, so the line runs unbroken from the label to the end of the title. The relation stays recorded, for completeness and for the case the target is moved back out of discarded, and reads at a glance as no longer standing for anything. The mark column is untouched: 451fb83 already gave a discarded target the full circle of done in the grey of the untouched pile, and the strike is additive on top of that. `Cell` learns a modifier, the first style on it that is not a colour. Same trick as the palette, one step further: `Modifier::ansi()` is SGR 9 and `From<Modifier> for ratatui::style::Modifier` is `CROSSED_OUT`, so a style that exists for one renderer and not the other is a compile error. Bold stays out of it, because bold rides inside `Color::Magenta.ansi()` and `span_from` adds it back from the colour alone; a second modifier goes beside this one. `paint_cell` opens the modifier ahead of the colour and closes both with one reset, which is why the reset is now a constant the two writers share rather than a literal in `paint`. `span_from` takes the modifier too and has no early return for the uncoloured case any more: a struck plain run is a styled span with no foreground. `Cell::struck` is a builder, because the strike is decided a whole row at a time by the layout that already chose the colours. `Body::push_cell` merges on the whole style rather than the colour alone. Nothing outside the relations block carries a modifier today, and a merge keyed on the colour would silently strike a plain run through the moment one did. The strike is under the same flag every other escape is, so a piped `show` carries none of it. That is the bargain committed and reviewing already take for being told apart by colour alone, and `assets/SKILL.md` says so outright rather than leaving an agent to infer that a plain-looking row may point at abandoned work. Tests are paired both ways, and both halves are load bearing: a renderer that struck nothing fails the presence, and one that struck every row fails the absence. `the_status_marks_are_pinned` had never listed discarded, so it does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
45b513bdce |
(2733b10) Colour the history block, and indent a comment's body deeper, and bump to 0.31.3
The block shipped with three painted things: the heading, the kind label and the actor with its timestamp as one cyan span. Every value in it was plain, so a status entry drew two status names in no colour while the same names are orange in the metadata table three lines above, and a tags entry drew its tags without the slots every other view gives them. The kind label is now grey, as chrome that names a row. It was orange, which means Status everywhere else, so an `owner` or `tags` label claimed a meaning belonging to the value beside it. `From` on a comment's author line goes grey for the same reason. Each value takes the meaning its field carries in the metadata table: status orange, tags through the same `tag_cells` the Tags field uses, a campaign codename through `tag_color` bare the way `Codename` is, an owner plain, and `_Not set_`, `_None_` and `_missing_` grey. The separator is a constant beside `change`, with `split_change` next to it, so the writer and the reader cannot disagree about what divides the two halves. The actor is drawn through `tag_color`, so one writer is one colour in every entry it wrote, and cyan goes back to meaning the timestamp alone. A comment's body moves to four spaces and the author line stays at column 0, so an indented line is somebody's own words and a line of values at column 0 is the tool reporting itself. The padding is still measured on the unpainted label, now pinned with the alignment test running both ways. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
60b43a682e | (a136d13) Draw the discarded column behind a three-state visibility rotation, and bump to 0.31.1 | ||
|
|
5bf0fd1bfe |
(451fb83) Add a discarded status for work that will not be done, and bump to 0.31.0
The flow ended at done, so a ticket that turned out to be a duplicate or obsolete had nowhere to go: it sat in the backlog or was deleted by hand, which destroyed the record and left every relation to it dangling. Discarded is a fifth status with its own directory, keeping the invariant that the filename, the Status field and the directory agree, and keeping done meaning the work landed. Entering it is allowed from any status without -f, because discarding is not a stage of work. Discarded sits last in Status::ALL, which is what makes the rest fall out rather than needing cases: nothing follows it, so a discard clears no stamp and a ticket abandoned from reviewing keeps the journey it made, and every move out is a backward move, so un-discarding needs -f. The two dependency guards now look opposite ways. check_blockers asks what a ticket waits on and gates work moves; check_dependents asks who waits on it and gates the discard, because those plans depended on work about to be declared never-happening. Both skip targets that are themselves terminal. Status::FLOW is the four stages the board draws, so a discarded column on screen stays a136d13's ticket and done stays the last drawn column. Every tree walker keeps using Status::ALL, or a discarded ticket would be unaddressable. util::is_open replaces three spellings of "not done and not discarded", across mv, ls and the campaign standing. The board's blocked mark goes through it as well: that path was only accidentally correct, since a discarded blocker is absent from the FLOW columns, and drawing the column later would have diverged it from what mv allows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
9d17f55860 |
(f3e099e) Colour the history block in the detail overlay, and bump to 0.29.1
The board appended the block as a pre-rendered string with colour off, the last flat piece of a body e4d0bb7 had fully styled. history_cells lays the block out once: format_history is those cells painted for the CLI, and detail_of pushes the same ones as a Cells part, so the overlay styles them and no escape can enter. The CLI's output is pinned byte for byte, and the overlay test pairs the presence of the colours with the absence of escapes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
f454d212a4 |
(d4ce964) Record status, owner and tag changes in a history log, and bump to 0.29.0
The comments directory was already an append-only log with one event kind. It is now .worklane/history/<uuid>/, with the kind in the entry and in the filename after the stamp, so a ticket says how it got where it is and not only what was said about it. mv, chown and set --tags each write an entry after their own save and behind their own no-change return, so a refused or no-op edit records nothing. --actor is on all four writers now. An old comments directory is adopted on first access and a file with no marker reads as the comment it is, so nothing is migrated or rewritten. The log moves to src/history.rs, out of util.rs and handlers.rs, and the card's counter counts comments only: a ticket that has moved three times has not been talked about. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
a1bdb5df49 |
(87862df) Attribute an entry to WORKLANE_ACTOR, not to the git user, and bump to 0.28.0
Every comment the CLI wrote was attributed to the git user, so a board several agents write to read as a list of things one human had done. resolve_actor is now the single source: flag, then WORKLANE_ACTOR, then get_git_user(), then unknown. comment --owner is renamed to --actor with no alias, since it names the writer of the entry and not the ticket's assignee, which is chown's. add --owner and campaign add --owner still default to the git user. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
c2ee165108 |
(e4d0bb7) Colour the whole detail overlay body, not just its relations, and bump to 0.27.3
The block was the only coloured part because it arrived as rows while everything else arrived as a painted string, and the board had to ask for the unpainted one: an escape in a ratatui paragraph is drawn as literal bytes. content_parts now paints nothing. BodyPart::Text becomes BodyPart::Cells, so content_trim is the cells through paint_cells and the board is the same cells through span_from. push_heading, ordered_cells, inline_cells, metadata_cells, metadata_value_cells and tag_cells replace the painters they were. Resolved.campaign is cells too, which made reference_cell dead at its last caller. The colored flag still reaches content_parts and no longer means paint. It says whether this renderer can carry a colour at all, and one thing turns on it: **bold** gives its markers up to the colour that replaces them, so a renderer with none has to keep them. Color::Magenta.ansi() is \x1b[1;35m, so span_from adds the bold modifier on the board's side, since From<Color> carries only the colour and the same cell must not be painted two ways. show's output is pinned byte for byte against what it printed before, both by a fixture holding one of every painted run and by diffing the old binary against the new one over every ticket and campaign on this board, coloured and piped. |
||
|
|
108e21ad7f |
(25d3018) Fix the markdown link colorization branch, and bump to 0.27.2
The branch searched for a closing square bracket after the ]( sequence instead of a closing parenthesis, so it fired only on text that was not a link, and when it fired it pushed the matched span and dropped the rest of the line. Folded into colorize_bold, now colorize_inline: one walk over the source line recognising both **bold** and [text](url). A second pass over the first one's output would be scanning text that already holds escape sequences, and \x1b[36m carries an opening bracket, so the link scan would take the escape for markup. Unterminated markup of either kind falls through to the ordinary character push, so the rest of the line survives as literal text. Criteria text and hand-written metadata rows get links too, since they already went through this function. The whole span is painted, markers and url kept: show prints to a terminal worklane cannot assume will make a link clickable. |
||
|
|
3592584747 |
Edit a campaign's description, and bump to 0.27.0
`campaign set` reached the title and the codename, so the description a campaign was filed with was the description it kept: fixing a typo in the one field nothing could edit meant a hand edit of the file, or refiling the campaign and reassigning every member. Both halves arrive together, which is why d637288 left this out rather than adding the flag. `campaign set --description` replaces the section and `campaign append --description` adds a paragraph to it, because a `set` with no `append` is the half that is easy to reach for and wrong: replacing a description to add a sentence is how the rest of it gets lost. `append` is a campaign's own subcommand rather than the top-level one, which resolves a ticket. `resolve_in`'s tiers are the same over both directories, so one positional naming either object could resolve in each with nothing but a flag to say which was meant, and it would make a liar of the explanation `resolve_ticket` gives a ticket search that names a campaign. The section is the `DESCRIPTION` entry and the surgery is `set_section_body`, `append_section_body` and `Section::normalise`, not a copy scoped to campaigns. `SECTION_ORDER` needs no campaign variant: a campaign holds one section where a ticket holds four, and the followers a campaign does not have are simply not in the file, so its description anchors against `## Metadata`, where `campaign_body` writes it. Still no `--clear`, and that is now a decision rather than a deferral: a campaign's description has no cleared form, so an empty `--description ""` is a paragraph break here as it is everywhere else, and the refusal for an all-blank value says there is nowhere to go back to instead of naming a flag that does not exist. `replaced_items` and `appended_items` hold that check once for both objects, with the way out as the caller's argument. The section refusal no longer says "Ticket", since a campaign reaches it too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
07c783410c |
(b74dc5a) Remove a test's fixture directory with a guard, not a trailing line
Every unit test here built its board under the system temp directory, and the ones that remembered a `remove_dir_all` at the end only cleaned up when their assertions passed. Most had no such line at all. /tmp reached 18363 of these and filled the disk, which failed a link step and then a `git add` with "No space left on device": an error naming neither the tests nor what they had left behind. `util::Fixture` is a uuid-named directory whose `Drop` removes it, which is the only shape that also runs when an assertion fails, since unwinding runs destructors. It derefs to `Path` and implements `AsRef<Path>`, because the two reach different call sites: a parameter typed `&Path` is a coercion site and one bound by `impl AsRef<Path>` is not. So nothing changed at the ~160 call sites but the type, and the 85 trailing cleanup lines are gone. Five leaking prefixes, not the two the ticket names. `worklane-project-*` from `project_tree` and `worklane-bare-*` never cleaned up at all, and the four `worklane-count/blocked/stray/stamps-*` sites in `util.rs` cleaned up only on the passing path. `Fixture::child` is what covers `project_tree`, which needs the fixture to point at the project and remove the directory above it. `assert_fs::TempDir` is a dev-dependency already and was still not the answer: it names its directories `.tmpXXXXXX`, which says nothing about whose they are for the one case that matters, the one left on disk on purpose. Wrapping it to add a prefix and a printed path is more code than the guard. `WORKLANE_KEEP_FIXTURES=1` keeps them and prints each path, opt-in rather than kept-automatically-on-failure: the assertions here carry the state they are about, so a path printed on every failure would be noise on almost all of them. Read once when a fixture is made rather than at drop time, so the answer cannot change mid-test, and `Fixture::swept()` turns it off for the three tests that are about the guard itself and must not be failed by a reader's environment. Verified against a clean temp dir rather than against /tmp, which still holds the historical leak: `TMPDIR=/tmp/scratch cargo test` leaves zero directories behind, with the variable set and unset, 383 green either way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
af1ef1f97f |
(ebad2fa) Scroll the campaign description in the frame above the board
The frame showed the opening line of a description and the rest was only readable through `campaign show`, which means leaving the board. It now holds three rows of prose and pages through the remainder on `pgup` and `pgdn`, reached by going up past the top card of a column. Four decisions rather than four edits: `section_prose` replaces `section_opening`. The campaign file is only in hand while the campaigns directory is being read, so that read carries the whole description and `CampaignRow::summary` takes the picker's one line back off it. Two fields, one cut from the other, would be two strings free to come from different reads of the same file. `CAMPAIGN_PROSE_ROWS` is a constant. Fitting the frame to the description would resize every column whenever the filter changed, so the height is fixed at three rows and scrolling covers the rest. Two more rows of cards spent than the one row cost. `Focus` is the third place the selection can be, held on `Tab` beside the filter and the new `frame_offset`. Every key that acts on a card answers for it: `enter` is inert because `Tab::selected` hands back nothing there, `left` and `right` are inert because the frame spans the board, and `y` copies the campaign's short id, so `y copy id` means the id of the selected thing in every state. No card is drawn reversed while the frame holds the selection, since that highlight is what says which ticket a key is about. The frame is out of reach from under an open ticket, where up and down step through tickets and the overlay follows. `Board::scroll_page` holds the precedence, not the `main.rs` arm: an open ticket keeps both keys whatever holds the selection behind it, the rule `dismiss` follows for the same reason. The page indicator, the step and the clamp are the overlay's `page_indicator`, `scroll_step` and `last_offset`, so the two places a reader presses these keys behave the same. The indicator sits beside `q board` rather than up beside the title, which would shorten a long campaign name whenever its description grew. Criterion 11 is not done: 2a83bd4 has not landed, so there is no tag frame to give the same treatment. The model it inherits is in place and named on the ticket. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
154ffbdeb3 |
(001b639) Show the comment count on a board card, and bump to 0.24.1
A card had four corners and none of them said whether anybody had written anything on the ticket. Finding out meant opening the detail view or running `show`, which is the question the board exists to answer before you commit to a card rather than after. The count goes in the bottom right, left of the criteria count. Both are about the ticket rather than about the reader, and the criteria count is what that corner has always been: this is what has been added beside it, so it is what sits further from the edge and what goes first when the column is narrow. How far along a ticket is outranks whether somebody has said something about it. `corner_line` takes the whole right-hand group now instead of one span, and the group gives up its items from the front until what is left fits. With one item that is exactly the old behaviour, which is what the top row still wants, so `due_span` returns a `Span` rather than the `Option<Span>` it only ever had to satisfy the signature. The single space between items lives in `corner_line` beside the gap arithmetic, not in the caller: the same reason `column_areas` is shared between the draw and `follow_selection`, that geometry reproduced by hand drifts from the draw. `comments` is a field on `TicketItem`, filled where `criteria` and `tags` already are, and it is the one entry on that pass that costs a directory listing rather than coming off content in hand. So it is counted, never read: `.md` only, the filter `read_comments` applies, and no body is opened, because a count needs none of them. The alternative was a `read_dir` per ticket per frame. `collect_ticket_items` derives the board from `status_path.parent()` rather than taking it as a second argument. Every caller joins a status onto a board it already holds, and two arguments would let a status directory from one board arrive with the comments of another. `comments_dir` now spells that path once for the writer, the reader and the counter, the way `campaigns_dir` does for its directory. Zero draws nothing, not a `0` and not a blank cell held open. An uncommented card is the row it has always been, down to the spacing, which is pinned exactly rather than by a `contains`. The mark is U+275E, a Dingbat, and the choice is about arithmetic as much as reading. U+1F4AC SPEECH BALLOON is 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. U+1F5E8 LEFT SPEECH BUBBLE is text presentation and Neutral but sits in a pictograph block most terminal fonts leave as tofu. This one has the coverage the priority meter's Geometric Shapes have. Cyan, and the only coloured thing on a row whose owner and criteria count are grey: two counts side by side otherwise read as one number in brackets and another that lost its brackets. The no-per-draw test takes the comments directory away after the board is built, and is paired with one that adds a comment and reloads, because a count that never asked the filesystem again would pass the first by never changing at all. The digest already moved on a new comment, so the reload is what recounts. Patch rather than minor: the corner was already two numbers and a mark, and this settles what it says rather than adding a view. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
2ddd0addf6 |
(59b23b7) Stop the board walk on a link that does not resolve, and bump to 0.23.1
`find_worklane_dir` asked `exists()`, which follows a symlink. A `.worklane` that was a dangling link therefore answered exactly as no `.worklane` at all: the walk carried on up the tree, the first board above the project became the board, and every write landed in it. Silently, and in the board belonging to someone else's project. Latent while a board is a real directory inside the project it belongs to. Once boards live in one shared directory and `.worklane` is a link into it, a dangling link stops being a corrupted tree and becomes an ordinary state: it is what you have before the boards repo is cloned, and after a board directory is renamed. So this is reachable on an ordinary day rather than only with a hand-made link. `classify` reads `symlink_metadata` first, so the answer is about the entry rather than about its target, and it is one of four: `Absent`, `Board`, `Dangling` or `NotADirectory`. `Absent` is the only one the walk carries on from. A `.worklane` that is there but unusable is this project's board and is reported here, not handed to whatever sits above it. Anything other than `NotFound` out of `symlink_metadata` is an error too, since reading a filesystem that could not answer as nothing-there is how the walk-past worked in the first place. The failure names the target and says the boards repo may not be cloned. The old message, no board found and run `worklane init`, was wrong twice over even with no board above: it describes an empty tree, and it points at creating a board when the cause is an unsynced machine, which is the one action that produces two boards with one name. A regular file at that path is an error as well. It is a plausible future pointer form and reading it as one is that change's decision to make; stepping over it and writing above is the answer that is wrong today. A link that resolves is still indistinguishable from a real directory, and what comes back is the link rather than its target, so `.worklane/backlog/*.md` reads the same either way and nothing downstream learns whether the board is local. Every writing command resolves the board before it writes, so the refusal costs nothing halfway. `add` is where that is pinned end to end, against an empty board above the project that stays empty. `init` is untouched: it does not go through this walk, it writes nothing on a dangling link today, and its symlink cases belong to the layout change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
cbc20848f6 |
(1845355) Order each status column by its entry stamp, and bump to 0.23.0
Every view read its rows out of `collect_ticket_items`, which sorts by `by_priority_then_title` because it sees one directory and no status. That is the right order for the backlog, where priority is the clock. Past the backlog the question changes: committed asks what has waited longest, reviewing what was handed over first, done what just landed. All four columns answering the first question is why a finished p5 sat above the p1 nobody had read yet. So each column takes its own order, through one `by_status_order` keyed on the `Status` rather than four comparators at four call sites. Backlog delegates to the comparator it already used. Committed sorts by `Committed On` ascending and reviewing by `Submitted On` ascending, so the longest wait is at the head where the reader picks next from; done sorts by `Completed On` descending, newest first, the way a changelog reads. Ascending twice and once descending is one rule said three ways: the head of every column is what the reader acts on next. A ticket carrying no stamp sinks below every stamped one in its column and falls back to priority then title among its own kind, as do equal stamps -- `mv` writes whole seconds, so a tie is real. A missing time is unknown, not ancient, and unknown must not claim the head of a queue ahead of a wait somebody can point at. Reading absence as the epoch would have come free from the comparison and put every ticket filed before f460853 first. The comparison is a string comparison. `%Y-%m-%d %H:%M:%S` is lexicographic in chronological order, the property `Due` already relies on, so nothing parses a date at sort time. The stamps are read on the pass `collect_ticket_items` already makes over each file, the rule `criteria` and `tags` already hold, and never per comparison. Both `cmd_ls` branches, `list_ids`, `columns_of` and `campaign::members` take it, which is why those loops walk `Status::ALL` rather than `status_dirs()`: the directory name does not say which stamp governs it. The merge tab keeps priority then title outright and is pinned there -- it spans statuses, so no single stamp governs it. `cmd_tags` is left alone; it counts into a `BTreeMap` and never reads an order. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
eae411ab50 |
(f460853) Let the flow timestamps accumulate, and bump to 0.22.0
a6023e2 made the three stamps mutually exclusive: entering a status wrote its field and leaving removed it, so a finished ticket carried exactly one of the three and the journey behind it was invisible. A reader asking when this was filed, when it was picked up, when it went out for review and when it finished got one answer and three absences, and nothing could tell that committed had ever happened. So the removal rule is replaced by an accumulation rule. `mv` stamps the target's field on entry, re-entering restamps, and arriving anywhere removes the fields of every status *after* the target. That is one arrival rule off the flow order `Status::ALL` already holds, not a case per move, and it is also what a forward skip under `-f` wants: backlog straight to done stamps `Completed On` alone and leaves the stages it jumped unwritten rather than fabricated. A backward move truncates the journey at the target, so done back to reviewing drops `Completed On` and keeps the two before it, and anything back to backlog drops all three. Presence therefore changes meaning. A field no longer says the ticket sits in that status now, it says the ticket got that far and has not been sent back past it. `Status` is what says where it is. This is still not d4ce964's history log. These answer how far and when, once per stage; every status change, every owner and every tag along the way is the log's job. The placement a6023e2 chose already holds: the three sit directly after `Created At` in `METADATA_ORDER`, so a ticket that has walked the whole flow reads as one block of four timestamps in flow order ahead of Campaign and Status. Nothing but `mv` writes them, pinned by a test over `add`, `set`, `append` and `chown`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
72dbdec2ec |
(d637288) Add campaign set, and bump to 0.21.0
`campaign add --codename` was the only writer of the field, so a campaign already on the board could not be given one without editing the file by hand -- which is every campaign filed before 0.20.0. A `campaign set`, not a flag on something narrower: the file has more than one editable thing, and the moment somebody wants to fix a typo in a title there would be a second command to design. It carries `--title`, which renames the file the way `set --title` does, and `--codename`, through the same parser `campaign add` takes. Built out of `set`'s own parts -- `set_title`, `apply`, `report`, and the whole-file no-op comparison -- so nothing about writing a field lives twice. The codename goes through `set_or_insert_metadata_field` rather than `set_metadata_field`: a campaign filed before the field existed has no such line, and those are exactly the campaigns this is for. That exposed a second thing -- `Codename` was not in `METADATA_ORDER`, so an inserted line landed at the end of the block while `campaign_body` writes it under the ID, two shapes of one file. It is in the list now, directly after ID. `save_ticket` split into `save_entry` with `save_ticket` and `save_campaign` as named wrappers, so a campaign gets the same write-then- rename a ticket has rather than a second copy of it. `write_then_replace` and `find_entry_file` take the noun, so a failure says "campaign" where it is one. No `--description`, filed as 32e98ab: `set` and `append` are a pair for a prose section, and replacing a description with no way to add a paragraph is the half that loses the rest of it. No `--owner` and no `--clear`, each for a reason recorded on the ticket. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
528566d103 |
(61879a4) Surface campaigns on the board, and bump to 0.20.0
A card label and a frame, not a campaign tab. A tab had to say what its columns are, and a campaign groups across the flow rather than within one status, so the answer is the four columns filtered: a filter on the board it already has, not a fifth tab. So a card names its campaign on the label row, before the tags, marked ~ and bold, and the row drops the tags whole before it drops the campaign. `c` opens a picker; taking a campaign filters every column to its members and draws a frame above them carrying the id, the codename, the name, the opening line of the description and the standing. The standing comes from the columns, since while a campaign is selected the columns are its members. `q` takes off one layer at a time: the overlay, the filter, the board. The label needs something to say, which the stored uuid is not, so campaigns gained `Codename`: one word, `v1` or `beaver`, written by `campaign add --codename` and validated at parse time. `campaign ls` prints it and `resolve_in` gained an exact-codename tier above the uuid prefix, or it would be a field you can read and cannot type. Only campaigns carry the field, so the tier is empty for a ticket and ticket resolution is unchanged. The campaigns index is read once per project in `columns_of`, on the pass that already builds the cards, and `digest` now watches the campaigns directory: without it a campaign filed elsewhere never reached the picker. `frame_rows` grew a row, so the two bools deciding the geometry became one `Chrome` and the row indices are named. Left out and filed as d637288: nothing can give a codename to a campaign that is already on the board. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
6a800fb385 |
(bdddc09) Read only the underscore markers as unset, and bump to 0.18.1
`is_unknown_value` accepted `-None-` and `-Not set-` alongside the real
`_None_` and `_Not set_`. The ticket had them down as corrupted output handled
downstream instead of at the source, but the source never existed: `git log -S`
finds both spellings in exactly one commit,
|
||
|
|
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> |
||
|
|
cc5f9b8a46 |
(74904dc) Let a ticket field be cleared back to unset, and bump to 0.18.0
`set --clear <field>` is the one way to take a value away, repeatable, with the field as a `ValueEnum` value: an unknown one is a usage error listing the six that are not, and the shells complete them for free. Not a per-field `--clear-due`, which is a flag per field to keep in step with the one it undoes, and not an empty value, which is already a paragraph break for a section and would make an accidentally empty variable a silent delete. What goes back is what `add` writes for a field it was never given, through the new `NOT_SET` and `NONE` constants and each section's placeholder, so a cleared ticket and one filed without the field read the same. Sections are in scope and go back through `clear_section_body` rather than `set_section_body`: the latter runs its items through `Section::render`, which would have written `- [ ] _No acceptance criteria provided._`. Owner is `chown --clear <ticket>`, so the field keeps its one writer. The flag carries the ticket because the ticket is chown's second positional and a bare flag would land it in the user's slot for the handler to read back out, which is hand-parsing what clap can state. It writes `_Not set_` rather than the git user: `add` falls back to the git user because it is filing something new, and an owner taken away says nobody owns this. The empty-value error split in two rather than being reworded. `non_empty` says only that the value cannot be empty, for the arguments with no empty form; `clearable` names `--clear`, for the arguments whose field has one. One message for both would have lied about `ls --tag`. Replacing and clearing one field in a single call is refused rather than resolved by whichever was applied last, and cleared fields are reported as `Cleared due on '...'` beside `Updated priority on '...'`, since one list would say `Updated` of a field that was emptied. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
139c9b012f |
(a6023e2) Stamp the time a ticket entered its status, and bump to 0.17.1
mv writes Committed On, Submitted On or Completed On for the status it enters, so the board answers how long a ticket has been where it is without guessing from file mtimes. The three are mutually exclusive: entering stamps, leaving removes and re-entering restamps, so a backward move under -f leaves no stale Completed On behind. These fields are current state, like Status itself; the trail of how the ticket got there belongs to the history log. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
373ba519b3 |
Add a worklane completions command, and bump to 0.17.0
Every argument worklane takes names a ticket, a status, a shell or a skill, and the shell offered a directory listing for all of them. `completions <shell>` prints a script for fish, bash, zsh, elvish and powershell, following what frig does, which is where the shape of this comes from. Two halves, because neither alone is enough. `clap_complete` generates the structure from the clap definition, so a flag added to `command.rs` is completed without anyone touching `completions.rs`, and fish gets a hand-written block appended for what only the board knows. That block runs `worklane ls --ids` in a command substitution, one run per keypress, 2.5ms in release on a board of seventy-five tickets. A status is a `util::Status` value enum now rather than a string, which was the plan's third step and pays for itself three ways. clap refuses an unknown one at parse time naming the four, so `cmd_mv`'s `valid_statuses` and the status half of `cmd_ls`'s error are gone and exit 2 is what an unreal status gets, the bargain `--due` and `--priority` already take. `status_dirs()` and `DONE` are derived from `Status::ALL`, so the flow is written once. And clap emits the four for `mv --status` itself. Only half free: the fish generator emits nothing for the possible values of a *positional*, so `ls <status>` and `completions <shell>` are listed in the appended half after all, read off the enums with `possible_values` rather than by hand. `ls --ids` is the machine-readable listing, and prints the short id, a tab and the title rather than the id alone. Both readers want both fields: fish takes what follows a tab as the description, which is what makes `worklane show <TAB>` a list of titles instead of hex, and a script takes the id back with `cut -f1`. It includes done, where the decorated listing leaves done out, because a completion has to be able to name a finished ticket and `show` is most often pointed at one. It skips a missing status directory rather than refusing, since an error printed over a shell prompt is worse than no candidates, and the listing still refuses one so a person can act on it. The filters all still apply, and an unknown `--campaign` is still refused ahead of everything. Adding the mode tipped `cmd_ls` over the boundary AGENTS.md names, so it takes an `LsArgs`, the way `add` took `AddArgs`. More than the criteria asked, since the cost of each was a name in a list: tickets are completed for `set`, `append`, `relate`, `check`, `uncheck`, the second argument of `chown` and `assign`, and `relate`'s three target flags, plus the skill names read off `install::SKILLS`. The three lists are kept honest by tests that walk the clap definition and fail on a ticket-taking subcommand missing from them, or listed at the wrong position. Nested subcommands are not walked: `campaign` is the only one, none of its three takes a ticket, and the token counting could not tell them apart if one did. Position is counted rather than inferred. `__worklane_first_arg_of` reads `$tokens[2]` and the token count instead of `__fish_seen_subcommand_from`, because `campaign ls` and `campaign show` are also an `ls` and a `show` that fish has seen, and matching against the ticket list to find the position would run worklane again inside the condition. Files are turned off for the command and back on for `tui`, which is the one argument that really is a path. The ticket said worklane takes no file arguments; it takes those. Campaigns and tags are completed nowhere, which needs a listing they do not have: 55ee6e3. And since fish runs whatever is on PATH, the completions are only as current as the installed binary, an older one without `--ids` completing nothing. That is in the README beside the install line. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
6784d80324 |
Let check and uncheck take several criteria, and bump to 0.16.0
Finishing a ticket means ticking every box, and that was one invocation per box: each one resolved the ticket, spliced one line and rewrote the file. The criterion positional is now variadic, so numbers and substrings mix in a single call, and `all` stands for every criterion on the ticket. `all` is a keyword checked before the text, the way the index already is, so a criterion whose own words include "all" is reached by its number or by a longer substring. `is_all_criteria` sits beside `is_index` for that reason. `resolve_criteria` resolves every term before a byte is written and refuses the whole batch on the first term it cannot place, naming it. A call that ticked what it understood and then failed would leave the ticket half-marked with nothing in the file to say which half was meant. The offsets are sorted and deduped, so the report reads in `show`'s order and a criterion named twice, or by both `all` and its number, is marked once. `set_criterion` becomes `set_criteria` and takes every line in one pass. Each named criterion gets a line, printed after the write. One already in the target state reads `Already checked 2: text` and does not count towards the write, so a batch where every box is already ticked writes nothing. The opencode wrapper takes the terms one per line, like the other list arguments. REVIEW.md gains the one thing a reviewer must not do with this: reach for `all`, which would erase the implementer's claim on the criteria the review agreed with. 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> |
||
|
|
a16169ce8c |
(b8ce18c) Show a blocked marker on the tui card, and bump to 0.13.4
A ticket held up by an open blocker looked exactly like one that is ready, and the board is where the next thing to pick up is chosen. The mark is × in brightred, after the short id. Not a fourth Geometric Shapes glyph: those are the priority meter's, two cells away, and another circle there reads as part of that ramp. × is Latin-1, like the middle dot the unset priority draws, so it renders wherever the meter does. After the id rather than before it, because ahead of it the mark would push every id in the column out of line whenever one card was blocked. 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. No scan of the board per tick was needed after all. collect_ticket_items also reads the ticket's own uuid and the targets of its blocked by lines, off the file it is already holding, and mark_blocked walks the four columns once for a uuid-to-status map and once to answer every card. The flag is on Card rather than TicketItem: the answer is about two tickets at once, so no card can reach it alone, and it is settled at reload the way project is. The merge carries each card's flag from the board it came from. relate resolves its target inside one .worklane, so a blocker in another project is not a relation anything can record, and recomputing over the merged columns would let one project's uuid match another project's ticket. project_label now takes the width the row has actually spent, measured off the spans, instead of adding up the widths those spans are supposed to have. The hand-written sum left out the space after the priority mark, so a cut label was handed one cell more than the column had. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
7a0dd625ce |
(1e7b1a9) Colour a tag by its name, and bump to 0.13.2
FNV-1a over the tag bytes into an eight-colour reserved palette, so the same tag is the same colour on every card and on every board with nothing stored. The hash is written out rather than taken from std, whose output is not promised stable across releases. The index is multiply-shift, not `% len`. The length is a power of two, so a modulus keeps the low three bits of the hash, and FNV-1a's low bits carry only the low bits of the input bytes: nothing moves information downwards. Every pair of tags differing above bit 2 landed in one slot, `bug` and `BUG` among them. It looked like a good palette, two colliding cards in sixty-four on this board, because the vocabulary had been folded into a handful of slots. Using the whole hash gives 14/64, which is the real arithmetic for eight colours. The palette is reserved as a list and disjoint from the seven colours that already mean something: a tag in red reads as a uuid, in green as a title. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
91bbc19c32 |
(e41802b) Show a ticket's tags on its tui card, and bump to 0.12.1
The Tags field was invisible on the board: a card carried the mark, the short id, the due date, the owner and the criteria count, and nothing said a ticket was tagged bug without opening it. TicketItem gains a tags field, filled in collect_ticket_items through parse_tags where the file is already being read, for the reason the criteria count is: the board draws them on every card, and asking per card would re-read every ticket body on every draw. 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 one answer. That is step one of 2f3796e5, lifted here because the board cannot read the field before it exists. The row sits under the title, dimmed like the owner and the count, each tag prefixed with # so it does not read as a third line of the title. It is dropped whole when the column will not hold it, the rule a corner follows, and an untagged ticket spends no row at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
5b0bac9c2d |
(7bfb9fc) Add campaigns, a ticket container assigned through worklane assign, and bump to 0.12.0
There was no way to group the tickets that have to be finished together. A goal such as a v1 release was either one ticket that could not describe its parts, or a set of tickets with the goal restated in every description and nothing tying them together. A campaign is a file of its own under `.worklane/campaigns/`, with a title, a description and metadata, and it sits in no status directory. Its state is derived instead: open until every member is done. Deriving it means there is no such thing as a done campaign holding an open ticket, and no second forward-only ruleset beside `mv`'s. An empty campaign is neither open nor done, since calling it done would make a container nothing has been filed against the most complete thing on the board. Membership is one field on the *member*, Campaign in the ticket Metadata, written only by `assign`. The member list is deliberately not on the campaign: that would put membership in two places and make one file that every assignment edits, contended the moment two agents share a board. So `add` gains no `--campaign` and neither does `set`. `add` does not write the field either. Every ticket written before campaigns existed has none, so the insertion path has to exist regardless, and leaving it out of `add` means one path that is always exercised rather than two. That is the Relations argument from 4179958, applied to a field instead of a section. `set_or_insert_metadata_field` is the upsert and `METADATA_ORDER` is its anchor list, the way `SECTION_ORDER` is `ensure_section`'s, so Campaign lands beside Status rather than at the end and Status stays last. A file with no Metadata heading is an error rather than an insertion, per 641e3d5. The three tiers came out of `resolve_ticket` into `resolve_in`, shared by both kinds. A campaign is addressed exactly the way a ticket is, and a second resolver would be a second copy of the precedence rules to keep in step. Two things fell out of that. `Found.dir` is the status for a ticket and empty for a campaign, which is what drops the bracket from the ambiguity listing for one. And `resolve_ticket` can now explain a search that names a campaign, so `mv`, `show`, `chown` and everything else that takes a ticket give the same reason instead of a bare "no ticket found" — one place rather than a check per command. Only on the zero-match path, so an ambiguous ticket error is never replaced by a complaint about a directory the caller never mentioned. The stored value is the full uuid, per the same rule the Relations section follows, and the title is resolved for display. `reference_cell` is now shared between the two, so a dangling campaign and a dangling relation target are both `_missing_` rather than each inventing a spelling. `Resolved` carries what `content_trim` cannot render from the file alone: a struct rather than two more parameters, so the next such field is one entry instead of an edit at every call site. `campaign show` lists done members, unlike `ls`, which leaves the done column out of its listing. What is finished against what is left is the whole question a campaign asks. `ls --campaign` is the other way round and keeps every rule `ls` already has. Deliberately out of scope. The derived progress figure is 1cb999f, now recorded as blocked by this, since nothing here can compute it yet. Unassigning needs a field cleared back to unset, which is 74904dc. And the board gets neither a campaign tab nor a card marker: the detail view resolves the field because it renders the body, and that is all. A marker would want a read per reload and the four corners are already spent, which is the b8ce18c reasoning; filed as 61879a4. Twenty-four integration tests and eleven unit tests, covering assign, reassign, the no-op, a dangling campaign, the ls filter, `mv` refusing a campaign, insertion placement, and a handwritten section and unknown metadata field surviving an assignment verbatim. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
41a65f95b2 |
(2ec6508) Filter status directories to md files in ls, and bump to 0.11.1
A status directory is a plain directory, so anything can land in it. `collect_ticket_items` read every entry it could, so a stray `notes.txt` was listed as `(notes) _No title_` and counted in the per-status summary beside the real tickets. The extension check is the one every other scan of a status directory already makes: `resolve_ticket`, `RelationIndex::load`, `find_ticket_file` and the tui's `digest` all skip a non-md path. This was the only reader without it, so the fix is to join them rather than to invent a rule. Subdirectories were already excluded, but by accident: `read_to_string` fails on a directory and `filter_map` dropped it. The filter now refuses them on the extension, and the test keeps a subdirectory in place so a later change to how the file is read cannot bring them back. The count needed nothing. It comes from `collect_ticket_items().len()` since the priority filter was added, so filtering the source fixed both the rows and the number in one place. 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> |
||
|
|
e6fe51e31e |
(996afd7) Monitor several boards in the tui as tabs, and bump to 0.9.0
`worklane tui` takes any number of paths, each resolved to the first `.worklane` at or above it the way the working directory always was. With more than one board there is a tab per project plus an `all` tab merging them, and `tab`/`shift+tab` between them. The selection moves onto `Tab`: sharing one column and card index across projects would point it at whatever unrelated ticket sat in the same place. The merge is sorted through `by_priority_then_title`, now exported, rather than concatenated, so its order does not depend on the order of the arguments. On the merge a card and the overlay border name the project after the id, since across boards seven characters of uuid are not an address. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
c606b5ba43 |
(4edc7fa) Lay the tui card out as corners, with a due date and a criteria count, and bump to 0.8.5
A card was three left-aligned rows: mark and id, one row of title, then owner
and due as prose. The title got one row, so worklane's own titles, routinely
longer than a quarter of a terminal, were cut mid-word with nothing to say so.
The due sat at the end of the bottom row where nothing drew the eye to it, and
nothing showed how far along a ticket was.
●◐ (1b78a24) 2026-12-31
The tui detail view cannot
scroll, and the footer says…
Ansho Rei [3/9]
The title takes one row or two, wrapped on spaces, ellipsis when even two are
not enough, one row when one is enough. A card's height therefore depends on the
column's width, so `card_lines` and `card_height` take it, and `column_areas` is
now shared between the draw and `follow_selection`: `Ratio` hands its remainder
column to whichever slot it likes, and reproducing that arithmetic by hand is
how a measurement and a draw come to disagree about where a card starts.
A corner that will not fit is dropped whole rather than truncated or moved to a
row of its own. Half a date reads as a different date, and a card that reflows
in a narrow column changes height, which the scroll would then have to chase.
The left corner is the ticket's identity and always stays. Checked by eye at
120, 76 and 52 columns; at 52 the due goes and the count still fits.
The criteria count is a field on `TicketItem`, filled in `collect_ticket_items`
where the file is already being read, so a rescan pays for it once rather than
every draw re-reading every ticket body. Counted through `criteria()`, so a
checkbox in a description is neither counted here nor numbered by `show`, and
`None` rather than `[0/0]` when a ticket has none.
`due_date` cuts a due value back to its date only when it has one. The field is
not validated, see daa0e79, so it holds whatever was typed; taking the first
word regardless would turn "next friday" into "next". A set due is now the
timestamp colour per the colour guideline, which is what makes the corner worth
looking at, and an unset one stays grey like everywhere else.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
90b313952b |
(6d327df) Stop colour escapes leaking into the board's detail view, and bump to 0.8.4
The detail view renders with colour off, because ratatui draws styled spans and an escape sequence inside a paragraph is not one. `detail_of` asks for that with `content_trim(&content, false)`. Two paths ignored the argument and asked the terminal instead. `colorize_ordered` took no colour parameter at all and called `color_text`, which is `paint(.., should_use_colors())`, and `content_trim` routes every Implementation Plan line through it. In the TUI stdout is a terminal, so each numbered step arrived as ESC[36m, the number, ESC[0m, then the text: exactly the gap between the number and the step text where the reported artifact showed. `colorize_line` did the same for a hand-written line inside a Metadata section, and `colorize_bold` honoured its `enabled` flag on the early return and then asked `should_use_colors()` again for the bold run, which made the flag a lie in half the function. `colorize_ordered` now takes the decision and is private, `content_trim` being its only caller. `colorize_line` is deleted rather than given the argument: it was a `pub` alias for `colorize_bold` with one caller, and asking the terminal was the only thing it added, so `render_metadata_table` calls `colorize_bold` with the decision it already holds. Why this shipped, and the reason for the shape of the tests. The guard was an assert that the detail view holds no escape byte, and it could not fail: a test binary has no tty, so `should_use_colors()` was false and the leaking branch was never taken. An absence is now asserted alongside a presence, `content_trim(.., false)` carries no escape and `content_trim(.., true)` still colours, which pins the flag as the only thing that decides. A third test scans this file for `color_text` callers and fails on a new one; it also corrected the assumption this commit started from, since the remaining caller is `ambiguous` and not `display_ticket_items`. The visible symptom is a terminal artifact that no test here can see, since TestBackend applies cell updates and parses no escapes. What is proven is that the escapes are gone, and that the CLI still paints its plan numbers cyan in a pty, which is the condition the leak needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
2298d3373a |
(8528c50) Hide the done column in the tui until d asks for it, and bump to 0.8.2
Done only grows. It already holds more tickets than the other three columns
together, so a quarter of the width was going to the column least often read
while the ones being worked got squeezed for it.
Not a new opinion: `ls` already counts done in its summary and leaves it out of
the listing below. The board now does the same, and the footer carries the
count while the column is hidden, which is the board's version of that summary
line. It reads `d show done (17)` while hidden and `d hide done` while shown,
so the count only appears where a column heading is not already carrying it.
The modal footer names the key too, since it works with a ticket open.
Hiding is a change to what is drawn, never to what is read. `reload` still
scans the done directory and `digest` still watches it, so the count is right
and revealing the column needs no rescan.
`visible()` returns a prefix of the columns rather than a filter, which is what
keeps `column` and `offsets` valid as indices into either. It is derived from
where DONE actually sits rather than assuming the last slot, and a test pins
done as last: a status inserted after it would otherwise hide two columns in
silence. DONE is now a constant, since `ls` and the board are two readers of
the same rule.
Hiding the column under the selection moves the selection to the last drawn
column and closes an open detail view. Refreshing the modal onto whichever
ticket the selection landed on was the alternative, and it swaps what someone
is reading without saying so, which is how a person acts on the wrong ticket.
Showing done again is a no-op for the selection, since a column is appended
rather than inserted.
Three existing tests asserted a column heading with `screen.contains("done
(0)")` over the whole render, and the new footer holds that string whether the
column is drawn or not, so all three passed for the wrong reason the moment
done was hidden. They now assert against the top border row through a
`headings()` helper, with `footer()` beside it.
The choice is not remembered between runs: worklane has no config file, and one
flag is not a reason to start one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
8013c2b74d |
(d8e78cd) Clear the clippy warnings, and bump to 0.8.1
`cargo clippy --all-targets` was reporting 96 warnings, 14 of them in the binary. It is now clean from a cold cache, and the 211 tests still pass. `clippy --fix` took the mechanical ones: needless borrows, `map_or` that is `is_some_and`, `push_str` of a single character, manual `split_once`, and `&PathBuf` parameters in the test fixtures. It also moved the `handlers.rs` test module to the end of the file, which is what `items_after_test_module` was pointing at. Three by hand. `cmd_add` took nine parameters threaded from `main`, and now takes `AddArgs`, which is how `set`, `append` and `check` already pass theirs; the handler destructures it so the body reads as before, and `add --help` is unchanged. The collapsed `if` in `content_trim` needed reindenting, since `--fix` left its body at the old depth. And the two `split_once` rewrites read as `.split_once(..).map(|(_, value)| value)` rather than clippy's `.map(|x| x.1)`. The two eight-argument `create_ticket` test fixtures keep an `allow(too_many_arguments)` carrying the reason: the lint is right that twenty-five positional call sites read as a wall of strings, but replacing them with a named-field struct is a refactor and not a warning sweep. a34a316 tracks it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
78831f1a39 |
(f6af387) Add the board view, and bump to 0.7.0
worklane was one-shot commands only, so reading the board meant running ls again and again and nothing ever showed the four statuses side by side, which is the one view a kanban flow is for. Four columns, a card per ticket carrying the priority mark, short id, title, owner and due. Arrows or hjkl to move, enter for the detail view, q to quit. Read only: moving a card by keypress is a follow-up, kept out until the watch and render loop were solid. Modelled on frig throughout, same crates and same shape: event poll on a 250ms timeout so the tick runs when nobody is typing, a panic hook that leaves the alternate screen before the backtrace, and the terminal restored on the error path as well as on quit. A bare worklane opens it, as a bare frig does, so Cli::command is now an Option. The watch looks at files, not directories. A directory's mtime only moves on create and rename, so a ticket edited in place would be missed; the digest hashes every ticket and comment file's path, length and mtime. Comment files are in it because a comment added elsewhere has to reach the detail view. It guards the rescan rather than the draw, since ratatui diffs its buffer but reading the tree every frame would not be free. notify is deliberately not a dependency, and the reason is on the ticket. Two orderings are deliberate. The worklane directory is looked for before the terminal, so running outside one gives the usual message rather than a complaint about the tty, and both errors stay testable without a pty. And a missing tty is refused by name, since raw mode on a pipe fails with a bare "No such device or address" that explains nothing. The palette is now a Color enum rather than a string, so the escape the CLI writes and the ratatui colour the board draws come from one definition and a colour missing from either is a compile error. That retires the test which existed only to catch a name with no entry, the failure that once left magenta undefined. Cards come from collect_ticket_items, so there is no second parser; TicketItem gained the path the detail view opens. content_trim and format_comments_with take the colour decision, because ratatui draws spans and would print an escape as literal bytes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
bbb1568a0f |
(eadaca9) Add check and uncheck for one acceptance criterion, and bump to 0.6.0
Criteria are stored as - [ ] lines and nothing could tick one, so marking progress meant replacing the whole list through set, losing the state of every other item. check and uncheck are separate commands rather than one verb with a flag, sharing CheckArgs and cmd_check. The criterion is an index first and a substring second, so a criterion whose text is literally "2" is reachable only by substring. A number out of range is reported as a bad index rather than as a substring that missed. Only the character between the brackets is spliced, so the text keeps whatever indentation and spacing it had. Criteria are counted inside the Acceptance Criteria section only, so a checkbox written into a description is not a criterion and a handwritten line in the section takes no number. With the criterion omitted, the criteria are listed and the number asked for when stdin is a terminal. Where it is not, the same list comes back as an error instead. Prompting regardless would leave the opencode wrapper blocked on a stdin that never closes, and that is the choice resolve_ticket already makes for an ambiguous match, for the same reason: the wrapper keeps stderr and throws on the code, so a list printed to stdout would be discarded. Any listing of a subset keeps the real numbers. Renumbering the matches from one would contradict the advice to use the number and point at the wrong criterion. show now numbers the criteria as "1. [x] text", so the index is visible where the ticket is read. That also drops a manual prefix strip, so clippy is one warning below where it started. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
3810e442c6 |
(da03690) Add set and append for editing a ticket, and bump to 0.5.0
Nothing could change a ticket after it was created. mv wrote status, comment appended a file, and that was the whole set of mutations, so correcting a typo or adding a criterion meant hand editing the markdown. Two commands rather than the one vague "edit" the ticket described. set replaces a field, append adds to a section, so the verb carries the meaning instead of a prefix on seven flag names, and append only offers the three sections that hold multiple lines. Owner is absent from both, it belongs to the chown command filed alongside this, and status stays mv's. One field, one writer. Sections are a table, DESCRIPTION, ACCEPTANCE and PLAN, each carrying a heading, a label, the placeholder add writes when empty, and a kind. Both commands walk it, so a section added later is one entry rather than edits in two places. Everything is targeted line surgery and never a regenerated file, which is what keeps a ticked criterion ticked and a handwritten section intact when an unrelated field changes. Appending to a numbered section continues from the count already there rather than renumbering above it, so a handwritten line survives exactly as written. Appending to an empty section replaces the placeholder instead of following it. An empty value is a paragraph break for a section and a usage error for a scalar, since it looks like a way to clear a field and clearing is not supported yet. No-op detection compares the whole file before and after each edit, so a field set to the value it already holds is reported unchanged and nothing is written. Two things came out of building it. move_ticket_file's staged write is extracted as write_then_replace, now the only way any ticket file is written. And the file is located by uuid rather than by title: titles are not unique, add allows duplicates on purpose, and the old title scan meant mv <uuid-of-second> moved the first ticket sharing its title. Reproduced, fixed, and pinned by a test. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
39ee86e308 |
(4c516e6) Preserve paragraph breaks in ticket descriptions, and bump to 0.4.1
The opencode add tool split the description on newlines and then dropped the empty ones with filter(Boolean), so every multi paragraph description arrived as a single paragraph, against the tool's own instruction to separate paragraphs with newlines. cmd_add needed no change for this. Joining the values with a single newline is what makes an empty value a paragraph break, so the capability was already there and only the wrapper was throwing it away. Verified by hand before touching anything. The wrapper now keeps interior blanks and trims only the ends, and only trims trailing whitespace within a line, since leading whitespace is what makes a nested list or an indented block survive. --acceptance and --plan keep dropping blanks: each value there is one criterium or step, so an empty line is spacing. trim_blank_ends in cmd_add makes the second criterion hold whoever calls it, not just the wrapper: blank values at either end are dropped so a break never lands against a section heading, and an all-blank description reads as none. Interior runs are kept verbatim rather than collapsed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |