Offer Search again only where the photo backfill runs (Maestro 7a468d2d, review F1/F2)
F1: every dinner response now carries photo_backfill_eligible, computed by the exported dinners.PhotoBackfillEligible: the condition ListPhotoBackfillDinners lists by and GroundFailedDinner and RefailDinnerGrounding write under (unarchived, failed, no photo, no pasted recipe_url). A test holds the flag to ListPhotoBackfillDinners for an eligible dinner and for grounded, linked and archived ones. The fix-recipe sheet shows "Search again" only when the flag is set, so a dinner with a pasted link is never offered it, whatever its reason. F2: a dinner absent from the backfill result now reads "This dinner was not included in that search." instead of claiming a pasted link. Task: 7a468d2d-4a9b-45f2-b626-a7bed5f671df Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,11 @@ type Dinner struct {
|
||||
UpdatedBy *string `json:"updated_by"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
|
||||
// PhotoBackfillEligible is whether a photo backfill grounds the dinner
|
||||
// (PhotoBackfillEligible): false for one with a pasted recipe link,
|
||||
// which a search never replaces.
|
||||
PhotoBackfillEligible bool `json:"photo_backfill_eligible"`
|
||||
}
|
||||
|
||||
// NewRegular is a Regular to add: its Name, which the household always
|
||||
@@ -712,6 +717,8 @@ func fromRow(r db.Dinner) Dinner {
|
||||
UpdatedBy: nullString(r.UpdatedBy),
|
||||
CreatedAt: r.CreatedAt,
|
||||
UpdatedAt: r.UpdatedAt,
|
||||
|
||||
PhotoBackfillEligible: PhotoBackfillEligible(r),
|
||||
}
|
||||
if r.MinutesTotal.Valid {
|
||||
d.MinutesTotal = &r.MinutesTotal.Int64
|
||||
|
||||
Reference in New Issue
Block a user