@shopbite-de/storefront 1.26.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.github/workflows/build.yaml +1 -1
  2. package/.github/workflows/ci.yaml +3 -3
  3. package/.gitignore +40 -0
  4. package/CLAUDE.md +10 -3
  5. package/app/app.vue +4 -1
  6. package/app/components/Hero.vue +17 -7
  7. package/app/components/Product/CrossSelling.vue +137 -24
  8. package/app/components/Product/DeselectIngredient.vue +9 -2
  9. package/app/components/Product/Detail.vue +16 -18
  10. package/app/components/Product/QuickView.vue +5 -4
  11. package/app/components/User/RegistrationForm.vue +73 -29
  12. package/app/composables/useStoreStatus.ts +12 -7
  13. package/app/composables/useSyncWishlist.ts +119 -0
  14. package/app/pages/[...all].vue +9 -3
  15. package/app/pages/index.vue +1 -5
  16. package/app/pages/kontakt.vue +1 -5
  17. package/app/pages/registrierung/bestaetigen.vue +100 -27
  18. package/app/pages/registrierung/index.vue +20 -1
  19. package/app/utils/notFound.ts +14 -0
  20. package/content/index.yml +9 -9
  21. package/docs/notes/2026-09-17-quick-view-compact-options.md +63 -0
  22. package/docs/notes/2026-09-21-dependency-update.md +89 -0
  23. package/docs/notes/2026-09-21-issue-273-cache-and-demo-video.md +49 -0
  24. package/docs/notes/2026-09-21-issue-363-non-fatal-404.md +43 -0
  25. package/docs/notes/2026-09-21-issue-365-home-hydration-mismatch.md +47 -0
  26. package/docs/notes/2026-09-21-issue-366-wishlist-404.md +41 -0
  27. package/docs/notes/2026-09-21-issue-369-register-confirm.md +35 -0
  28. package/modules/public-cache.ts +44 -0
  29. package/node.dockerfile +3 -3
  30. package/nuxt.config.ts +6 -0
  31. package/package.json +26 -26
  32. package/patches/@shopware__nuxt-module@1.5.2.patch +13 -0
  33. package/pnpm-workspace.yaml +3 -1
  34. package/shopware.d.ts +1 -1
  35. package/test/nuxt/Hero.test.ts +60 -2
  36. package/test/nuxt/ProductCrossSelling.test.ts +99 -0
  37. package/test/nuxt/RegisterConfirmPage.test.ts +117 -0
  38. package/test/nuxt/RegistrationForm.test.ts +132 -2
  39. package/test/nuxt/notFound.test.ts +13 -0
  40. package/test/nuxt/useSearchTracking.test.ts +3 -0
  41. package/test/nuxt/useStoreStatus.test.ts +40 -10
  42. package/test/nuxt/useSyncWishlist.test.ts +85 -0
  43. package/test/unit/publicCache.spec.ts +64 -0
  44. package/patches/@shopware__nuxt-module@1.5.1.patch +0 -32
@@ -11,7 +11,10 @@ const formatTime = (date: Date) =>
11
11
  * Whether the store is open right now, with the closing time of the current
12
12
  * interval or the next opening. `null` until business hours and holidays are
13
13
  * loaded. Client only: the browser's clock and time zone decide, the server's
14
- * would not match the shop's (#275).
14
+ * would not match the shop's (#275). The clock starts when the component is
15
+ * mounted, so the status is also `null` on the server and during hydration:
16
+ * the home page prefetches the hours on the server (`useRestaurantSchema`),
17
+ * and a status rendered there mismatched the browser's (#365).
15
18
  */
