Files
worklane/docs/tui-prompts.md
Ansho ReiandClaude Opus 5 298e00eb33 (d7e493e) Draw the command's own usage line while the prompt is open, and bump to 0.33.7
The reader knows the grammar approximately: that mv takes a status, not
whether it is a positional or --status, and that set has a flag per section,
not whether the criteria one is --acceptance or --criteria. In a shell fish
answers that as the line is typed. On the board there was nothing, and
getting it wrong cost a rejected line and a guess.

usage_of walks the typed verb against the clap definition and renders its
usage, so a flag added to a command is described here the day it is added.
A table of synopses kept beside it would be a second grammar, and it would
go stale silently: nothing but a reader typing that verb would ever see the
two disagree. The Usage: label is dropped, being the name of a block in a
help page of several where this is one line beside the line it describes.

It takes the keys' slot. esc and enter are two keys a reader learns once,
against a synopsis that is different for every verb; a refusal still wins
over both while it is up, being what was just said about the line that is
still on the row. refusal is the half that says what is wrong where this
says what would have been right.

A verb that resolves to nothing draws nothing and complains about nothing,
since the line is half typed most of the time the row is looked at. A
group's child is walked when the second word names one, so campaign set
describes set; while that word is half typed the group's own usage stands.

Grey, and cut with an ellipsis rather than wrapped: the footer is one row
and a second would reflow the columns every time a verb resolved. There is
always at least the keys' width to cut into, because that width comes off
the row before the line is windowed, so the usage never takes a cell from
what is being typed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 16:51:08 +02:00

33 KiB

The Board Prompts

The three input modes on the board and the key that copies an id off it.

The Search Prompt

  • search: Option<Search> is the whole mode, the shape detail uses: "the prompt is open" and "what is in it" cannot disagree, and closing it leaves nothing to reset. Search also carries missed, set when enter found nothing and cleared by the next edit, since the message is about the query that missed
  • The prompt swallows every key it is given. Board::search_key runs ahead of the action arms in main.rs and reports what it took, rather than every arm below asking whether a search is open. Typing d into a query must not toggle done and q must not quit; with no prompt open it takes nothing, so the dispatch is unchanged for every other state. The rule is on Board for the reason dismiss is: the arm is not reachable from a test
  • ctrl-c is the one key it declines, because a terminal application always honours it and a prompt that ate it would leave no way off the board. Every other control combination is swallowed and does nothing: it must not type its letter, and it must not fall through either, since the action arms match on the code alone and ctrl-d would reach the one bound to d
  • Esc is consumed by the search before it can mean anything else, which is the collision e7612de left behind: esc and q close the overlay, and both have to lose to an open prompt. It falls out of the pre-branch rather than being ordered by hand
  • first_match searches the visible columns, every card in them, not the rows on screen. A query that answered differently on a tall terminal and a short one is not a search, and the jump scrolls the match into view anyway. Hidden columns stay out: with done hidden, a match there would put the highlight on a ticket that is not on the board. Reading order is column by column, then top to bottom
  • Id and title only, per 3b16540, both lowercased. The title has to be case insensitive to be worth typing, and giving the id the same treatment lets a pasted id match whatever case it was copied in. An empty or all-space query matches nothing rather than everything
  • The jump goes through select_at, the tail select_card already used. follow_selection scrolls the column the card is in, and the offsets are per column and on the Tab, so a jump across columns moves the right one; refresh_detail keeps an open overlay on the ticket the selection names. A second version of either is how a jump comes to scroll differently from the arrow keys
  • A hit closes the prompt and a miss keeps it open, marked, with the selection untouched. The query can then be corrected in place instead of retyped from /. Doing nothing visible is what makes a reader retype a query that was already right
  • The prompt takes the whole footer row, because the key list it replaces describes nothing that currently works while every key is going into the buffer. Its two keys are drawn as every other key is, cyan on the key and the default foreground on the word. That the query then sits in the same foreground as the descriptions is what the house style costs on this row, and the cursor is what says which half is an input — which it does in a terminal with no colour at all. no match stays brightred beside the query it is about, being the one thing on the row that is neither a key nor what was typed
  • The real terminal cursor goes after the query, not a glyph standing in for one. ratatui shows the cursor only for a frame that asked for it, so set_cursor_position is also what says "you are typing" while the query is still empty. Clamped to the row, so a query longer than the terminal leaves it on the last cell
  • Both closed footers name /, since the jump works with a ticket open as well: it moves the selection and the overlay follows
  • Out of scope on purpose, each its own ticket once the input mode exists: n and N for the next and previous match, searching the description, tags or owner, regex, and filtering the board down to matches rather than selecting one

