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.
23 lines
641 B
TOML
23 lines
641 B
TOML
[package]
|
|
name = "worklane"
|
|
version = "0.32.16"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
clap = { version = "4", features = ["derive"] }
|
|
anyhow = "1"
|
|
uuid = { version = "1", features = ["v4"] }
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
libc = "0.2"
|
|
# unstable-rendered-line-info for Paragraph::line_count, which is how the detail view
|
|
# knows where its text ends. Counting the wrapping by hand would only agree with the
|
|
# widget until one of us changed.
|
|
ratatui = { version = "0.29", features = ["unstable-rendered-line-info"] }
|
|
crossterm = "0.28"
|
|
clap_complete = "4.6.9"
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = "2"
|
|
assert_fs = "1"
|
|
tempfile = "3"
|