16
19
  export function useStoreStatus() {
17
20
  const {
@@ -22,15 +25,17 @@ export function useStoreStatus() {
22
25
  } = useBusinessHours();
23
26
  const { holidays, isClosedHoliday } = useHolidays();
24
27
 
25
- const now = ref(new Date());
26
- useIntervalFn(() => {
28
+ const now = ref<Date | null>(null);
29
+ const tick = () => {
27
30
  now.value = new Date();
28
- }, 60_000);
31
+ };
32
+ onMounted(tick);
33
+ useIntervalFn(tick, 60_000);
29
34
 
30
35
  const status = computed<StoreStatus | null>(() => {
31
- if (!businessHours.value || !holidays.value) return null;
32
-
33
36
  const current = now.value;
37
+ if (!current || !businessHours.value || !holidays.value) return null;
38
+
34
39
  if (isStoreOpen(current, isClosedHoliday)) {
35
40
  const interval = getServiceIntervals(current).find(
36
41
  ({ start, end }) => current >= start && current <= end,
@@ -40,7 +45,7 @@ export function useStoreStatus() {
40
45
 
41
46
  return {
42
47
  open: false,
43
- nextOpening: getNextOpeningTime(now, isClosedHoliday),
48
+ nextOpening: getNextOpeningTime(now as Ref<Date>, isClosedHoliday),
44
49
  };
45
50
  });
46
51
 
@@ -0,0 +1,119 @@
1
+ import { ApiClientError } from "@shopware/api-client";
2
+ import type { ComputedRef, Ref } from "vue";
3
+ import type { Schemas } from "#shopware";
4
+
5
+ /**
6
+ * Overrides `useSyncWishlist` of the `@shopware/composables` layer (1.13.0),
7
+ * including its use inside the layer's `useWishlist`. The only change: a
8
+ * customer without a wishlist (404) or a shop with the wishlist disabled (403)
9
+ * is an expected state and not logged as an error (#366).
10
+ */
11
+ export type UseSyncWishlistReturn = {
12
+ getWishlistProducts(
13
+ defaultSearchCriteria?: Schemas["Criteria"],
14
+ ): Promise<void>;
15
+ mergeWishlistProducts(itemsToMerge: string[]): void;
16
+ addToWishlistSync(id: string): void;
17
+ removeFromWishlistSync(id: string): void;
18
+ items: ComputedRef<string[]>;
19
+ count: ComputedRef<number>;
20
+ currentPage: ComputedRef<number>;
21
+ limit: ComputedRef<number>;
22
+ products: ComputedRef<Schemas["Product"][]>;
23
+ isLoading: Ref<boolean>;
24
+ };
25
+
26
+ const EXPECTED_WISHLIST_ERRORS = [
27
+ "CHECKOUT__WISHLIST_NOT_FOUND",
28
+ "CHECKOUT__WISHLIST_IS_NOT_ACTIVATED",
29
+ ];
30
+
31
+ function isExpectedWishlistError(error: unknown): boolean {
32
+ const errors = error instanceof ApiClientError ? error.details?.errors : null;
33
+ return (
34
+ Array.isArray(errors) &&
35
+ errors.some((e) => EXPECTED_WISHLIST_ERRORS.includes(e.code))
36
+ );
37
+ }
38
+
39
+ const _wishlistItems: Ref<string[]> = ref([]);
40
+ const _wishlistProducts: Ref<Schemas["Product"][]> = ref([]);
41
+ const _currentPage: Ref<number> = ref(1);
42
+ const _limit: Ref<number> = ref(15);
43
+ const totalWishlistItemsCount: Ref<number> = ref(0);
44
+ const isLoading: Ref<boolean> = ref(false);
45
+
46
+ export function useSyncWishlist(): UseSyncWishlistReturn {
47
+ const { apiClient } = useShopwareContext();
48
+
49
+ async function addToWishlistSync(id: string) {
50
+ await apiClient.invoke(
51
+ "addProductOnWishlist post /customer/wishlist/add/{productId}",
52
+ {
53
+ pathParams: { productId: id },
54
+ },
55
+ );
56
+ }
57
+
58
+ async function removeFromWishlistSync(id: string) {
59
+ await apiClient.invoke(
60
+ "deleteProductOnWishlist delete /customer/wishlist/delete/{productId}",
61
+ {
62
+ pathParams: { productId: id },
63
+ },
64
+ );
65
+ }
66
+
67
+ async function getWishlistProducts(
68
+ defaultSearchCriteria?: Schemas["Criteria"],
69
+ ) {
70
+ try {
71
+ const response = await apiClient.invoke(
72
+ "readCustomerWishlist post /customer/wishlist",
73
+ { body: { ...defaultSearchCriteria, "total-count-mode": "exact" } },
74
+ );
75
+ _wishlistItems.value = [
76
+ ...response.data.products.elements.map((element) => element.id),
77
+ ];
78
+ _wishlistProducts.value = response.data.products.elements;
79
+ totalWishlistItemsCount.value = response.data.products.total ?? 0;
80
+ _currentPage.value = response.data.products.page ?? 1;
81
+ _limit.value = response.data.products.limit ?? 15;
82
+ } catch (error) {
83
+ if (!isExpectedWishlistError(error)) {
84
+ console.error("[useSyncWishlist][getWishlistProducts][error]:", error);
85
+ }
86
+ _wishlistItems.value = [];
87
+ _wishlistProducts.value = [];
88
+ totalWishlistItemsCount.value = 0;
89
+ }
90
+ }
91
+
92
+ async function mergeWishlistProducts(productIds: string[]) {
93
+ await apiClient.invoke(
94
+ "mergeProductOnWishlist post /customer/wishlist/merge",
95
+ {
96
+ body: { productIds },
97
+ },
98
+ );
99
+ }
100
+
101
+ const items = computed(() => _wishlistItems.value);
102
+ const count = computed(() => totalWishlistItemsCount.value);
103
+ const currentPage = computed(() => _currentPage.value);
104
+ const products = computed(() => _wishlistProducts.value);
105
+ const limit = computed(() => _limit.value);
106
+
107
+ return {
108
+ getWishlistProducts,
109
+ addToWishlistSync,
110
+ removeFromWishlistSync,
111
+ mergeWishlistProducts,
112
+ products,
113
+ items,
114
+ count,
115
+ currentPage,
116
+ isLoading,
117
+ limit,
118
+ };
119
+ }
@@ -7,14 +7,20 @@ const { data: page, error } = await useAsyncData(
7
7
  () => $fetch("/api/content/page", { query: { path: route.path } }),
8
8
  );
9
9
 
10
- if (error.value || !page.value) {
10
+ // A failing content server is a real error and stays fatal (logged); 4xx
11
+ // means there is no such page (the route rejects over-long paths with 400).
12
+ if ((error.value?.statusCode ?? 0) >= 500) {
11
13
  throw createError({
12
- statusCode: 404,
13
- statusMessage: `Page ${route.path} not found!`,
14
+ statusCode: 500,
15
+ statusMessage: "Page could not be loaded",
14
16
  fatal: true,
15
17
  });
16
18
  }
17
19
 
20
+ if (!page.value) {
21
+ throw createNotFoundError(`Page ${route.path} not found!`);
22
+ }
23
+
18
24
  usePageSeo({
19
25
  title: page.value?.title,
20
26
  description: page.value?.description,
@@ -5,11 +5,7 @@ const { data: page } = await useAsyncData("index", () =>
5
5
  $fetch("/api/content/home"),
6
6
  );
7
7
  if (!page.value) {
8
- throw createError({
9
- statusCode: 404,
10
- statusMessage: "Page not found",
11
- fatal: true,
12
- });
8
+ throw createNotFoundError();
13
9
  }
14
10
 
15
11
  const { site } = useRuntimeConfig().public;
@@ -3,11 +3,7 @@ import ContactForm from "~/components/Contact/Form.vue";
3
3
  const config = useRuntimeConfig();
4
4
 
5
5
  if (config.public.shopBite.feature.contactForm !== true) {
6
- throw createError({
7
- statusCode: 404,
8
- statusMessage: "Page not found",
9
- fatal: true,
10
- });
6
+ throw createNotFoundError();
11
7
  }
12
8
 
13
9
  useSeoMeta({
@@ -1,4 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { ApiClientError } from "@shopware/api-client";
3
+
2
4
  useSeoMeta({
3
5
  title: "Registrierung bestätigen",
4
6
  });
@@ -7,42 +9,113 @@ const route = useRoute();
7
9
  const toast = useToast();
8
10
 
9
11
  const { apiClient } = useShopwareContext();
12
+ const { refreshSessionContext } = useSessionContext();
13
+ const { refreshCart } = useCart();
14
+ const { mergeWishlistProducts } = useWishlist();
10
15
 
11
- const emParameter = computed(() => route.query.em as string | undefined);
12
- const hashParameter = computed(() => route.query.hash as string | undefined);
16
+ type ConfirmError = "invalid" | "already-confirmed";
13
17
 
14
- const { mergeWishlistProducts } = useWishlist();
18
+ const error = ref<ConfirmError | null>(null);
19
+
20
+ const errorMessages: Record<
21
+ ConfirmError,
22
+ { title: string; description: string }
23
+ > = {
24
+ invalid: {
25
+ title: "Bestätigung fehlgeschlagen",
26
+ description:
27
+ "Der Bestätigungslink ist ungültig oder unvollständig. Bitte öffne den Link aus der Bestätigungs-E-Mail erneut oder kontaktiere uns.",
28
+ },
29
+ "already-confirmed": {
30
+ title: "Konto bereits bestätigt",
31
+ description:
32
+ "Dein Konto ist schon bestätigt. Du kannst dich jetzt anmelden.",
33
+ },
34
+ };
35
+
36
+ function toConfirmError(e: unknown): ConfirmError {
37
+ const errors = e instanceof ApiClientError ? e.details?.errors : undefined;
38
+ if (
39
+ Array.isArray(errors) &&
40
+ errors.some((err) => err.code === "CHECKOUT__CUSTOMER_IS_ALREADY_CONFIRMED")
41
+ ) {
42
+ return "already-confirmed";
43
+ }
44
+ return "invalid";
45
+ }
46
+
47
+ async function confirmRegistration() {
48
+ const em = route.query.em;
49
+ const hash = route.query.hash;
50
+ if (typeof em !== "string" || typeof hash !== "string" || !em || !hash) {
51
+ error.value = "invalid";
52
+ return;
53
+ }
15
54
 
16
- await useAsyncData("register-confirm", async () => {
17
55
  try {
18
- if (!emParameter.value || !hashParameter.value) {
19
- throw new Error("Missing required parameters");
20
- }
21
-
22
- return await apiClient.invoke(
23
- "registerConfirm post /account/register-confirm",
24
- {
25
- body: {
26
- em: emParameter.value,
27
- hash: hashParameter.value,
28
- },
29
- },
30
- );
56
+ await apiClient.invoke("registerConfirm post /account/register-confirm", {
57
+ body: { em, hash },
58
+ });
31
59
  } catch (e) {
32
60
  console.error("Registration confirmation failed:", e);
33
- return null;
61
+ error.value = toConfirmError(e);
62
+ return;
34
63
  }
35
- });
36
64
 
37
- mergeWishlistProducts();
38
- toast.add({
39
- title: "Bestätigung erfolgreich!",
40
- description: "Jetzt anmelden und los legen.",
41
- color: "success",
42
- });
43
- navigateTo({ path: "/konto" });
65
+ // Shopware logs the customer in with the confirmation and switches the
66
+ // context token, so load the new session before opening the account.
67
+ await refreshSessionContext();
68
+ refreshCart();
69
+ mergeWishlistProducts();
70
+ toast.add({
71
+ title: "Bestätigung erfolgreich!",
72
+ description: "Willkommen, dein Konto ist jetzt aktiv.",
73
+ color: "success",
74
+ });
75
+ await navigateTo({ path: "/konto" });
76
+ }
77
+
78
+ // The route is client-side rendered (routeRules), so this never runs on the
79
+ // server.
80
+ confirmRegistration();
44
81
  </script>
45
82
 
46
83
  <template>
47
- <UContainer> Etwas ist schief gelaufen </UContainer>
84
+ <UContainer>
85
+ <div class="max-w-xl mx-auto mt-16">
86
+ <div
87
+ v-if="!error"
88
+ class="flex items-center justify-center gap-2 text-muted"
89
+ role="status"
90
+ >
91
+ <UIcon name="i-lucide-loader-circle" class="size-5 animate-spin" />
92
+ Registrierung wird bestätigt …
93
+ </div>
94
+ <UAlert
95
+ v-else
96
+ :color="error === 'already-confirmed' ? 'info' : 'error'"
97
+ variant="subtle"
98
+ :icon="
99
+ error === 'already-confirmed'
100
+ ? 'i-lucide-circle-check'
101
+ : 'i-lucide-circle-alert'
102
+ "
103
+ :title="errorMessages[error].title"
104
+ :description="errorMessages[error].description"
105
+ :actions="[
106
+ { label: 'Zur Anmeldung', to: '/anmelden', color: 'neutral' },
107
+ ...(error === 'invalid'
108
+ ? [
109
+ {
110
+ label: 'Kontakt',
111
+ to: '/kontakt',
112
+ color: 'neutral' as const,
113
+ variant: 'outline' as const,
114
+ },
115
+ ]
116
+ : []),
117
+ ]"
118
+ />
119
+ </div>
120
+ </UContainer>
48
121
  </template>
@@ -1,4 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import type { Schemas } from "#shopware";
3
+
2
4
  useSeoMeta({
3
5
  title: "Registrieren",
4
6
  });
@@ -14,6 +16,20 @@ watch(isLoggedIn, (isLoggedIn) => {
14
16
  navigateTo({ path: "/konto" });
15
17
  }
16
18
  });
19
+
20
+ function onRegistrationSuccess(
21
+ _data: unknown,
22
+ customer: Schemas["Customer"] | undefined,
23
+ ) {
24
+ // With double opt-in the customer stays inactive until the e-mail link is
25
+ // clicked, so there is no account session to show yet.
26
+ if (customer?.doubleOptInRegistration && !customer?.active) {
27
+ navigateTo("/anmelden");
28
+ return;
29
+ }
30
+
31
+ navigateTo("/konto");
32
+ }
17
33
  </script>
18
34
 
19
35
  <template>
@@ -23,6 +39,9 @@ watch(isLoggedIn, (isLoggedIn) => {
23
39
  title="Registrieren"
24
40
  description="Erstelle dein Kundenkonto."
25
41
  >
26
- <UserRegistrationForm @registration-success="navigateTo('/konto')" />
42
+ <UserRegistrationForm
43
+ :allow-guest="false"
44
+ @registration-success="onRegistrationSuccess"
45
+ />
27
46
  </UPageSection>
28
47
  </template>
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 404 for a page without content. On the server Nuxt renders the error page
3
+ * for every error, and Nitro logs a `[request error] [fatal]` block for fatal
4
+ * ones, which scanner traffic (`/.env`, `/.git/config`) turned into hundreds
5
+ * of error logs a day (#363). In the browser only a fatal error shows the
6
+ * error page, so it stays fatal there for client-side navigation.
7
+ */
8
+ export function createNotFoundError(statusMessage = "Page not found") {
9
+ return createError({
10
+ statusCode: 404,
11
+ statusMessage,
12
+ fatal: import.meta.client,
13
+ });
14
+ }
package/content/index.yml CHANGED
@@ -6,7 +6,7 @@ title: ShopBite
6
6
  description: Reduziere Kosten und steigere deinen Umsatz
7
7
  hero:
8
8
  title: Frisch gekocht, schnell geliefert.
9
- backgroundVideo: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/f8/66/7e/1789150226/background.mp4?ts=1789150226
9
+ backgroundVideo: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/97/67/24/1789985382/hero-demo-540p.mp4?ts=1789985382
10
10
  poster: /hero-poster.webp
11
11
  headline: SHOPBITE
12
12
  usps:
@@ -74,17 +74,17 @@ gallery:
74
74
  variant: subtle
75
75
  trailingIcon: i-lucide-phone
76
76
  images:
77
- - image: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/be/7b/ba/1789148625/restaurant1.webp?ts=1789148625
77
+ - image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/be/7b/ba/1789148625/restaurant1.webp?ts=1789148625
78
78
  alt: La Fattoria Restaurant Innenbereich 1
79
- - image: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/7c/a7/1c/1789148639/restaurant2.webp?ts=1789148639
79
+ - image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/7c/a7/1c/1789148639/restaurant2.webp?ts=1789148639
80
80
  alt: La Fattoria Restaurant Innenbereich 2
81
- - image: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/94/27/0b/1789148651/restaurant3.webp?ts=1789148651
81
+ - image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/94/27/0b/1789148651/restaurant3.webp?ts=1789148651
82
82
  alt: La Fattoria Restaurant Innenbereich 3
83
- - image: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/50/31/b1/1789148669/restaurant4.webp?ts=1789148669
83
+ - image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/50/31/b1/1789148669/restaurant4.webp?ts=1789148669
84
84
  alt: La Fattoria Restaurant Innenbereich 4
85
- - image: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/41/1b/09/1789148680/restaurant5.webp?ts=1789148680
85
+ - image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/41/1b/09/1789148680/restaurant5.webp?ts=1789148680
86
86
  alt: La Fattoria Restaurant Innenbereich 5
87
- - image: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/5b/d1/f9/1789148692/restaurant6.webp?ts=1789148692
87
+ - image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/5b/d1/f9/1789148692/restaurant6.webp?ts=1789148692
88
88
  alt: La Fattoria Restaurant Innenbereich 6
89
89
 
90
90
  mittagstisch:
@@ -93,7 +93,7 @@ mittagstisch:
93
93
  description: Jetzt auch Samstags!
94
94
  reverse: true
95
95
  orientation: horizontal
96
- image: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/50/31/b1/1789148669/restaurant4.webp?ts=1789148669
96
+ image: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/50/31/b1/1789148669/restaurant4.webp?ts=1789148669
97
97
  imageAlt: Illustration
98
98
  features:
99
99
  - title: Montag bis Samstag
@@ -114,7 +114,7 @@ mittagstisch:
114
114
  cta:
115
115
  title: Jetzt bestellen!
116
116
  description: Genieße die italienische Küche, frisch zubereitet und direkt zu dir geliefert oder vor Ort genießen.
117
- backgroundImage: https://veliu-minio.cjcbee.easypanel.host/shopbite-demo-shopware/media/60/5f/0e/1789148993/footer-cta.webp?ts=1789148993
117
+ backgroundImage: https://fsn1.your-objectstorage.com/shopbite-demo-shopware/media/60/5f/0e/1789148993/footer-cta.webp?ts=1789148993
118
118
  links:
119
119
  - label: Zur Speisekarte
120
120
  to: /speisekarte/
@@ -0,0 +1,63 @@
1
+ # Quick view: compact options and extras
2
+
3
+ The product quick view (`Product/QuickView.vue` → `Product/Detail.vue`) needed
4
+ a lot of scrolling for products with many extras. Measured on the demo shop
5
+ (Pizza Romana: 2 sizes, 8 extras, 6 ingredients, 390×844 viewport) the drawer
6
+ body was 775 px high with 598 px visible. Menus imported from Lieferando often
7
+ have 20–40 extras per product.
8
+
9
+ ## Causes
10
+
11
+ - The ingredients were listed three times: in the description, as chips at the
12
+ top of the body and again as the "Ohne" buttons at the bottom.
13
+ - Every extra was a pill with label and price. The pills were wider than half
14
+ the drawer, so each one took a full row (~47 px).
15
+ - After scrolling, the customer no longer saw what they had chosen.
16
+
17
+ ## Changes
18
+
19
+ - The body shows only the diet badges at the top. Ingredients are listed once,
20
+ in the deselectable "Zutaten" section (`DeselectIngredient.vue`), placed
21
+ before the extras.
22
+ - `CrossSelling.vue`: every cross-selling group is a collapsible section whose
23
+ header summarises the selection ("2 gewählt · +2,10 €"). Only the first group
24
+ starts open. Extras are checkbox rows with the price right-aligned. A group
25
+ with more than 8 entries shows the first 6 plus "Alle N anzeigen", and more
26
+ than 15 entries add a search field.
27
+ - `Detail.vue` fills the drawer body, so the add-to-cart button sits at the
28
+ bottom of the desktop side panel.
29
+
30
+ Result on the demo product: 681 px body height (was 775). With 24 extras and a
31
+ second group (mocked response) the body is 727 px, and 1490 px once all 24
32
+ extras are shown.
33
+
34
+ ## No height jumps
35
+
36
+ The phone drawer is as high as its content (up to 92vh), so anything that
37
+ changes the content height while choosing makes it jump:
38
+
39
+ - A first version showed a summary line above the button ("+ Extra Käse ·
40
+ ohne Salami"). It appeared with the first choice and grew the drawer by
41
+ 31 px. It was removed; the choices stay visible in the ingredient chips and
42
+ in the extras group header.
43
+ - Deselected ingredient chips used to gain an X icon, which made the chip wider
44
+ and could wrap the row. Both states now carry an icon of the same size (X to
45
+ remove, plus to add back).
46
+
47
+ Checked on the production menu of La Fattoria (12 pizzas with up to 34 extras, 360
48
+ and 390 px wide): toggling every ingredient and ticking an extra keeps the
49
+ drawer height constant.
50
+
51
+ ## Performance and hydration
52
+
53
+ Measured against a `main` build with the same settings:
54
+
55
+ - JS on the first load of `/speisekarte/`: unchanged (326.6 KB gzip both).
56
+ - Entry CSS: +114 B gzip (UCheckbox theme).
57
+ - Quick view chunk loaded when the drawer opens: +2.4 KB raw (~0.9 KB gzip).
58
+ - Only the first 6 extras of a long group are rendered initially.
59
+
60
+ Opening `/speisekarte/?produkt=LF-27` directly reports the same two hydration
61
+ mismatches on `main` and on this branch (built with `debug.hydration`): the
62
+ `useId`-based id of the account dropdown in the header and a fragment node.
63
+ They are not caused by the quick view changes.
@@ -0,0 +1,89 @@
1
+ # Dependency update — 2026-09-21
2
+
3
+ Branch `chore/dependency-update-2026-09-21`. Previous round:
4
+ `2026-09-07-dependency-update.md`.
5
+
6
+ ## Packages
7
+
8
+ | Package | From | To |
9
+ | --- | --- | --- |
10
+ | @shopware/api-client | 1.5.1 | 1.6.0 |
11
+ | @shopware/composables | 1.12.1 | 1.13.0 |
12
+ | @shopware/helpers | 1.7.2 | 1.8.0 |
13
+ | @shopware/nuxt-module | 1.5.1 | 1.5.2 |
14
+ | @vueuse/core | 14.4.0 | 15.0.0 (major) |
15
+ | dotenv | 17.4.2 | 18.0.1 (major) |
16
+ | @sentry/nuxt | 10.73.0 | 10.75.0 |
17
+ | vue (compiler-dom, server-renderer) | 3.5.42 | 3.5.43 |
18
+ | eslint / prettier / jsdom / @vue/test-utils / @types/node | | latest minor/patch |
19
+ | pnpm | 10.34.5 | 12.5.1 (major, see below) |
20
+
21
+ Held back, as in the previous round:
22
+
23
+ - **typescript 7**: typescript-eslint 8.70 still declares `typescript >=4.8.4 <6.1.0`.
24
+ - **@nuxt/devtools-kit 4**: only a beta (`4.0.0-beta.1`).
25
+
26
+ ## What needed changes
27
+
28
+ ### @shopware/nuxt-module 1.5.2
29
+
30
+ 1.5.2 gives its plugin the explicit `Plugin<…>` type upstream (the main
31
+ reason for our patch, see `2026-09-08-issue-277-typecheck.md`). The plugin
32
+ still imports `ShopwareNuxtOptions` from `./src`, which the package does not
33
+ ship, so the patch shrinks to that one import (`./dist/index`):
34
+ `patches/@shopware__nuxt-module@1.5.2.patch`.
35
+
36
+ ### @shopware/api-client 1.6.0: operation renamed
37
+
38
+ `createOrderFromQuote post /quote/order/{id}` is now
39
+ `createOrderFromQuote post /quote/{id}/order`. `shopware.d.ts` re-maps that
40
+ operation's response to our `Order` schema, so the key had to follow;
41
+ otherwise `useB2bQuoteManagement` fails the typecheck (`extensions` of
42
+ `order_line_item` differ between the default and our generated types).
43
+
44
+ ### @shopware/composables 1.13.0
45
+
46
+ `useSyncWishlist` and `useWishlist` are unchanged from 1.12.1; our override
47
+ (`app/composables/useSyncWishlist.ts`, #366) stays valid.
48
+
49
+ ### @vueuse/core 15 / dotenv 18
50
+
51
+ vueuse 15 drops Node 20 and the deprecated timer options (we call
52
+ `useIntervalFn(fn, ms)` without options); CI and the Docker image run Node 24.
53
+ dotenv 18 only adds a CLI and an opt-in parser; `playwright.config.ts` is
54
+ unaffected.
55
+
56
+ ### pnpm 12
57
+
58
+ - Since pnpm 11 `.npmrc` is read for auth/registry only.
59
+ `shamefully-hoist=true` moved to `pnpm-workspace.yaml` (`shamefullyHoist`),
60
+ `.npmrc` is gone (also from `node.dockerfile`'s `COPY`).
61
+ - pnpm 12 fails on unknown keys in `pnpm-workspace.yaml` when the pinned
62
+ version matches.
63
+ - **`minimumReleaseAge` defaults to 24 hours.** A lockfile resolved with
64
+ pnpm 10 on the same day contained three transitive packages published
65
+ within the last 24 hours (`@asamuzakjp/css-color` 7.0.1, `whatwg-url`
66
+ 17.1.2, `yargs` 18.2.0) and was rejected
67
+ (`ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`); `pnpm update` cannot fix that,
68
+ because the check runs before resolution. The update was redone with
69
+ pnpm 12 on top of `main`'s lockfile, which resolves the previous versions.
70
+ Keep the default: it is a supply-chain safeguard.
71
+ - pnpm 12 also re-resolved the `workbox-build`/`workbox-window` peers of
72
+ `vite-plugin-pwa` to 7.4.1 (pnpm 10 kept 7.3.0 and printed unmet-peer
73
+ warnings on every update).
74
+ - Pinned in `package.json` (`packageManager`), `.github/workflows/ci.yaml`,
75
+ `.github/workflows/build.yaml` and `node.dockerfile` (`PNPM_VERSION`, was
76
+ still 10.32.1).
77
+ - `pnpm peers check` lists three unmet peers deep in Nuxt tooling
78
+ (`cac` for `@bomb.sh/tab`, `oxc-parser` and `unplugin` for `unctx`);
79
+ nothing to fix on our side.
80
+
81
+ ## Verification
82
+
83
+ - `pnpm eslint`, `pnpm prettier`, `pnpm typecheck` (0 errors),
84
+ `pnpm test:unit` (302 tests), `pnpm build`, `pnpm install --frozen-lockfile`
85
+ — all with pnpm 12.5.1.
86
+ - `docker build -f node.dockerfile --target build` (corepack pnpm 12.5.1).
87
+ - Production build against the demo backend: menu with 63 products, quick
88
+ view, add to cart (line-item request), item in `/bestellung/warenkorb`, no
89
+ console errors.
@@ -0,0 +1,49 @@
1
+ # Issue #273 follow-up: cache headers, demo video, acceptance
2
+
3
+ Follow-up to `2026-09-10-issue-273-performance-media.md` (PR #308).
4
+
5
+ ## State on 2026-09-21
6
+
7
+ - Object storage media (demo and La Fattoria) send
8
+ `public, max-age=31536000, immutable`: done on the buckets.
9
+ - Homepage docs cover poster, video size, thumbnails and the bucket header.
10
+ - Remaining requests without a useful cache lifetime on demo.shopbite.de:
11
+ - files from `public/` (`/hero-poster.webp`, `/favicon.ico`, `/light/Logo.png`):
12
+ no `Cache-Control` at all. Nitro only adds one for public asset dirs with
13
+ their own `baseURL`; `public/` is mounted at `/` with `fallthrough`, and
14
+ the static handler never sets the header.
15
+ - `/_ipx/*` (resized logo): IPX default `max-age=60`.
16
+ - `analytics.shopbite.de/matomo.js`: TTL 0, Matomo server config, not
17
+ in this repository.
18
+ - The demo hero video was still the 27.6 MB original (2560×1440, 18 s, with
19
+ audio); Lighthouse desktop runs that loaded it weighed 27.7 MB.
20
+
21
+ ## Changes
22
+
23
+ - `modules/public-cache.ts`: route rule with
24
+ `public, max-age=2592000, stale-while-revalidate=86400` per file in the
25
+ `public/` folder of every layer (checked with an app extending the layer:
26
+ its own files get the rule, `/` does not). 30 days, not immutable, because
27
+ the names are not fingerprinted.
28
+ - `image.ipx.maxAge: 2592000`. A route rule does not reach IPX: it runs as its
29
+ own node handler and only checks its own response headers.
30
+ - Demo video: first 8 s, 960×540, 24 fps, no audio, CRF 32, faststart:
31
+ 0.98 MB, uploaded as a new Shopware media `hero-demo-540p` (the original
32
+ `background.mp4` stays in the media folder); `content/index.yml` points to it.
33
+
34
+ ```
35
+ ffmpeg -ss 0 -t 8 -i background.mp4 -vf "scale=960:-2" -r 24 -c:v libx264 -crf 32 \
36
+ -preset slow -pix_fmt yuv420p -an -movflags +faststart hero-demo-540p.mp4
37
+ ```
38
+
39
+ ## Lighthouse (demo.shopbite.de, before this change)
40
+
41
+ Local Lighthouse 13.4, simulated throttling, 8 mobile runs: median score 75
42
+ (64–90), LCP 5.2 s, TBT 160 ms, CLS 0. Desktop 89–99. PageSpeed Insights was not
43
+ available (anonymous daily quota).
44
+
45
+ The LCP element is the 19 KB poster. Observed (unthrottled) FCP and LCP are the
46
+ same paint at 0.7–1.5 s; the poster is loaded at 0.6–0.9 s. The simulated LCP
47
+ is high because the first paint happens after the ~42 script requests, which
48
+ the simulation replays on slow 4G. The mobile score is therefore limited by
49
+ the number of JS chunks before the first paint, not by media.