From 3713cee2819d7ed54cca9b57149586aa1e4585a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kai=20B=C3=B6hm?=
Date: Sun, 8 Nov 2026 07:23:59 +0000
Subject: [PATCH] 26.11.47: heart on every wish card makes it my dish
- Heart top right on each card; filled means my dish
- Tapping an unwished dish's heart wishes it and sets it mine in one
transaction (setMine with wishIn); no token, nothing happens
- Tapping a filled heart takes it back, the wish stays
- Other people's dish now shows as a line under the title
- Options sheet keeps "Als mein Gericht"
Co-Authored-By: Claude Opus 5.5
Claude-Session: https://claude.ai/code/session_01HUc2nv7rJVU2gp3Bgtha3q
---
CLAUDE.md | 4 ++--
OlaresManifest.yaml | 4 ++--
app/api/wishes/mine/route.ts | 4 ++--
components/wishes/wish-board.tsx | 34 ++++++++++++++++++++++----------
docs/entscheidungen.md | 9 +++++++++
e2e/kinder.spec.ts | 7 +++----
e2e/wuenschen.spec.ts | 24 ++++++++++++++++++++++
lib/wishes.ts | 18 +++++++++++++----
messages/de.json | 6 ++++--
messages/en.json | 6 ++++--
messages/es.json | 6 ++++--
messages/fr.json | 6 ++++--
olares/Chart.yaml | 4 ++--
olares/OlaresManifest.yaml | 4 ++--
olares/markt/26.11.47.md | 5 +++++
tests/my-dish.test.ts | 17 ++++++++++++++++
16 files changed, 122 insertions(+), 36 deletions(-)
create mode 100644 olares/markt/26.11.47.md
diff --git a/CLAUDE.md b/CLAUDE.md
index 219827a..15f9ab4 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -7,7 +7,7 @@
> **Plattform:** Olares One (Kubernetes), Repo und CI auf Gitea — kein Supabase,
> kein Vercel (E-0001). Eigene Gestaltung, nicht AImighty (E-0002).
> Verteilung über den Markt, Repo öffentlich (E-0005).
-> **Status:** 26.11.46 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut:
+> **Status:** 26.11.47 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut:
> Anmeldung (Passkeys, Kinder mit Gerät + PIN), Gerichte (Link, Kochbuchfoto, AI über den
> Olares Router), Wünschen, Plan, Einkaufsliste (Echtzeit, offline), Kochmodus mit
> Bewertung, Web-App; Einzahl bei Stück-Mengen (26.11.15), Preise und Kosten mit Ampel
@@ -22,7 +22,7 @@
> (26.11.39, E-0016), Anmelden per Mail-Link über Resend (26.11.40, E-0017; nur
> anmelden, keine Geräte oder Passkeys aus einer Mail-Sitzung), Leiste bleibt nach der
> Tastatur unten (26.11.41), Icon Kochmütze mit Herz (26.11.42), Fotos aus der Mediathek (26.11.43), gleich große Karten (26.11.44), Runde beenden/löschen/ändern,
-> Tage je Gericht von Hand und Kalender-Abo je Haushalt (26.11.45, E-0018), Einkaufsliste einsprechen (26.11.46). Offen: Kai trägt
+> Tage je Gericht von Hand und Kalender-Abo je Haushalt (26.11.45, E-0018), Einkaufsliste einsprechen (26.11.46), Herz für „Mein Gericht“ auf jeder Wunschkarte (26.11.47). Offen: Kai trägt
> den Resend-Schlüssel unter Mehr › Mails verschicken ein und abonniert den Kalender-Link einmal auf dem iPhone.
> **Letzte Aktualisierung:** 8. November 2026
diff --git a/OlaresManifest.yaml b/OlaresManifest.yaml
index e379235..20fedf0 100644
--- a/OlaresManifest.yaml
+++ b/OlaresManifest.yaml
@@ -21,7 +21,7 @@ metadata:
title: foodplanhero
description: Plan. Cook. Smile. The family decides together what's for dinner — and the shopping list writes itself. Runs entirely on your own box.
icon: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
- version: 26.11.46
+ version: 26.11.47
categories:
- Applications
@@ -61,7 +61,7 @@ permission:
appData: true
spec:
- versionName: '26.11.46'
+ versionName: '26.11.47'
featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
promoteImage:
diff --git a/app/api/wishes/mine/route.ts b/app/api/wishes/mine/route.ts
index 18a5218..e39a900 100644
--- a/app/api/wishes/mine/route.ts
+++ b/app/api/wishes/mine/route.ts
@@ -10,10 +10,10 @@ export const dynamic = "force-dynamic";
export async function POST(request: Request) {
const session = await guardWrite(request, [...WISHERS]);
if (isResponse(session)) return session;
- const body = z.object({ dishId: z.string().uuid(), mine: z.boolean() }).safeParse(await readJson(request));
+ const body = z.object({ dishId: z.string().uuid(), mine: z.boolean(), wish: z.boolean().optional() }).safeParse(await readJson(request));
if (!body.success) return fail("invalid", 400);
try {
- await withHousehold(session.householdId, (c) => setMine(c, session.memberId, body.data.dishId, body.data.mine));
+ await withHousehold(session.householdId, (c) => setMine(c, session.memberId, body.data.dishId, body.data.mine, body.data.wish ? { wishIn: session.householdId } : {}));
return json({ ok: true });
} catch (error) {
if (error instanceof WishRefused) return fail(error.reason, 409);
diff --git a/components/wishes/wish-board.tsx b/components/wishes/wish-board.tsx
index c968274..7415c4b 100644
--- a/components/wishes/wish-board.tsx
+++ b/components/wishes/wish-board.tsx
@@ -97,7 +97,6 @@ export function WishBoard({
const mineOf = (id: string) => (byDish.get(id) ?? []).filter((e) => e.isMine);
const myDish = entries.find((e) => e.memberId === me && e.isMine);
const myDishTitle = myDish ? tiles.find((x) => x.id === myDish.dishId)?.title : null;
- const wishedSomething = entries.some((e) => e.memberId === me && !e.isVeto);
const shown = applyFilter(tiles, filter);
async function call(method: string, url: string, body?: object, key = "x") {
@@ -174,12 +173,12 @@ export function WishBoard({
{t("mineChosen", { title: myDishTitle })}
- ) : wishedSomething ? (
+ ) : (
{t("mineHint")}
- ) : null}
+ )}
{error ? {t(`errors.${error}`)} : null}
{message ? (
@@ -218,12 +217,6 @@ export function WishBoard({
) : null}
- {mineNames.length ? (
-
-
- {isMyDish ? t("mine") : t("mineOf", { names: mineNames.filter((n) => n !== t("you")).join(", ") })}
-
- ) : null}
{favorite ? (
@@ -234,7 +227,12 @@ export function WishBoard({
{tile.title}
{favorite ? {t("favorite")} : null}
- {mineNames.length ? {isMyDish ? t("mine") : t("mineOf", { names: mineNames.join(", ") })} : null}
+ {mineNames.length ? (
+
+
+ {isMyDish ? t("mine") : t("mineOf", { names: mineNames.filter((n) => n !== t("you")).join(", ") })}
+
+ ) : null}
{names.length ? {t("wishedBy", { names: names.join(", ") })} : null}
{vetoList.length && !mineNames.length ? (
@@ -244,6 +242,22 @@ export function WishBoard({
) : null}
+ {/* Herz (Kai, 8.11.2026, 26.11.47): ein Tipp macht das Gericht zu meinem —
+ noch nicht gewünscht, wird es dabei gewünscht (ein Jeton). */}
+ {own?.isVeto || own?.viaVeto ? null : (
+
+ )}