91bbc19c3285074f9e7e0dfcacf39a077e4b9f2c
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
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>
|
||
|
|
580e3cf7f0 |
(0721739) Show the ticket id and title on the detail overlay's border
The modal named nothing. It showed a description, criteria and a metadata table belonging to a ticket whose title is nowhere in the text, because content_trim drops the `# ` heading on purpose: `cmd_show` prints it. The card behind the overlay carries it, but the overlay covers most of the board, and the seven characters of id in the metadata table were the only thing identifying what was open. The id and the name now sit on the block title, `(1111111) · First one`. The id goes first because that is how every other view addresses a ticket, and both sit on the border rather than at the head of the paragraph, so reading to the end of a long ticket cannot carry them off the screen. The string is cut here rather than left to the renderer, which truncates an overlong block title at whatever cell it reaches and would take the id with it. Cut against the inner width, the id survives whole and the name ends in an ellipsis where it was trimmed. `Board::detail` is now a `Detail` carrying the title, the id and the text, since the title has to travel beside the body rather than inside it. Written in an opencode session, lost from the working tree to a `git checkout src/tui.rs` that Claude ran to drop a scratch test, and recovered from the opencode snapshot store. The diff is unchanged from what was written, bar one rebase conflict where both sides had added a test helper in the same place. 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>
|
||
|
|
220789efea | (6b8f4d13) Scroll the tui board columns with the selection, and bump to 0.7.2 | ||
|
|
c1137f29cf |
(1b78a24) Scroll the tui detail view on pgup and pgdn, and bump to 0.7.1
The detail view had no scrolling at all: no offset on Board, nothing passed to Paragraph::scroll, so anything past the height of the overlay was unreachable. Every ticket in this repo is longer than that. The footer read "↑↓ scroll" while up and down moved the selection, so it named a key that did nothing and sent the reader looking for their own mistake. The scroll goes on pgup and pgdn rather than taking up and down. Up and down stay on the selection with the modal open, so a whole column can be read without closing it and the modal follows the selection. That is worth more than the two keys. The offset is clamped against the wrapped line count from Paragraph::line_count, which is why ratatui now carries the unstable-rendered-line-info feature. The paragraph wraps on words, so a clamp on the raw lines would stop short of the end or run past it into blank space, and counting the wrapping by hand would only agree with the widget until one of the two changed. The clamp runs on the keypress and again in the draw, since the terminal can be resized between them and a tick can shorten the ticket under a reader who is already at the end. The offset resets when the selection moves and when the modal is closed, so a ticket opens at its top. It deliberately does not reset on a tick: an edit elsewhere in the tree must not throw the reader back to the top of what they are reading. 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> |