Release: leftovers, the real dish list, and a day list that stays put #2

Merged
Kessinen merged 3 commits from dev into main 2026-09-05 20:24:02 +00:00
3 Commits
Author SHA1 Message Date
Esa Kataja 768ab50140 Expand the selected day where it sits
Choosing a day from the list made the page jump around. Two causes, both
structural.

The editing panel lived above the list, so opening a day swapped content in
at the top and pushed everything down. And the selected day was then skipped
when rendering the list — to avoid showing it twice — so every row below it
slid up under the tap.

The day list is now the page. The selected day expands in place and every
other row stays exactly where it was. Anchors carry the viewport to the day
rather than the top of the document, and links inside the open day keep the
anchor, so picking a dish or cancelling does not throw the page back up.
Saving and deleting redirect to the same anchor, leaving the viewport where
the work was happening. The history window stretches to reach the selected
day, which would otherwise have no row to open in.

The open day is marked with a bar down its left side rather than rules above
and below: the rows either side already draw a bottom border, so a horizontal
rule doubled up with it on any day but the first.
2026-09-05 23:21:26 +03:00
Esa Kataja d743327cd2 Add Tähteet, and the real household dish list
Tähteet is leftovers. It is not food: it exists so a day can be recorded as
"we ate what was already there" without inventing a meal nobody cooked.

Modelled as a row flagged `special` rather than a nullable main_dish_id on
the log, so every foreign key and join carries on working. Migration 0002
creates it; the household never adds, edits or deletes it, and it never
appears in the catalog. It is loggable exactly like a real meal and sits on
the board apart from the categories, muted and at fixed size — it will be
among the most-logged entries and should not tower over the actual cooking.

It carries no category, which is why it could not be an ordinary main: those
must have at least one. That also exposed a bug in CategoryKey, which
returned the mixed Sekalaiset mark for anything that was not exactly one
category — so *no* categories drew the same icon as *several*. Zero now means
not food and gets its own mark, a lidded tub in grey rather than a category
colour. The fix reaches the board, the sides step, the logged card and the
history at once, since they all ask the same function.

PRD §6 records the hard requirement: the stage 2 suggester must never propose
it, so cooldown, coverage and weighting all skip it despite how often it is
logged.

The seed bundle is now the household's real list, taken from a JSON file
written in December 2024: 37 mains and 9 sides. Letut and Pannari were
dropped as not being dinners, Kanakintut folded into Broilerin koipireidet,
and has_sides assigned by rule — soups, casseroles, laatikko, kiusaus,
risotto and pasta dishes take none; sauces, patties and roasts do.

Two tests failed immediately on the migration because they hardcoded id 1,
which the new row now occupies. Moved clear of it.
2026-09-05 23:11:58 +03:00
Esa Kataja 2a148aa2a8 Make releases push what they built
A release reported success while uploading the previous one a second time.
Three separate faults, one of which hid the others.

release declared image and push as prerequisites. Make runs targets in
parallel by default here (-j16), so push resolved a tag and uploaded :latest
before image had finished building and tagging. They are sub-makes now, as
check already was.

push re-derived the tag with `git tag --sort=-creatordate | head -1`. That is
ambiguous when two tags point at the same commit, so it could pick the wrong
one even without a race — and re-deriving is what made the race possible at
all. image now records what it built in .release-tag and push reads it.

Nothing compared what was built against what arrived, so the failure was
silent: the build log said "Successfully tagged v...-3" while the registry
received the older image. push now pulls each tag back afterwards and
compares image ids, failing if the registry serves something else.

The tag ambiguity surfaced because a test of the failure path did not fail.
That was worth more than the fix it was checking.
2026-09-05 22:42:30 +03:00