The Command Prompt

  • prompt: Option<Prompt> is the whole mode, the shape search and detail use: open and content cannot disagree, and closing it leaves nothing to reset. Prompt carries the line, the cursor as a byte offset into it, and refused, which is Search::missed with something to say
  • Board::prompt_key is third in the pre-dispatch, beside search_key and picker_key and on the same contract: while a command is being typed q is a letter, d leaves the columns alone and tab stays out of the project tabs, and ctrl-c is the one key declined. It takes a Size for enter's sake: running a command reloads the board and then has to bring the ticket it moved back into view, which is the measurement follow_selection takes. Only one of the two prompts can be open at once: : is reachable from the action arms alone, and while either has the keyboard the other's key is a character in a line
  • esc and enter are the mode's own keys and are answered in prompt_key; everything else belongs to the line and goes to Prompt::key. That is also what keeps the borrow straight, since closing the prompt takes the whole board and editing takes only the prompt. Left, right, home, end, backspace and ctrl-w behave as they do in a shell, and ctrl-w eats the separators behind the cursor before the word behind those, so one press at the end of mv 1b78a24 takes the id. tab is the mode's too, for the reason the recall walk is: what it takes is made of the selected card and the line is only where it lands
  • The grammar is clap's, with nothing restated. The line is tokenised by split_line, the binary's own name goes in front, and the arguments go to the same Cli definition the shell reaches, so a flag added to a command is typeable here the day it is added. Through Cli::command().try_get_matches_from_mut rather than try_parse_from, for what the matches give back: command_name walks the subcommands to name what resolved (campaign show, not campaign) instead of a match over every variant, which would be a second list of every verb the CLI has and one that goes stale silently
  • refused is cleared by an edit and not by a movement. The message is about the line, and moving the cursor does not change the line. Prompt::key clears it in the three arms that write to the line
  • A line that ends inside a quote never reaches clap. That is what Unclosed is for: a grammar complaint about a sentence nobody finished describes the wrong thing. Enter on an empty line, or one of nothing but separators, closes the prompt with nothing said, the way esc does — the bare form of the CLI opens a board and there is one on the screen
  • Enter runs it, through main.rs's dispatch and never through a handler this file names. That match is the one mapping from a parsed command to the function that performs it: main calls it with its own stdout and the working directory, Board::run calls it with a buffer and the selected tab's root. A second copy inside tui.rs would drift the first time a command was added, and it would drift silently, since both halves go on compiling. The match is exhaustive so a new verb cannot fall into an _ arm and do nothing, and main_and_the_prompt_run_one_dispatch_table reads both files as text to pin it. Only tui is matched outside the table, in main, because the board is that table's caller rather than an entry in it; reached from the prompt it is refused in those words
  • What it writes is attributed to the person at the board, through the same dispatch parameter, because a line nothing but the reader can type is the reader's action. The rule and its precedence are in history.md, which owns attribution; what belongs here is that the board is the one caller that asks for it
  • from_arg_matches on the same matches gives run the typed values. One parse, two readings: command_name walks the subcommands to name what resolved and from_arg_matches reconstructs the Cli. A match over every Command variant to get one or the other would be a second list of every verb the CLI has
  • The handler's own words are what the board reports, word for word. Those messages are written for a person already, and a second set kept here would go stale the first time one of them changed. The sink is a buffer, so the words come back as text and the board styles them; it is plain for the same reason Detail holds spans, since a ratatui paragraph prints an escape rather than obeying it. An error never goes through a sink at all — color_text asks the process about its stdout, which under the board answers yes about a terminal the message is not going to — so error_lines runs without_escapes over it and puts each cause on a line of its own
  • A warning goes through the sink's second stream, and never through eprintln!. Sink carries two writers because the CLI's two streams are two: Sink::std hands the answer to stdout and an aside to stderr, and a shell has to go on reading the same line on the same stream. Under the board neither is a stream at all — stderr is the alternate screen with the columns on it — so Sink::buffer holds its warnings and Board::run reads them back with Sink::warnings and puts them above the answer, on both outcomes: a mv that warns about a dangling blocker and is then refused by a real one wrote the aside first, and it is the half that says why the refusal names one blocker and the ticket records two. That is c680e24: one eprintln! in check_blockers outlived fa5662a because a helper had no sink to reach, and ratatui does not repaint a cell it believes is unchanged, so the fragment stayed on the columns until something else redrew them. no_handler_or_helper_reaches_a_print_macro walks src for the next one, each file cut at its test module, so a print site in a module added tomorrow is caught the day it is added
  • A handler that errors leaves the prompt open with the line intact. The usual cause is an ambiguous id, and the fix is two more characters rather than the whole line retyped from :. Ambiguity is an Err carrying the candidates, not a print and an exit, which is what makes it safe to reach from here at all
  • The reload after a command is unconditional, and runs whether it failed or not. tick reloads on the digest, which is right for a change made in another pane and needless latency for one the board just made: the reader would watch their own mv take up to a poll interval to appear. Either way, because a handler that failed part way through has still written
  • The selection is restored by uuid across that reload, never by index. mv puts the card in another column, set --title renames its file, and a filter can drop it out of view entirely, so the slot is not the ticket. Board::reselect has three answers: the card is in a drawn column and the selection goes to it; it is on the board but in a column the rotation is hiding, which is where --status done lands by default, so the notice says where it went and which key shows it; or the filter no longer holds it, which is said too, since a card vanishing from under the highlight reads as a bug in the board
  • The merge tab is refused, for now. It is the one tab that is not a board — its cards came from several .worklane directories and it is none of them — so Board::current_project answers None there and the command is refused rather than landing on whichever project came first. Routing by the card a command names is ebc5755. The project is resolved by index and not by the tab's name, which is a label two projects can share: e1d79c3 is exactly that, and a write routed by name would be that bug with a file changing at the end of it
  • Notice holds as many lines as the command used, and Board::notice_on_row decides where they go. One line with nothing else holding the row draws on the footer, where a copy's notice has always drawn. Anything else — several lines, or any answer at all while the prompt is still open on an error — draws as a box at the foot of the columns, cut to what the columns leave with the dropped count on its last row. A box rather than more rows of footer, and that is the whole reason it is an overlay: a footer that grew and shrank as notices came and went would reflow the columns on every keypress, moving every card the reader is looking at. draw and draw_footer both ask notice_on_row, so the two cannot come to disagree and draw the message twice or not at all
  • The command's own usage line takes the keys' slot as soon as the verb resolves. The reader knows the grammar approximately — that mv takes a status, not whether it is a positional or a flag, and that set has a flag per section, not whether the criteria one is --acceptance or --criteria — which is what a shell answers as the line is typed and the board answered with nothing. usage_of walks the typed verb against the clap definition and renders its usage, so a flag added to a command is described here the day it is added; a table of synopses kept beside it would be a second grammar going stale silently, since nothing but a reader typing that verb would see the two disagree. The Usage: label is dropped, being a block name in a help page of several where this is one line beside the line it describes
  • esc and enter are what the row gives up for it. Two keys a reader learns once, against a synopsis that is different for every verb. A refusal still wins over both while it is up, being what was just said about the line that is still on the row, and refusal is the half that says what is wrong where this says what would have been right
  • A verb that resolves to nothing draws nothing, and complains about nothing. The line is half typed most of the time the row is looked at, so an error about com is noise where a reader is still typing. A group's child is walked when the second word names one, so campaign set describes set; while that second word is half typed the group's own campaign <COMMAND> stands, which is what has been typed so far
  • Grey, and cut with an ellipsis rather than wrapped. Grey is the chrome colour and says the same thing the suggestion's does: this is not in your line. The footer is one row, and a second one would reflow the columns every time a verb resolved — the reason a notice of several lines is a box. There is always at least the keys' width to cut into, because that width comes off the row before the line is windowed, so the usage never takes a cell from what is being typed
  • What a refused line shows is clap's own message with the usage block cut off, which is also what drops the --help line after it. --help is the exception: it parses as an error of the kind that means print this and what it would print is a page, so it is caught and answered in a row's worth of words, or clap's help lands on the alternate screen the way an unsunk println! would. --version goes through the ordinary path, because what it prints is one line by construction. ColorChoice::Never on the command, so nothing that reaches the row carries an escape
  • The keys' width comes off the row before the line is windowed, so a long command does not push them off the end; a message takes the row from the keys instead, since the reader has just been told something and esc and enter still do what they did. prompt_window anchors the window on the cursor's right edge, which costs the text after the cursor on a long line: keeping both ends needs a scroll offset in state, and the draw is where the width is known and the state is not writable
  • : command is named in every footer state, because the key works in every one of them, and the prompt's own key is drawn as ↵ run

