feat(app): ask 'how did it do?' when a harvest is noted (schema v13)

The note growers most wish they had two seasons later — did it do well,
was it worth keeping — never had a home. New append-only GardenOutcomes
table (lotId, season year, three-face rating, free note); the question
appears ONCE, inline, right after recording a harvest in the batch story,
and is skippable without a trace. The answer shows as one more story
line. Rides backups/sync like every mutable table (JSON codec, LWW
import, HLC clock absorb). Migration v12→v13 guarded + verified from
every historical version.
This commit is contained in:
vjrj 2026-07-18 12:18:25 +02:00
parent 92fd84590b
commit bb5b3d4a43
20 changed files with 6030 additions and 15 deletions

View file

@ -139,6 +139,23 @@ void main() {
}
});
test('includes garden outcomes as story lines', () async {
final lotId = await newLot();
await repo.addGardenOutcome(
lotId: lotId,
year: 2026,
rating: GardenOutcomeRating.good,
notes: 'true to type, keeping it',
);
final history = await repo.lotHistory(lotId);
final outcome = history.singleWhere(
(e) => e.kind == LotHistoryKind.gardenOutcome,
);
expect(outcome.rating, GardenOutcomeRating.good);
expect(outcome.year, 2026);
expect(outcome.notes, 'true to type, keeping it');
});
test('ignores other lots', () async {
final lotId = await newLot();
final otherLot = await newLot();