The estimate column is hidden on phones, so add a small 'est X kr · ½kg Y kr'
line under each item name, shown only on mobile. The ½kg (per-500g) price is
computed for weight items (line price ÷ kg × 0.5). The est column (desktop)
and this line now show the *computed* per-row price (offer price × quantity,
or quantity-scaled estimate), so each row matches what the total adds up.
A generic catalog item (e.g. 'Entrecote ½ kg') could match a premium offer
(Wagyu 250 €/kg, US-Beef), inflating the estimate — correct math, wrong
product. Tell the matcher to pick the ordinary/standard variant at the lowest
price and avoid premium/luxury (Wagyu, Dry-Aged, US-Beef, øko-premium) unless
the item names it. No price caps (that would be guesswork) — the estimate
stays raw offer price × quantity. Version marker in the match signature forces
a re-match so the new logic takes effect.
In 'Tilføj vare', taking/choosing a photo now sends it (downscaled client-
side) to Claude vision, which identifies the product and returns a Danish
name, German name, best-fit catalog section and a short note. The form is
prefilled and the suggested category shown — you just confirm and type the
price. Full photo is still uploaded on submit. Degrades gracefully: no
credential or a failed call just falls back to manual entry.
- /api/item/analyze (vision via _claude_json, now accepts image content)
- VISION_MODEL (Haiku by default; bump to sonnet via env for harder photos)
- Remove the outdated 'Uge 23–25 · 03.06–23.06.2026' from the header, title,
footer and analyse page
- Change the store from Langberger Weg 4, Flensburg to CITTI Lübeck
(Herrenholz 14) across index/analyse/footer
- Add a '📄 Se hele avisen hos CITTI Lübeck' link on /tilbud to
cittimarkt.de/angebote — the real German/Lübeck offers page, not the Danish
Flensburg booklet that misled which offers apply in Lübeck
Estimeret total used each row's fixed line estimate, so changing a quantity
(6 → 8) didn't move the price or the per-day budget unless the item matched a
weight offer. Now scale an unmatched item's estimate by the quantity ratio
(current number ÷ default number via qtyNum), so doubling the amount ~doubles
its estimate. Combined with updateQty→recalcAll, price and budget update live
on every quantity edit.
Editing a quantity always saved, but the 'modified' class painted the field
accent-red, which read as a validation error ('can't change it'). Recolor it
to the green success style used by the actual-price field. Also make updateQty
call recalcAll so the estimate/budget react to quantity changes too, not just
the meal stats.
When a catalog item matches a current Lübeck offer, compute its line cost
from the offer instead of the hardcoded estimate: offer price is per unit
(e.g. per 100 g), so multiply by the item's quantity (qtyToKg × €/kg × rate).
Only weight-based offers (g/kg) are converted — units that can't be matched
cleanly keep the estimate, so the total never goes garbage. Data-offer-*
attrs on matched rows; recalcAll prefers the offer line price. The total (and
the budget-per-day) now move toward actual prices as matches land.
- New budget block: 'Pris pr. aftensmadsdag' = Estimeret total ÷
Aftensmadsdage, checked against a ~200 kr/day budget (green 'holder ✓',
red 'over budget' with accent background). Updates live with the list.
- Estimeret besparelse is no longer a hardcoded ~1.800: it's 35% of actual
spend once prices are entered, else 35% of the live estimate.
Picked offers were only marked by a checked box + faint green bg, easy to
miss while scrolling 467 offers (so you'd try to re-add them). Add a green
'✓ på seddel' badge + green left border on picked offers, and a '✓ Kun
valgte' filter button to show only what's already on the list. Driven by the
existing .picked class, so it updates instantly on pick/unpick.
Expand 'Basisvarer — husk ved CITTI' into 7 categories (Grundvarer, Protein,
Grønt & frugt, Mejeri, Køl & frys, Husholdning, Krydderier) with German names
for in-store navigation. Compared against the existing CITTI catalog so
nothing is duplicated (ris/pasta/konserves/tun/olier/frozen veg/soya/
cleaning already covered). Added 'Ris (stor pose)' by request; skipped items
the user already keeps at home (sennep/honning/eddike/sølvpapir) and fresh
veg (frozen veg covers it). Checkoffs persist and are offline-safe.
Add a 'Basisvarer — husk ved CITTI' checklist for everyday staples the user
wants to buy at CITTI rather than in DK: Rugbrød, Bananer, Havregryn,
Tomater, Toiletpapir — each with a German name for in-store navigation.
Checkoffs persist (prices table, keyed basis-*) and are offline-safe via
saveToServer/cittiFetch. Skips Kyllingebryst/Kaffe/Opvasketabs, which are
already in the CITTI catalog.
2026-10-30 13:07:54 +01:00
4 changed files with 314 additions and 27 deletions
{% if last_refresh %}Opdateret {{ last_refresh[:16].replace("T"," ") }} · {% endif %}{{ total }} tilbud
{% if last_refresh %}Opdateret {{ last_refresh[:16].replace("T"," ") }} · {% endif %}{{ total }} tilbud<br>
<ahref="https://www.cittimarkt.de/angebote"target="_blank"rel="noopener"style="color:var(--accent);font-weight:600;text-decoration:none">📄 Se hele avisen hos CITTI Lübeck →</a>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.