The Prompt's Recall

  • up and down walk the lines already typed, and the lines are on disk. .wlhistory in the board's own folder, appended as each line is entered. It is the one file under .worklane the board writes rather than a command, and the only one that is not markdown, which is the cost of a recall worth having: a board is opened and closed all day, and one that emptied on quit would only help inside a single sitting
  • Recall is per tab, parallel to Board::tabs, so the tab in view decides which list up walks. A project's lines are the ones naming its ticket ids, and handing another board's mv back on this one would offer an id that resolves to nothing there. The tabs are fixed for the run, so the two vectors cannot drift, and the same index that picks the tab picks the recall
  • The merge tab has no file. It is the one tab that is not a board, current_project answers None there and a command typed there is refused for that reason, so there is nothing to attribute a line to. Those lines are still recalled for the run: every one of them was refused, and a refused line is the one most worth getting back. When ebc5755 routes a merge line to the board its card names, that board's file is the one to append to
  • The position is on Prompt and the lines are on Recall, so closing the prompt forgets the position and not the lines: the next : opens at the end of the list again, which is where a shell opens. pending holds the half typed line up walked away from, and walking down past the newest entry puts it back, so leaving a command to look for an older one never costs it
  • The ends are stops, not wraps. up on the oldest line leaves it up rather than cycling round to the newest, which is what a shell does with it; down with no walk under way does nothing, since there is nothing in front of a line still being typed and emptying the row would be a keypress that destroys work. An empty recall does nothing at all, and that includes leaving the line alone, or up on a board nobody has typed at would be a way to lose what is half written
  • The line is kept before anything can refuse it. A refused line never reached a handler and the fix is usually two characters, which is what the walk exists to save. Consecutive duplicates are kept once, against what is already held, so the rule spans runs as well as one sitting; a blank line is no command and is not kept. Nothing is trimmed
  • A failed write is silent, and an unreadable file is an empty recall. The line is in memory either way, so the walk works for the run on a board whose folder cannot be written, and a board with no history yet is the ordinary case rather than something to say. A notice about a history file would be about the one thing the reader did not ask for
  • .wlhistory is not in digest. Appending to it must not read as the tree moving, or every command typed would provoke a reload of every board on top of the one run already does

