6 Commits

Author SHA1 Message Date
hsiegeln
2f0a45f487 chore: bump package.json + package-lock auf 1.4.1
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 3m59s
Patch-Release: fix fuer $effect-Loop auf der Startseite (sort=viewed)
und Wunschliste-Card-Layout auf Mobile.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 16:24:58 +02:00
hsiegeln
a68b99c807 fix(wishlist): 2-Spalten-Grid auf Mobile statt stacked Footer
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 2m17s
Der stacked Card-Footer liess unter dem Bild (96x96) eine tote
Weissflaeche entstehen — Buttons rechts unten, links leer, unaufgeraeumt.

Neues Layout auf <=600px: Card ist 2-Spalten-Grid (96px | 1fr), Bild
spannt vertikal ueber alle Rows, rechts stapeln sich Titel -> Meta ->
Actions direkt untereinander. `display: contents` auf .body/.text zieht
die DOM-Kinder ohne Markup-Umbau in die Grid-Cells.

Ergebnis: Card-Hoehe orientiert sich am Content, keine toten Zonen,
Bild fuellt seinen Streifen vertikal, Buttons sitzen eng unter der Meta
(0.5rem padding) — tap-friendly ohne Kleben.

Getestet: svelte-check 0 errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 16:05:28 +02:00
hsiegeln
2573f80940 style(wishlist): Actions als Card-Footer ohne Trenner
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 2m15s
Auf Mobile wirkten die Buttons in der abgesetzten grauen Row mit
border-top etwas verloren. Nun sitzen sie im gleichen weissen
Card-Background ohne Border/Background-Wechsel — das Footer-Padding
reicht als visuelle Trennung, die Buttons gehoeren erkennbar zur Card.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:50:12 +02:00
hsiegeln
0a97ea2fea fix(wishlist): Card stacked auf Mobile, Titel-Overflow behoben
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 2m15s
Auf schmalen Viewports (~390px) ueberlagerten die drei Action-Buttons
den Titel: .text reservierte 170px padding-right, aber nach 96px Bild
+ Gaps blieb kaum Platz fuer den Titel — lange Woerter wie
"Spaetzle-Pfanne" liefen hinter die Buttons.

Fix: @media (max-width: 600px) — Card wird flex-direction:column,
Actions-Row rutscht aus position:absolute in eine statische Reihe mit
border-top unter dem Body, full-width. Zusaetzlich overflow-wrap +
word-break als Safety-Net gegen bindestrich-gefuellte Monstertitel.

Desktop-Layout unveraendert.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:39:12 +02:00
hsiegeln
12f499cb98 fix(home): $effect-Loop bei sort=viewed via untrack
Der Profile-Switch-Refetch-Effect las allLoading in der sync tracking-
Phase. Der await fetch beendete die Sync-Phase, das finale
allLoading = false im finally lief ausserhalb → wurde als externer
Write interpretiert → Effect rerun → naechster Fetch → Endlosschleife.

2136 GETs auf /api/recipes/all?sort=viewed in 8s beobachtet.

Fix: nur profileStore.active bleibt tracked (der tatsaechliche
Trigger). allSort/allLoading werden in untrack() gelesen — die Writes
auf allLoading im finally triggern damit keinen Effect-Rerun mehr.

Verifiziert lokal: 1 Request statt 2000+ bei mount mit allSort=viewed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:39:02 +02:00
hsiegeln
829850aa88 chore: bump package.json + package-lock auf 1.4.0
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 3m21s
Tag v1.4.0 ist schon gesetzt (auf 2b0bd4d), der synchrone Version-Bump
in package.json und package-lock.json wurde dabei vergessen. Mit dem
Pattern aus vorigen Releases (v1.2.0/v1.3.0) wieder konsistent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 14:58:45 +02:00
4 changed files with 77 additions and 24 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "kochwas",
"version": "1.3.0",
"version": "1.4.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "kochwas",
"version": "1.3.0",
"version": "1.4.1",
"dependencies": {
"@google/generative-ai": "^0.24.1",
"@types/archiver": "^7.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "kochwas",
"version": "1.3.0",
"version": "1.4.1",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import { onMount, tick } from 'svelte';
import { onMount, tick, untrack } from 'svelte';
import { page } from '$app/stores';
import { CookingPot, X, ChevronDown } from 'lucide-svelte';
import { slide } from 'svelte/transition';
@@ -235,12 +235,17 @@
// profiles, refetch with the new profile_id so the list reflects what
// the *current* profile has viewed. Other sorts are profile-agnostic
// and don't need this.
//
// Only `profileStore.active` must be a tracked dep. `allSort` /
// `allLoading` are read inside untrack: otherwise the `allLoading = false`
// write in the fetch-finally would re-trigger the effect and start the
// next fetch → endless loop.
$effect(() => {
const active = profileStore.active;
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
profileStore.active;
untrack(() => {
if (allSort !== 'viewed') return;
if (allLoading) return;
// Re-fetch the first page; rehydrate would re-load the previous
// depth, but a sort-context change should reset to page 1 anyway.
void (async () => {
allLoading = true;
try {
@@ -253,10 +258,9 @@
} finally {
allLoading = false;
}
// 'active' is referenced so $effect tracks it as a dep:
void active;
})();
});
});
// Sync current query back into the URL as ?q=... via replaceState,
// without spamming the history stack. Pushing a new entry happens only

View File

@@ -284,6 +284,8 @@
font-weight: 600;
font-size: 1rem;
line-height: 1.3;
overflow-wrap: break-word;
word-break: break-word;
}
.meta {
display: flex;
@@ -340,4 +342,51 @@
font-size: 0.85rem;
font-weight: 600;
}
/* Handy: 2-Spalten-Grid — Bild links ueber alle Rows, rechts stapeln
sich Titel, Meta, Actions. `display: contents` auf .body/.text zieht
die DOM-Kinder direkt in die Card-Grid, ohne Markup-Umbau. Vermeidet
die tote Weissflaeche unter dem Bild bei schmalen Viewports. */
@media (max-width: 600px) {
.card {
display: grid;
grid-template-columns: 96px 1fr;
grid-template-areas:
'img title'
'img meta'
'img actions';
column-gap: 0;
}
.body {
display: contents;
}
.body img,
.placeholder {
grid-area: img;
width: 96px;
height: 100%;
min-height: 100%;
}
.text {
display: contents;
}
.title {
grid-area: title;
padding: 0.7rem 0.75rem 0.15rem;
}
.meta {
grid-area: meta;
padding: 0 0.75rem;
margin-top: 0;
}
.actions-top {
grid-area: actions;
position: static;
display: flex;
gap: 0.4rem;
padding: 0.5rem 0.75rem 0.7rem;
justify-content: flex-end;
align-self: end;
}
}
</style>