feat: pantry notes/categories, ingredient-alias matching, cook-log edit/delete, fork-list popover (v0.83.0)

Pantry: notes + category fields (collapsible grouping like the shopping list), a "Merge duplicates" cleanup action, and fixed quantity display precision (was showing raw decimal(10,4) strings like "0.3333 kg" everywhere — pantry, shopping list, print views, Markdown exports).

Ingredient-alias matching: the ingredients table (canonical name + aliases) existed but was never populated or used. Seeded ~10 bilingual EN/FR staples and wired resolution into pantry add/edit, can-cook scoring, auto-deduct-on-cook, and shopping-list pantry-awareness, so "sel"/"sel fin"/"table salt" are recognized as the same ingredient.

Cook log: entries from "Mark cooked" can now be edited and deleted (previously log-only, no fix-a-mistake path). The "Cooked N times" text is a hover tooltip listing every date and opens a full manage sheet on click.

Also: the "Forked by N others" backlink is now a click-to-open popover instead of an always-inline list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-24 15:13:33 +02:00
parent a488b544dc
commit 93936eae10
37 changed files with 7255 additions and 117 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ import { auth } from "@/lib/auth/server";
import { db, pantryItems, eq, asc } from "@epicure/db";
import { PrintTrigger } from "@/components/recipe/print-trigger";
import { getMessages, formatMessage } from "@/lib/i18n/server";
import { formatQuantity, hasQuantity } from "@/lib/fractions";
export default async function PantryPrintPage() {
const session = await auth.api.getSession({ headers: await headers() });
@@ -73,7 +74,7 @@ export default async function PantryPrintPage() {
return (
<tr key={item.id}>
<td>{item.rawName}</td>
<td>{[item.quantity, item.unit].filter(Boolean).join(" ") || "—"}</td>
<td>{[hasQuantity(item.quantity) ? formatQuantity(parseFloat(item.quantity!)) : null, item.unit].filter(Boolean).join(" ") || "—"}</td>
<td className={expiryClass}>
{exp
? daysLeft !== null && daysLeft < 0
@@ -5,6 +5,7 @@ import { auth } from "@/lib/auth/server";
import { db, shoppingLists, eq, and } from "@epicure/db";
import { PrintTrigger } from "@/components/recipe/print-trigger";
import { getMessages, formatMessage } from "@/lib/i18n/server";
import { formatQuantity, hasQuantity } from "@/lib/fractions";
type Params = { params: Promise<{ id: string }> };
@@ -109,7 +110,7 @@ export default async function ShoppingListPrintPage({ params }: Params) {
<li key={item.id} className={item.checked ? "checked" : ""}>
<span className="check" />
<span className="qty">
{[item.quantity, item.unit].filter(Boolean).join(" ")}
{[hasQuantity(item.quantity) ? formatQuantity(parseFloat(item.quantity!)) : null, item.unit].filter(Boolean).join(" ")}
</span>
<span>{item.rawName}</span>
</li>