The Prompt's Completion

  • The reader has the ticket selected, which is the whole reason to type a command on the board rather than in a shell. So where the line is naming a ticket, the selected card's short id is drawn after the cursor and tab takes it into the line. Retyping seven characters off the card in front of you is the friction the prompt exists to remove
  • Where a ticket goes is completions.rs's answer, not a table written here. argument_at reads TICKET_COMMANDS, TICKET_SECOND_COMMANDS and TICKET_FLAGS, which no_ticket_taking_subcommand_is_missing and every_ticket_flag_is_a_real_option keep honest against clap's own definition, and the campaign and tag lists beside them. A second copy of the positions on the board would go wrong the next time a command grew a ticket argument, and it would go wrong silently, since the test guarding the first copy would not read the second
  • The ticket is not always the first argument, which is what a naive version gets wrong. chown alice <ticket> and assign v1 <ticket> put it second on purpose, relate x --blocked-by <ticket> puts it in a flag, and chown --clear <ticket> does too, since with no user to give there is no positional for it. Nothing is offered where the argument is something else: relate --clear wants a kind, set --clear wants a field name, and chown's first argument is a user
  • Position is counted, exactly as the fish half counts it, so mv --status done <ticket> is not recognised: the ticket is mv's first positional and the third argument on the line. That is the fish rules' limit as well, and one table answering both is worth more than two tables disagreeing about the corner
  • TICKET_FLAGS holds pairs, command and flag, where it used to hold bare flag names. Three commands carry a --clear and only chown's names a ticket, so the command is half of the fact. It also took the last hand-written ticket rule out of the fish block: every one of them is generated from the table now, and every_ticket_flag_is_a_real_option walks each pair against the command it names
  • It is derived on every call and held nowhere. Board::completion is asked once by the draw and once by tab, so what is on the row and what the key takes cannot disagree, and there is no list to go stale when the line is edited or the board reloads under it. That is also what "any other key drops it" means: nothing is dropped, because nothing was kept
  • Only with the cursor at the end of the line. The suggestion is drawn after the cursor and tab inserts it there, so with a command continuing past the cursor both would land in the middle of something already typed. A shell's own suggestion keeps the same rule
  • Only while a candidate still starts with what is typed, and what is drawn is the rest of it rather than the whole. An offer that no longer matches the argument under it describes nothing, and once the whole of it is typed there is nothing left to add
  • Nothing with no card under the selection. On the frame the selection is on a campaign or a tag, and neither is a ticket: y copies what the frame names there, and this deliberately does not
  • Everything else worklane can name is completed the same way, which is what makes it one mechanism rather than a ticket suggestion with four more bolted on. Argument says what a position takes — a ticket, a campaign, a tag, or a fixed list — and Board::candidates says what the board currently holds of it. The verbs and the enum values are clap's own, so a command, a status, a shell or a clearable field added anywhere is typeable here the day it is added, and the campaigns and the tags are the tab's own rows, rebuilt at every reload beside the columns and drawn by the c and t pickers. Nothing here reads the tree: a keypress that went to disk would be a second source for what is already in memory
  • A campaign is offered by codename, and by its short id where it has none. The codename is what the board draws on every card in the campaign and the shortest thing that addresses it; a campaign without one is labelled by its short id in both renderers, and leaving it out would hide it from the only place a reader can reach it by typing
  • tags set is offered only the declared tags. It changes what a declared tag means and refuses one the vocabulary file does not declare, so the carried-but-undeclared ones are exactly the values it rejects. That is 193f9be in the fish half, which reads one listing for both, and the prompt does not inherit it. tags add gets nothing for the mirror reason, and neither --tags that takes the whole list does, since one tag offered into bug,tui is not what the field asked for
  • The clap definition is rebuilt on every call, at 32µs in release against a board that redraws four times a second. A definition cached beside the board would be a second copy of what Cli::command() already answers; the fish half spends 2.5ms per keypress running worklane itself for the same values
  • What is drawn is the longest opening every candidate agrees on, which is exactly what the next tab takes. One rule for one candidate and for many: a ticket position has only the selected card, so the rest of its id is drawn; the five statuses agree on nothing, so nothing is drawn and tab steps through them instead. The row never shows something a press would not do
  • tab again steps through the candidates in place, and wraps. A shell does the same and it needs no list drawn over the columns, which is the trade — the board behind the prompt is what the reader is reading. Wrapping loses nothing typed, unlike the recall's walk, because every candidate still starts with the stem the walk was built from, which is why there is no pending here
  • Each press rebuilds the row from the line as it stood before the first, so the candidates are read fresh every press and the only thing Completing holds is that line and how many presses have landed. Holding the list would be a copy going stale between two presses; holding the candidate the last press chose would narrow the list to it, and the walk would step once and stand still
  • Every edit ends the walk, beside refused and for the same reason: the walk is about one argument and a line that has changed is a different argument. What the last press put on the row stays there, which is what makes tab then a letter the ordinary way to take a candidate
  • Nothing is drawn while a walk is on the row. What is there is a whole candidate already, and a second offer drawn against it would read as part of the same word
  • Grey, which is what the palette already spends on a value that is not one. It is not in the line until tab puts it there, and the reader has to tell the two apart at a glance. It takes what the line leaves of the field rather than a field of its own, so a long command loses the offer instead of pushing esc and enter off the row. The terminal cursor sits on its first cell, which is where the cursor already was
  • The row does not name tab. The prompt names its two mode keys and no more — ctrl-w, the arrows and home and end are unnamed there as well — and the suggestion under the cursor is its own affordance

