VB-1102: History folds routine events: a year’s help, frost and lambing as one line each
Status: done (2026-11-18)
Priority: 1
Size: S
Arch: life
Phase: implement
Design ref: The player, commands and views; The player and what they see (The chronicle)
Goal: A History tab reads as a life: what mattered stands out, and the routine is counted.
Acceptance criteria:
The History tabs of a person, a farm and a village (Sim.chronicle, src/sim/notable.js; src/page/history.js) fold the routine events of one kind within one year into one line with a count and the places: “Helped at Ängsgården, Södergården and Nygården: 23 days”, “Frost took 3 crops”, “47 lambs born; 5 ewes lost over the winter”. The routine kinds are one named list, written in the notes with why each is routine.
A folded line opens, in place, to the events it holds; the filters (Births and deaths, Marriages, Land and farms, Customs and meetings) work as now.
The record is unchanged: the fold is the view’s. A check on a small constructed state (tests/tiny.js): a pawn with 10 help events and a birth in one year shows two lines, the birth first by time.
Measured on the playtest’s case (founders small seed 7, Jon Gunnarsson, year 35): the lines of that year before and after, in the notes (about 40 before, nearly all “Helped at”).
Cost: the view folds only the years it shows; nothing kept in st.
Notes / questions:
16 Nov 2026 (playtest, founders small seed 7, 80 years in the page): a person’s History was mostly “Helped at …” (Jon Gunnarsson’s year 35 alone filled the tab), and a farm’s listed “A crop at Östergården was lost to frost” four times on one day; a marriage, a farm taken over or a cause taken up had to be searched for. Cost rule 8 (routine events fold into yearly counts) is about the record’s size; this is the view, and may share its list of routine kinds.
Runs one at a time with VB-1101, which touches src/sim/notable.js too.
16 Nov 2026 (the parallel session “Gameplay review and feedback”: founders small seed 7, 75 years headless, one played pawn; its evidence added at the user’s request): from year 50 to 62 Jon’s chronicle held 40 “Received N grain” lines, one a season; VB-1114 makes a year’s help one line and a mark on the farm.
17 Nov 2026 (reviewed after the merge with main, 354 commits on from the playtests’ base; the code facts checked again): stands. VB-1027 made a farm’s History tell who left and who came from the one event of a move; the fold is built on chronicle as it now is.
Done (VB-1102), decisions:
Routine list ROUTINE in src/sim/notable.js: helped (a day among neighbours), frost, herdBirths, herdDeath (each takes one crop or beast, repeats through the year), harvest (once a farm a year). Births, deaths, marriages, land, customs never fold. received grain lines are not a record kind found here (VB-1114 owns them).
The fold is foldRows, reached by Sim.chronicle(st, q, group, limit); without limit rows are raw (existing callers unchanged). It folds from the newest until limit lines, so only the years shown; the rest is rows.rest. Nothing in st. Page: a fold is a <details>.
The birth-vs-fold test reads “birth first by time” as chronological; newest first the fold comes first.
Measure NOT matching the ~40: my rerun (founders small seed 7, 36 years, Jon Gunnarsson id 13, year index 35) had 7 lines before, 2 after (the playtest’s save was a different run: the page’s 80 years). Left unticked.