Skip to main content

Module history

Module history 

Source
Expand description

The audit trail as text: one row per rev, for blockworx log and the editor’s history panel. Rationale: docs/single-author-playbook.md.

Both surfaces read the same rows, so the console dump and the panel cannot disagree about what a row says. A row here is a rendering of a manifest::Row — one derivation, whether the row was written this session or read off a disk — except for a session with no files, whose history is its commits and nothing else: there is no clock and no author to report, and the panel says so by showing neither.

Structs§

Day
The calendar day a rev was written, in this machine’s own zone: the history panel’s day-group key and the value its date facet filters on. One key for both, so a chip and a group heading cannot disagree about which rows belong together.
Query
The search box, parsed: every word must match, and a word carrying a prefix is asked only of that column.
Row
One rev as a reader sees it. Owned, so a view can carry the rows away from the history they were read off.
Term 🔒
One word of a search, already split from its prefix.
Written
What a recorded row says that a bare commit cannot: what kind of step it was, when it was written, by whom, and where they were standing.

Enums§

Field 🔒
Which of a row’s columns one search term is asked of. The search box’s prefixes, so a reader who remembers where a change was made can say so instead of hoping the word is rare.
Journal
Where the rows a reader is shown come from. Not two functions: a container’s history is its manifest and a scratch session’s is its own commits, and naming the two arms is what keeps one renderer over both.
Kind
What a rev did to its neighbours, without naming which one — the history panel’s kind facet, and the coarse half of Row::kind.

Functions§

date
The date a rev was written, in this machine’s own zone — what a title block’s Date row says. The log’s clock rather than the wall clock, so an export of a given rev says the same thing every time it is taken.
date_in 🔒
date against a named zone — the seam a test pins so its expected text does not depend on where the machine is.
digits 🔒
digits_of 🔒
humanize
elapsed in conversation rather than in units. timeago is the whole of this rule — thresholds, pluralization, “just now” — and reproducing it is exactly the kind of drift the house rule about crates is for.
lines
The rendered dump: one line per row, columns aligned to the widest value in each. A function over the rows rather than a printer, so what the console shows is what a test can read.
lines_in 🔒
lines with the clock’s zone named, for a test that must know what the time column will say.
now
The wall clock, in the one spelling every surface reads it in: the rows’ own. web_time is std::time on a desktop and the page’s clock in a browser, so a row written in a tab carries the time it was really written at.
plural 🔒
rows
journal’s revs with the names their tags give them, oldest first — the order the file holds and the history took them in.
said
The search text that narrows the list to one tag — what clicking a chip sets the box to. What a rev’s row says it did. An inverse rev is titled from the rev it moved rather than from the label the store composed for it, so a reader scanning the log reads the act rather than its bookkeeping.
stamp 🔒
when in zone, to the second. A zone the platform cannot name falls back to UTC, which is jiff’s own answer and the only honest one — an audit line must still say when.
tag_cell 🔒
tag_query
undone
The label of the rev an inverse rev took back, where the rows hold it.
written_as 🔒
written_at
The date and time a rev was written — the status line’s title block, which has one line for what a sheet gives a whole row. To the minute where Row::when goes to the second: a corner of the frame the reader is not looking at is no place for a ticking field.
written_at_in 🔒