Splitting a Typed Line

  • split_line is the whole module, and it knows nothing about Board. The command prompt reads one string and clap reads an argv, so comment 1b78a24 the offset was never passed has to be tokenised before anything can parse it: split on whitespace it is five arguments and comment takes two. A pure function over the line and the cursor is what makes every rule reachable from a unit test, and it is in a file of its own rather than in tui.rs, which is eleven thousand lines already
  • The rules are the shell's, because that is what the prompt promises: the line is spelled there exactly as it is spelled in the shell. Runs of whitespace separate arguments, single and double quotes group one, a backslash escapes the next character except inside single quotes where it is a backslash, and an explicitly empty '' is an argument that exists and is empty — which is what --title "" being a usage error rather than a silent clear depends on. A leading hyphen is not special here: whether --foo is a flag or the text of a criterion is clap's question, and PROSE already answers it
  • Written rather than pulled in, for the two answers a shell's own splitter does not owe anybody. A line being typed is half finished, so an unterminated quote is a state to report and not an error to raise: Unclosed says which quote is open, or that the line ends on a backslash with nothing yet to escape, and the arguments up to that point are handed back anyway, because that is what a hint or a completion has to work from. And completion needs the cursor: which argument it is in counting from the verb, and whether nothing of that argument lies before it, which is the difference between completing an argument and starting one. Both fall out of the one scan and neither is reachable afterwards from the arguments alone
  • Some("") is an argument that has been opened and is still empty, which is the only thing that tells '' from nothing typed at all. The cursor's answer is taken before the last argument is pushed, so a cursor at the end of the line is in the argument being typed rather than one past it
  • The cursor is a byte offset, because that is what the prompt's own cursor is: a String inserts and removes at byte indices. Past the end reads as the end and inside a multi-byte character reads as after it, so nothing panics and no caller has to clamp first
  • Unclosed::Escape wins over an open quote, being the inner of the two, and either answer refuses the line
  • The binary's own name is not among the arguments: prepending it before Cli::try_parse_from is the caller's, since only the caller knows what it is calling

The Copy Key

  • y copies the selected card's short id, over OSC 52 written by hand. The board is where a ticket is found and the CLI is where it is acted on, and the only thing joining them was seven characters retyped off the screen. y reads as yank to the readers a keyboard board is for, and was the letter left: q, esc, enter, space, hjkl, the arrows, pgup, pgdn, tab, backtab, d and / were taken
  • The mechanism was chosen against ssh, which is where a board is often read. An escape sequence is the only one of the three ways that crosses the connection, since it is the terminal at the reader's end that owns the clipboard. A crate (arboard and its kind) wants X11 and Wayland libraries at build time, and on X11 the selection belongs to the process that set it: copy an id, quit, and the paste buffer is empty, which is precisely this flow. Shelling out to wl-copy, xclip or pbcopy is platform sniffing plus a process spawn, and does nothing on a machine where none of them is installed or on the far end of a connection. crossterm 0.28 is what ratatui 0.29 pins and it ships no clipboard command, and the backend types have to match whatever ratatui pins, so a newer crossterm cannot be picked up on its own
  • The cost is paid knowingly: a terminal that ignores OSC 52 ignores it silently, and tmux needs set-clipboard on. What clipboard::copy reports is whether the sequence was written, not whether it was honoured, and the footer message says no more than that. There is no reply to read: the query form of OSC 52 is refused by most emulators as a security matter, so nothing better is available to us
  • Base64 is twenty lines here rather than a dependency, because the only thing that goes through it is a seven-character id. Pinned on the RFC 4648 vectors, which cover both padding forms, since a wrong encoder would put plausible-looking rubbish on the clipboard
  • c and not p: the clipboard proper, not the X11 primary selection, since this is pasted into a command line. Terminated with BEL, which is what tmux documents and what every emulator that implements this at all accepts
  • What is copied is ticket.id, the seven characters the card prints, not the full uuid: they are what stops the retyping and what show, mv and comment all resolve. Decided by Board::copy_text rather than inside the arm that copies, so the string is a question the suite can ask without a clipboard. None on an empty column, since an empty string would take away whatever the reader had there and give nothing back
  • The project is left off even on the merge tab, where the id alone is not an address. This goes onto a clipboard to be pasted into a command line, and a second word in it would have to be deleted every time; running the command in the wrong project fails to resolve rather than acting on the wrong ticket
  • The clipboard is handed to Board::copy_selected_id as an argument, clipboard::copy from the dispatch and a closure from a test. That is what makes both answers drivable, and it keeps the terminal write out of the board state
  • A failure is said in the footer, not returned. There is nobody above it to handle one: the board goes on being drawn, and an error swallowed there would look exactly like a copy that worked until the paste came out wrong
  • Notice is the board's one channel for saying something in words, since a copy leaves nothing on screen to look at. failed means "nothing reached the clipboard" rather than "an error occurred", so an empty column and a refused write are one answer to the reader, both in brightred for the reason no match is
  • It takes the whole footer row, on a weaker reason than the prompt's: every key still works while a notice is up. It is that a message squeezed in beside the key list would move every key in it, and the row is the only part of the board that is not a ticket. Drawn after the prompt, which is an input and cannot be covered
  • The notice is cleared by the next keypress, not by a timer. No clock on the board and no wakeup in the loop, and the moment the reader does anything else the message has been read or was never going to be. Doing nothing leaves it up, which is the one state where it is still worth reading. Board::clear_notice runs ahead of search_key as well as the arms, since a key typed into a query is still a key, and it must never move into tick: the board redraws four times a second and a notice cleared there would never be read