@shopbite-de/storefront 1.23.3 → 1.25.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 (204) hide show
  1. package/.env.example +22 -0
  2. package/.github/workflows/build.yaml +1 -1
  3. package/.github/workflows/ci.yaml +6 -3
  4. package/CLAUDE.md +48 -3
  5. package/README.md +139 -40
  6. package/api-gen.config.json +9 -0
  7. package/api-types/storeApiSchema.shopbite.overrides.json +35 -0
  8. package/api-types/storeApiTypes.d.ts +95 -81
  9. package/app/app.config.ts +3 -2
  10. package/app/app.vue +40 -53
  11. package/app/assets/css/main.css +36 -4
  12. package/app/components/AddToWishlist.vue +13 -6
  13. package/app/components/Address/Fields.vue +2 -21
  14. package/app/components/AnimatedSection.vue +9 -4
  15. package/app/components/BottomNavi.vue +9 -2
  16. package/app/components/Cart/Bar.vue +102 -0
  17. package/app/components/Cart/Item.vue +21 -10
  18. package/app/components/Cart/QuickView.vue +4 -0
  19. package/app/components/Cart/Upsell.vue +106 -0
  20. package/app/components/Category/Header.vue +9 -3
  21. package/app/components/Category/Listing.vue +62 -45
  22. package/app/components/Checkout/PaymentAndDelivery.vue +19 -3
  23. package/app/components/Checkout/Summary.vue +70 -2
  24. package/app/components/Cta.vue +4 -2
  25. package/app/components/DemoBanner.vue +13 -0
  26. package/app/components/Feature/Card.vue +121 -0
  27. package/app/components/Features.vue +14 -9
  28. package/app/components/Food/MarqueeItem.vue +20 -8
  29. package/app/components/Footer/Contact.vue +82 -0
  30. package/app/components/Footer/StoreStatus.vue +30 -0
  31. package/app/components/Footer.vue +2 -1
  32. package/app/components/Header/Body.vue +1 -1
  33. package/app/components/Header/Right.vue +60 -17
  34. package/app/components/Header/Title.vue +1 -0
  35. package/app/components/Header.vue +5 -15
  36. package/app/components/Hero.vue +169 -36
  37. package/app/components/ImageGallery.vue +11 -5
  38. package/app/components/Product/Card.vue +104 -46
  39. package/app/components/Product/CardCompact.vue +72 -0
  40. package/app/components/Product/CardDietBadges.vue +38 -31
  41. package/app/components/Product/CardIngredients.vue +35 -0
  42. package/app/components/Product/CardSkeleton.vue +10 -18
  43. package/app/components/Product/Category.vue +9 -2
  44. package/app/components/Product/Configurator.vue +11 -7
  45. package/app/components/Product/CrossSelling.vue +45 -34
  46. package/app/components/Product/DeselectIngredient.vue +37 -31
  47. package/app/components/Product/Detail.vue +73 -13
  48. package/app/components/Product/QuickView.vue +77 -0
  49. package/app/components/Topseller.vue +44 -34
  50. package/app/components/User/RegistrationForm.vue +0 -1
  51. package/app/components/Wishlist.vue +2 -15
  52. package/app/composables/useAddToCart.ts +13 -40
  53. package/app/composables/useAddressAutocomplete.ts +12 -19
  54. package/app/composables/useAddressSuggestionArea.ts +16 -0
  55. package/app/composables/useAddressValidation.ts +3 -19
  56. package/app/composables/useCartMutations.ts +168 -0
  57. package/app/composables/useCartQuickView.ts +19 -0
  58. package/app/composables/useCartUpsell.ts +100 -0
  59. package/app/composables/{useCategory.ts → useCategoryById.ts} +1 -1
  60. package/app/composables/useCategorySeo.ts +27 -29
  61. package/app/composables/useCheckoutMethodGuard.ts +201 -0
  62. package/app/composables/useMatomo.ts +25 -0
  63. package/app/composables/useMatomoConfig.ts +12 -0
  64. package/app/composables/useMenuSectionSchema.ts +55 -0
  65. package/app/composables/useNavigation.ts +12 -9
  66. package/app/composables/usePageSeo.ts +50 -0
  67. package/app/composables/useProductCartQuantity.ts +15 -0
  68. package/app/composables/useProductCrossSelling.ts +1 -0
  69. package/app/composables/useProductDetail.ts +15 -1
  70. package/app/composables/useProductEvents.ts +30 -0
  71. package/app/composables/useProductQuickView.ts +65 -0
  72. package/app/composables/useRestaurantSchema.ts +64 -0
  73. package/app/composables/useScrollAnimation.ts +39 -8
  74. package/app/composables/useSearchTracking.ts +33 -0
  75. package/app/composables/useSeoUrlRoute.ts +58 -0
  76. package/app/composables/useSortingSelection.ts +28 -0
  77. package/app/composables/useStoreStatus.ts +48 -0
  78. package/app/composables/useTopSellers.ts +22 -0
  79. package/app/composables/useTrackEvent.ts +36 -23
  80. package/app/pages/[...all].vue +4 -4
  81. package/app/pages/account/recover/password/index.vue +1 -0
  82. package/app/pages/anmelden.vue +4 -0
  83. package/app/pages/bestellung/[id]/erfolg.vue +1 -5
  84. package/app/pages/bestellung/[id]/fehler.vue +2 -2
  85. package/app/pages/bestellung/[id]/index.vue +9 -3
  86. package/app/pages/bestellung/bestaetigen.vue +1 -5
  87. package/app/pages/bestellung/warenkorb.vue +1 -5
  88. package/app/pages/bestellung/zahlung-versand.vue +1 -5
  89. package/app/pages/c/[...all].vue +2 -35
  90. package/app/pages/index.vue +28 -14
  91. package/app/pages/kontakt.vue +4 -0
  92. package/app/pages/konto/adressen.vue +4 -0
  93. package/app/pages/konto/bestellung/[id].vue +4 -0
  94. package/app/pages/konto/bestellungen.vue +4 -0
  95. package/app/pages/konto/index.vue +4 -0
  96. package/app/pages/konto/profil.vue +4 -0
  97. package/app/pages/maintenance.vue +6 -0
  98. package/app/pages/merkliste.vue +1 -7
  99. package/app/pages/passwort-vergessen.vue +1 -0
  100. package/app/pages/registrierung/bestaetigen.vue +4 -0
  101. package/app/pages/registrierung/index.vue +4 -0
  102. package/app/pages/speisekarte/[...all].vue +2 -36
  103. package/app/pages/suche.vue +42 -26
  104. package/app/plugins/matomo.ts +35 -0
  105. package/app/types/Association.d.ts +1 -0
  106. package/app/utils/hydrateWhenVisible.ts +20 -0
  107. package/app/utils/media.ts +33 -0
  108. package/app/utils/openingHours.ts +90 -0
  109. package/app/utils/product.ts +31 -0
  110. package/app/utils/schema.ts +235 -0
  111. package/app/utils/seo.ts +56 -0
  112. package/app/utils/seoPath.ts +57 -0
  113. package/content/index.yml +26 -20
  114. package/content.config.ts +16 -0
  115. package/docs/notes/2026-07-05-issue-259-matomo-broken.md +7 -0
  116. package/docs/notes/2026-09-08-issue-240-shipping-method-blocked.md +83 -0
  117. package/docs/notes/2026-09-08-issue-241-cart-lock-conflicts.md +63 -0
  118. package/docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md +65 -0
  119. package/docs/notes/2026-09-08-issue-276-payment-method-blocked.md +39 -0
  120. package/docs/notes/2026-09-08-issue-277-typecheck.md +99 -0
  121. package/docs/notes/2026-09-10-issue-250-animated-section.md +23 -0
  122. package/docs/notes/2026-09-10-issue-251-shop-data-in-base-layer.md +30 -0
  123. package/docs/notes/2026-09-10-issue-272-restaurant-schema.md +27 -0
  124. package/docs/notes/2026-09-10-issue-273-performance-media.md +64 -0
  125. package/docs/notes/2026-09-10-issue-274-seo-basics.md +49 -0
  126. package/docs/notes/2026-09-10-issue-275-accessibility.md +46 -0
  127. package/docs/notes/2026-09-10-issue-290-footer-nap.md +28 -0
  128. package/docs/notes/2026-09-10-issue-291-seo-url-trailing-slash.md +24 -0
  129. package/docs/notes/2026-09-10-issue-294-matomo-without-config.md +33 -0
  130. package/docs/notes/2026-09-10-issue-295-search-hydration-mismatch.md +25 -0
  131. package/docs/notes/2026-09-10-issue-296-track-direct-search.md +19 -0
  132. package/docs/notes/2026-09-10-issue-312-store-api-criteria-post.md +64 -0
  133. package/docs/notes/2026-09-10-issue-313-wishlist-scoped-tailwind.md +29 -0
  134. package/docs/notes/2026-09-10-issue-314-mobile-js-cost.md +119 -0
  135. package/docs/notes/2026-09-12-issue-319-stylesheet-cost.md +154 -0
  136. package/docs/notes/2026-09-12-issue-325-product-card.md +100 -0
  137. package/docs/notes/2026-09-12-issue-327-home-hero.md +64 -0
  138. package/docs/notes/2026-09-13-demo-banner.md +32 -0
  139. package/docs/notes/2026-09-13-issue-332-home-info-cards.md +46 -0
  140. package/docs/notes/2026-09-13-quick-view-flicker.md +65 -0
  141. package/docs/notes/2026-09-14-cart-upsell.md +105 -0
  142. package/docs/notes/2026-09-14-demo-noindex.md +57 -0
  143. package/node.dockerfile +5 -2
  144. package/nuxt.config.ts +98 -15
  145. package/package.json +5 -3
  146. package/patches/@shopware__nuxt-module@1.5.1.patch +32 -0
  147. package/pnpm-workspace.yaml +2 -0
  148. package/public/hero-poster.webp +0 -0
  149. package/scripts/perf/first-render.mjs +30 -0
  150. package/scripts/perf/h2-proxy.cjs +49 -0
  151. package/scripts/perf/lighthouse.sh +22 -0
  152. package/scripts/perf/quick-view-layout.mjs +126 -0
  153. package/server/api/__sitemap__/urls.get.ts +49 -0
  154. package/server/api/category/[categoryId].get.ts +20 -9
  155. package/server/api/content/home.get.ts +14 -0
  156. package/server/api/content/page.get.ts +22 -0
  157. package/server/api/listing/[categoryId].get.ts +14 -18
  158. package/server/api/product/[productId]/cross-selling.get.ts +3 -9
  159. package/server/api/product/[productId].get.ts +4 -8
  160. package/server/api/search.get.ts +2 -0
  161. package/server/plugins/site-url.ts +13 -0
  162. package/server/plugins/sitemap-trailing-slash.ts +26 -0
  163. package/server/utils/sitemap.ts +60 -0
  164. package/server/utils/storeApi.ts +34 -0
  165. package/shopware.d.ts +35 -11
  166. package/test/e2e/simple-checkout-as-recurring-customer.test.ts +13 -17
  167. package/test/nuxt/AddressFields.test.ts +2 -73
  168. package/test/nuxt/AnimatedSection.test.ts +67 -0
  169. package/test/nuxt/CartBar.test.ts +110 -0
  170. package/test/nuxt/CartItem.test.ts +95 -0
  171. package/test/nuxt/CartUpsell.test.ts +125 -0
  172. package/test/nuxt/DemoBanner.test.ts +12 -0
  173. package/test/nuxt/FooterContact.test.ts +102 -0
  174. package/test/nuxt/FooterStoreStatus.test.ts +48 -0
  175. package/test/nuxt/HeaderRight.test.ts +14 -10
  176. package/test/nuxt/Hero.test.ts +68 -0
  177. package/test/nuxt/PaymentAndDelivery.test.ts +67 -8
  178. package/test/nuxt/RegistrationForm.test.ts +3 -0
  179. package/test/nuxt/useAddToCart.test.ts +37 -17
  180. package/test/nuxt/useAddressAutocomplete.test.ts +2 -38
  181. package/test/nuxt/useAddressSuggestionArea.test.ts +27 -0
  182. package/test/nuxt/useBusinessHours.test.ts +1 -1
  183. package/test/nuxt/useCartMutations.test.ts +225 -0
  184. package/test/nuxt/useCartUpsell.test.ts +126 -0
  185. package/test/nuxt/useCheckoutMethodGuard.test.ts +386 -0
  186. package/test/nuxt/useScrollAnimation.test.ts +55 -49
  187. package/test/nuxt/useSearchTracking.test.ts +71 -0
  188. package/test/nuxt/useSeoUrlRoute.test.ts +93 -0
  189. package/test/nuxt/useStoreStatus.test.ts +77 -0
  190. package/test/nuxt/useTrackEvent.test.ts +127 -0
  191. package/test/unit/media.spec.ts +49 -0
  192. package/test/unit/openingHours.spec.ts +90 -0
  193. package/test/unit/product.spec.ts +72 -0
  194. package/test/unit/schema.spec.ts +243 -0
  195. package/test/unit/seo.spec.ts +107 -0
  196. package/test/unit/seoPath.spec.ts +116 -0
  197. package/test/unit/sitemap.spec.ts +88 -0
  198. package/test/unit/useCategorySeo.spec.ts +42 -31
  199. package/test/unit/useSortingSelection.spec.ts +39 -0
  200. package/test/visual/playwright.config.ts +33 -0
  201. package/test/visual/visual.spec.ts +87 -0
  202. package/app/components/Product/CardDescription.vue +0 -27
  203. package/app/components/Product/CardFooter.vue +0 -51
  204. package/app/composables/useValidCitiesForDelivery.ts +0 -12
@@ -0,0 +1,64 @@
1
+ # Issue #273: Hero video, image sizes and cache headers (mobile LCP 5.2 s)
2
+
3
+ As of 2026-09-10, branch `feature/273-performance-hero-media`.
4
+
5
+ ## Measurement (Lighthouse 12 on pizzeria-lafattoria.de, 2026-09-10)
6
+
7
+ | | Mobile | Desktop |
8
+ | --- | --- | --- |
9
+ | Performance | 68 | 88 |
10
+ | LCP | 5.3 s (the `<video>`) | 1.9 s (the `<video>`) |
11
+ | Page weight | 5.1 MB | 5.1 MB |
12
+
13
+ - Hero video `4518950-hd_1920_1080_25fps.mp4`: 3.4 MB, 1920×1080, 5 s, 4.9 Mbit/s, `autoplay` + `fetchpriority="high"`, no poster.
14
+ - CTA background: the category header image (4928×1400, 756 KB) from `content/index.yml`, rendered through `NuxtImg` without effect (the domain is not configured for the image provider, so no `srcset`).
15
+ - Gallery: six unsized, eagerly loaded images (Lighthouse `unsized-images`, `offscreen-images`).
16
+ - 11 requests without `Cache-Control` from `nbg1.your-objectstorage.com` (Hetzner Object Storage); the ShopBite demo Shopware (`shopware.shopbite.de`) sends `public, max-age=2592000, immutable`.
17
+ - bf-cache: "Internal error", not actionable (Chrome-internal, no `unload` listener in our code).
18
+ - The ShopBite demo's own hero video is worse: 27.6 MB, 2560×1440, 18 s.
19
+
20
+ ## Decisions
21
+
22
+ - **Poster instead of video as LCP.** `hero.poster` (content) is server-rendered as `<img fetchpriority="high">` with a `<link rel="preload">`; the `<video>` is added after hydration only when `(min-width: 768px)` matches, with `preload="metadata"`, `poster` and without `fetchpriority`. Phones never request the video.
23
+ - **Shopware thumbnails instead of an image proxy.** Category media and product covers come with thumbnails (400/800/1920 px); `mediaSrcSet()`/`mediaSize()` (`app/utils/media.ts`) turn them into `srcset`/`width`/`height`. No `@nuxt/image` domains config: ipx would resize on the storefront container per request.
24
+ - Content images (CTA, marquee, gallery) are plain `<img loading="lazy">`; the gallery gets a fixed `aspect-[4/3]` box. Their size is the shop owner's responsibility, documented.
25
+ - The logo gets a `height` matching its aspect ratio.
26
+ - Cache headers on the object storage are a bucket setting, documented (Hetzner: `aws s3 cp --metadata-directive REPLACE --cache-control` or `s3cmd modify --add-header`).
27
+
28
+ ## Media generated with ffmpeg (static binary via `ffmpeg-static`)
29
+
30
+ ```
31
+ ffmpeg -ss 1 -i hero.mp4 -frames:v 1 -vf "scale=1280:-2" -c:v libwebp -quality 70 hero-poster.webp
32
+ ffmpeg -i hero.mp4 -vf "scale=1280:-2" -r 25 -c:v libx264 -crf 28 -preset medium -an -movflags +faststart hero-720p.mp4
33
+ ```
34
+
35
+ | Shop | Original | 720p | Poster 1280 |
36
+ | --- | --- | --- | --- |
37
+ | La Fattoria | 3.4 MB | 713 KB | 65 KB |
38
+ | ShopBite demo | 27.6 MB | 6.0 MB | 60 KB (`public/hero-poster.webp`) |
39
+
40
+ The 720p files are not in a repository; they need to be uploaded to the respective Shopware media (no admin credentials in the storefront `.env`).
41
+
42
+ ## Not covered
43
+
44
+ - `Wishlist.vue`, `CardKitchen.vue`, `FilterGroup.vue`, `ShippingMethod.vue`, `PaymentMethod.vue` still use `NuxtImg` for small icons; harmless without a provider domain.
45
+ - La Fattoria's `Kalam-Regular.ttf` (154 KB, `font-display: optional`) is the shop's own font.
46
+ - bf-cache "Internal error".
47
+
48
+ ## Measuring locally: pitfalls
49
+
50
+ Lighthouse against the bare `node .output/server/index.mjs` is not comparable with production:
51
+
52
+ - Nitro does not compress SSR HTML (`compressPublicAssets` only covers static files); the reverse proxy in front of production does. Lighthouse then flags 130–480 KB of uncompressed HTML.
53
+ - Over HTTP/1.1 the ~110 `modulepreload` links Nuxt emits queue behind six connections and delay the CSS; production is HTTP/2. `scratchpad/h2-proxy.cjs` (TLS + h2 + gzip in front of :3099) fixes both.
54
+ - TTFB is 450–680 ms here (SSR calls the Store API in another data centre) vs 190 ms live.
55
+ - The observed (unthrottled) first paint of the local headless Chrome is ~1.5 s although HTML, CSS and poster are loaded at 0.45 s, while the live site paints at 0.4 s; nothing in the HTML hides the page. Simulated mobile FCP therefore stays around 3.2 s locally regardless of media, and mobile LCP (poster loaded at 1.6 s) is reported as 5.6 s ("render delay" ~4 s). The mobile acceptance numbers need a run against the deployed shop.
56
+
57
+ Local results (h2 proxy, La Fattoria Store API, demo content): desktop `/` 98 (LCP 1.0 s, was 88/1.9 s live), `/c/Pizza/` 98 (LCP 1.0 s); mobile `/` 66 (LCP element is the 19 KB poster, page weight 1.07 MB instead of 5.1 MB, no video request), `/c/Pizza/` 65 (category header 37 KB thumbnail instead of 756 KB, CLS 0).
58
+
59
+ The `blur-sm` on the poster made no measurable difference in the simulation; it was still removed in favour of a pre-blurred file (19 KB instead of 60 KB), which also saves the filter on real phones.
60
+
61
+ ## Follow-ups worth an issue
62
+
63
+ - Mobile main-thread cost: 1.0–1.6 s script evaluation (`Bk-QZtQM.js`, the entry) and ~110 preloaded chunks; the category page ships a 541 KB (uncompressed) payload with 100 products.
64
+ - `AnimatedSection` renders content invisible until hydration (#250) and shifts the hero USP row (CLS 0.028 on `/`).
@@ -0,0 +1,49 @@
1
+ # Issue #274: Sitemap, canonical, og:image, title template
2
+
3
+ As of 2026-09-10, branch `feature/274-seo-sitemap-canonical-og`.
4
+
5
+ ## Starting point (live, pizzeria-lafattoria.de)
6
+
7
+ - `/sitemap.xml` 404, robots.txt without `Sitemap:`.
8
+ - Home page: no canonical, no `og:image`, `twitter:card: summary`.
9
+ - Categories (`/c/Pizza/`) already had canonical, og:image and JSON-LD via `useCategorySeo`. The claim in the issue that categories have no URLs of their own was wrong.
10
+ - Products have no page. Shopware still generates 390 SEO URLs (`/Pizza-Margherita/21`) that return 404.
11
+ - `nuxt.config.ts` set `og:title` to the description (bug, fixed).
12
+
13
+ ## Decisions (agreed with Lirim)
14
+
15
+ - Scope: only sitemap, canonical, og:image, title template. Product pages → #289, footer with address/phone/opening hours → #290.
16
+ - Product URLs later via catch-all fallback in `[...all].vue` (recorded in #289).
17
+ - og:image: static image via `site.ogImage`, no `nuxt-og-image`.
18
+ - City/cuisine (and later address, phone) via `runtimeConfig.public.site`, not via the plugin config.
19
+
20
+ ## Implementation
21
+
22
+ - `@nuxtjs/sitemap` 8.5; sources: `/`, content pages (`defineSitemapSchema` in `landingpages`), `server/api/__sitemap__/urls.get.ts` (navigation `main-navigation` + menu category tree, flat via `buildTree: false`, otherwise subcategories are missing). App sources `nuxt:pages` and `nuxt:route-rules` are excluded (account/checkout, route rules like `/registrierung/bestaetigen`).
23
+ - `server/plugins/site-url.ts`: `storeUrl` becomes the nuxt-site-config URL so canonical, sitemap and robots.txt share one base (otherwise the request origin, which is internal behind a proxy).
24
+ - `app.vue`: title template (function, `%s`/`%siteName`), canonical from `route.path` (key `canonical`, categories override it with the SEO URL), `og:url`, `og:locale` from the session context, fallback `og:image`, `summary_large_image`.
25
+ - Page titles without the shop-name suffix; every page has its own title. `error.vue` keeps `404 | <shop name>` because `app.vue` is not rendered for error pages (no template).
26
+ - `usePageSeo` for the home page and content pages.
27
+
28
+ ## Pitfalls
29
+
30
+ - **Trailing slash:** `@nuxtjs/sitemap` strips the trailing slash from every URL in `preNormalizeEntry` and only re-adds it globally via `site.trailingSlash`. Shopware category URLs (`/c/Pizza/`) return 404 without the slash (verified live), product URLs (`/Pizza-Margherita/21`) have none. A global `trailingSlash` therefore never fits. Solution: the source marks `_trailingSlash: true`, `server/plugins/sitemap-trailing-slash.ts` collects the paths in `sitemap:resolved` (per request in `event.context`) and re-appends the slash in `sitemap:output`. The 404 for the slashless URL is tracked as #291.
31
+ - For the same reason `toAbsoluteUrl` builds canonicals with `joinURL` instead of `createSitePathResolver`, which normalises slashes according to `site.trailingSlash`.
32
+ - **Nuxt Content** fills `seo.title`/`seo.description` automatically with `title`/`description`. A custom SEO title of the home page is therefore only detectable when it differs from `title`; otherwise `buildHomeTitle` applies.
33
+ - `@nuxtjs/sitemap` must come before `@nuxt/content` in `modules`; Content v3 needs the `sitemap` schema field per collection.
34
+ - nuxt-site-config reads all of `runtimeConfig.public.site` into its stack; the extra keys (`titleTemplate`, `ogImage`, `cuisine`, `address`) do no harm.
35
+
36
+ ## Verification
37
+
38
+ Production build locally against the La Fattoria Shopware (Store API, public access key) with `NUXT_PUBLIC_STORE_URL=https://www.pizzeria-lafattoria.de`:
39
+
40
+ - robots.txt: `Sitemap: https://www.pizzeria-lafattoria.de/sitemap.xml`
41
+ - `/sitemap.xml` 200: home page, content pages, categories incl. subcategories with `/`, lastmod, category images
42
+ - Home page, `/c/Pizza/`, `/c/Nudeln/Penne/`, `/agb`, `/anmelden`, `/bestellung/warenkorb`: exactly one absolute canonical and one absolute `og:image` each, individual title
43
+
44
+ ## After the release for Pizzeria La Fattoria
45
+
46
+ - Set `NUXT_PUBLIC_SITE_ADDRESS_CITY=Obertshausen`, `NUXT_PUBLIC_SITE_CUISINE`.
47
+ - Remove `seo.title`/`seo.description` in `content/index.yml` or fill them with search terms (currently "Pizzeria La Fattoria Obertshausen", which takes precedence over the new default).
48
+ - `public/card.png` exists; check it is 1200 × 630 px. Run the Facebook Sharing Debugger.
49
+ - The `robots.disallow` for `/impressum`, `/datenschutz`, `/agb` keeps those pages out of the sitemap.
@@ -0,0 +1,46 @@
1
+ # Issue #275: Lighthouse accessibility, contrast and `aria-hidden-focus`
2
+
3
+ As of 2026-09-10, branch `fix/275-accessibility-contrast-aria-hidden`.
4
+
5
+ ## Findings (Lighthouse 12 on pizzeria-lafattoria.de, score 92 mobile and desktop)
6
+
7
+ The issue guessed at light backgrounds and a carousel; both audits point elsewhere.
8
+
9
+ - **color-contrast** happens in the **dark mode** (the shop's default): the brand green `#4d7c0f` (`brand-500`, the `--ui-primary` of both modes) on `#171717` is 3.59:1, both as `text-primary` (`data-slot="headline"`) and as dark `text-inverted` on solid primary buttons (hero, section and CTA links). In light mode `#4d7c0f` on white is 4.99:1 and passes.
10
+ - **aria-hidden-focus** is not a carousel: the two `span[aria-hidden="true"][tabindex="0"]` sit before and after the toast viewport (`<ol data-slot="viewport">`). They are Reka UI's toast `FocusProxy` (`VisuallyHidden` with feature `focusable`, which sets `aria-hidden="true"` on a tabbable span), rendered while a toast is open. The store-status toast "Wir haben geschlossen!" had `duration: 0`, so the proxies existed on every page for the whole session.
11
+
12
+ Contrast of the palettes in use (WCAG ratio, target ≥ 4.5; "tint" is the 10 % tint of the colour on white that subtle buttons and badges use):
13
+
14
+ | Palette | 500 on white | 600 on white / tint | 400 on #171717 | 500 on #171717 |
15
+ | --- | --- | --- | --- | --- |
16
+ | ShopBite orange (storefront default) | 3.11 | old `#e64d00` 3.87; new `#c23d00` 5.30 / 4.59 | 6.89 | 5.76 |
17
+ | La Fattoria green | 4.99 | 7.12 / 6.12 | 9.07 | 3.59 |
18
+ | Tailwind rose (hey-amore) | 3.67 | 4.70 / ~4.1 | 6.66 | 4.88 |
19
+ | Tailwind red (masala-mio) | 3.76 | 4.83 / ~4.2 | 6.48 | 4.76 |
20
+
21
+ So the storefront default and both demos fail in light mode as well; nobody had run Lighthouse there. Nuxt UI's `success` green (`green-500`, `#00c950`) on the diet badges is 2.22 on white.
22
+
23
+ ## Decisions (agreed with Lirim)
24
+
25
+ - Contrast: Nuxt UI convention. `--ui-primary` is `brand-600` in light mode and `brand-400` in dark mode; the storefront's own `brand-600` becomes `#c23d00` (5.30 on white, 4.59 on its tint). `--ui-success` is `green-800` light / `green-400` dark. Rule for demos: `brand-600` ≥ 5:1 on white (covers the tint), `brand-400` ≥ 4.5:1 on `#171717`.
26
+ - Toast proxies: instead of patching `reka-ui` (tried first: a pnpm patch of `dist/Toast/FocusProxy.{js,cjs}` without `aria-hidden` cleared the audit), the **status toasts are gone**. A permanent "closed" toast was a misuse of a transient notification; the status is now a line above the opening hours in the footer (`components/Footer/StoreStatus.vue`, `useStoreStatus`). A chip next to the logo was tried first: on phones only the dot fit, on the desktop the text ran into the navigation, and inside the logo link it broke the link's accessible name. Transient toasts stay on Nuxt UI; their proxies only exist for seconds. Upstream issue for the proxy still worth filing.
27
+ - The status line is client only (`ClientOnly` with a placeholder of the same size): the open/closed state depends on the current time, and the server's clock/time zone is not the shop's. Server-rendered status would need a configured time zone; separate issue if wanted.
28
+ - La Fattoria keeps its own `main.css`; the same `--ui-primary` and `--ui-success` changes went there as veliu/pizzerialafattoria#346.
29
+
30
+ ## Implementation
31
+
32
+ - `app/assets/css/main.css`: `--ui-primary` and `--ui-success` per mode, orange `brand-600` = `#c23d00`, `brand-700` = `#a83500`.
33
+ - `Product/Card.vue` and `Wishlist.vue` used `text-brand-500` / `text-primary-600` for product numbers and prices; they now use `text-primary`, so they follow the mode-aware token.
34
+ - `useStoreStatus`: open → closing time of the current interval; closed → `getNextOpeningTime`. Refreshes the clock every minute. `app.vue` keeps loading business hours and holidays on mount but no longer shows toasts.
35
+ - `Footer/StoreStatus.vue`: "Geöffnet bis 23:00 Uhr" or "Geschlossen, wir öffnen wieder …", no link (the old toast's "Zur Speisekarte" action was dropped on purpose). `role="status"`, placeholder of the same height while unknown.
36
+ - `--ui-text-muted` in light mode is `#6b6b6b` (was `#737373`, 4.38:1 on `--ui-bg-elevated`, the header navigation background). `UHeader` gets `:title="site.name"`: Nuxt UI's default made the logo link read "Nuxt UI".
37
+ - Docs: contrast rule in `homepage/content/{de,en}/docs/8.storefront/2.configuration.md` and the demo-shop checklist in the root `CLAUDE.md`.
38
+
39
+ ## Not covered
40
+
41
+ - `error`, `warning` and `info` keep Nuxt UI's 500 step in light mode (`red-500` on white is 3.81); form validation text would need the same treatment.
42
+ - The demos `hey-amore` and `masala-mio` map `brand-600` to `rose-600`/`red-600` (4.70/4.83 on white, below 5:1 on the tint). Their scales should move `brand-600` to the 700 step of their Tailwind colour.
43
+
44
+ ## Verification
45
+
46
+ See the PR description.
@@ -0,0 +1,28 @@
1
+ # Issue #290: Address, phone, opening hours and Google link in the footer
2
+
3
+ As of 2026-09-10, branch `feature/290-footer-nap`.
4
+
5
+ ## Decisions (agreed with Lirim)
6
+
7
+ - Data comes from `runtimeConfig.public.site` (platform-neutral, via env): `address.street`, `address.postalCode`, `address.city` (since #274), `telephone`, `googleBusinessProfileUrl`. The same values will later feed the `Restaurant` schema from #272. Long-term the values move to the Shopware plugin config (shopbite-de/shopware-plugin#15, storefront #298), env stays as fallback.
8
+ - A dedicated contact block above the Shopware footer navigation (not extra columns), so it stays readable regardless of the number of navigation columns.
9
+ - Opening hours: consecutive days with identical intervals are grouped, days without hours show as "Ruhetag". No holidays/closing days in the footer.
10
+ - La Fattoria: only a note in the PR, no special handling (see below).
11
+
12
+ ## Implementation
13
+
14
+ - `app/components/Footer/Contact.vue` (`<address>` for NAP, `<dl>` for hours), rendered in the `#top` slot of `Footer.vue`. Empty values are hidden; without contact data and without opening hours the block renders nothing.
15
+ - `app/utils/openingHours.ts`: `groupOpeningHours` (weekdays 1 = Mon … 7 = Sun, seconds stripped, intervals sorted by opening time) and `toTelHref`.
16
+ - **SSR:** `useBusinessHours` uses `immediate: false`; `app.vue` only loads the hours `onMounted` (open/closed toast). To get the hours into the HTML, the footer calls `onServerPrefetch(() => refresh())`. The data lands in the payload under the key `business-hours`, the client hydrates with it, and `app.vue` refreshes on mount as before. Costs one Store API call per SSR render.
17
+ - Fixed the "Bestellsystm" typo in the footer.
18
+
19
+ ## Pitfalls
20
+
21
+ - A `mockNuxtImport("useRuntimeConfig")` without `app.baseURL` breaks the router setup of the Nuxt test environment (`useRouter()` undefined, see #294; `HeaderRight.test.ts` mocks with `app.baseURL` and works). `test/nuxt/FooterContact.test.ts` sets the real runtime config via `Object.assign` instead.
22
+ - After switching branches across #292, `@nuxtjs/sitemap` was missing from `node_modules` (`nuxt prepare`: "Cannot resolve module"). Run `pnpm install --frozen-lockfile` after every switch to a newer `main`.
23
+
24
+ ## After the release for Pizzeria La Fattoria
25
+
26
+ - Set env: `NUXT_PUBLIC_SITE_ADDRESS_STREET="Kantstr. 6"`, `NUXT_PUBLIC_SITE_ADDRESS_POSTAL_CODE=63179`, `NUXT_PUBLIC_SITE_ADDRESS_CITY=Obertshausen`, `NUXT_PUBLIC_SITE_TELEPHONE`, `NUXT_PUBLIC_SITE_GOOGLE_BUSINESS_PROFILE_URL`.
27
+ - **Clarify the phone number:** imprint says `+49 6104 71427`, the Shopware footer navigation `tel:+491726723920`. For NAP consistency use one number, identical to the Google Business Profile.
28
+ - Remove the link categories "Kantstraße 6" and "Tel: …" in the Shopware folder "Unternehmen", otherwise address and phone appear twice in the footer.
@@ -0,0 +1,24 @@
1
+ # Issue #291: SEO URLs with a missing or extra trailing slash
2
+
3
+ As of 2026-09-10, branch `fix/291-seo-url-trailing-slash`.
4
+
5
+ ## Cause
6
+
7
+ `c/[...all].vue` and `speisekarte/[...all].vue` resolve the path via `useNavigationSearch().resolvePath`. That filters `/store-api/seo-url` exactly on `seoPathInfo`. Shopware stores category URLs with a trailing slash (`c/Pizza/`) and product URLs without (`Pizza-Margherita/21`). The fallback `getRouteFromPathInfo` from `@shopware/helpers` only handles technical paths (`/navigation/<id>`, `/detail/<id>`, ...) and returns `null` otherwise. Result: `/c/Pizza` → 404 (verified live).
8
+
9
+ ## Solution
10
+
11
+ - `app/utils/seoPath.ts` → `resolveSeoPath(path, resolve)`: exact lookup; on a miss exactly one second lookup with the trailing slash toggled. Hits yield `redirectPath` from `seoPathInfo` (not the toggled path), so the redirect always targets the backend SEO URL. Hits without `seoPathInfo` (technical routes) do not count, `/` is not toggled.
12
+ - `app/composables/useSeoUrlRoute.ts` bundles resolution, 404 and `navigateTo(..., { redirectCode: 301, replace: true })` incl. query parameters. Both category pages use it; the product pages from #289 can reuse it for their URLs.
13
+ - The `useAsyncData` value now has the shape `{ seoUrl, redirectPath }` (key unchanged: `cmsResponse<path>`).
14
+ - On the side: removed a stray `H` before `<script>` in `speisekarte/[...all].vue`.
15
+
16
+ ## Cost
17
+
18
+ Only paths that do not match exactly trigger a second Store API call (unknown paths from bots: 2 calls instead of 1, then 404).
19
+
20
+ ## Not covered
21
+
22
+ - Non-canonical SEO URLs (old URLs after a rename, `isCanonical: false`) are still served instead of redirected to the canonical one.
23
+ - Technical URLs (`/navigation/<id>`) are not routed at all (they hit the content catch-all and 404); see #289 and `docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md`.
24
+ - Differently cased paths: covered by #244 (same note).
@@ -0,0 +1,33 @@
1
+ # Issue #294: Matomo without configuration loads `cdn.matomo.cloud/undefined`
2
+
3
+ As of 2026-09-10, branch `fix/294-matomo-without-config`.
4
+
5
+ ## Cause
6
+
7
+ - `$production.scripts.registry.matomoAnalytics: { trigger: "onNuxtReady" }` made the plugin generated by `@nuxt/scripts` call `useScriptMatomoAnalytics()` on every page, regardless of the configuration.
8
+ - The registry implementation (`runtime/registry/matomo-analytics.js`, 1.3.9) falls back to the Matomo cloud without `matomoUrl`: `https://cdn.matomo.cloud/${cloudId}/`. Without `cloudId` that becomes `.../undefined/matomo.js`.
9
+ - `useTrackEvent` also called `useScriptMatomoAnalytics()` unconditionally. In the dev server (no registry entry there) that loaded the script on the first tracking call with the default trigger `client`.
10
+ - Result without Matomo env (demo shops, new customers): a 404 in the console and a request carrying the visitor's IP to a third party without consent.
11
+
12
+ ## Solution
13
+
14
+ - Registry entry removed. `app/composables/useMatomo.ts` only creates the script when `matomoUrl` and `siteId` are set in `runtimeConfig.public.scripts.matomoAnalytics`, otherwise `null`.
15
+ - `app/plugins/matomo.ts` (universal, so the preload stays in the SSR HTML) calls `useMatomo()` on every page; it replaces the generated registry plugin incl. page view tracking.
16
+ - `useTrackEvent` pushes through `useMatomo()?.proxy._paq`; without configuration tracking is a no-op.
17
+ - No option values are passed: `useRegistryScript` merges `runtimeConfig.public.scripts.matomoAnalytics` itself via `defu`. Plugin and `useTrackEvent` therefore get the same script instance (same key, same `src`). The rule from #259 still holds: no placeholder values in options that get inlined into the build.
18
+
19
+ ## Pitfalls
20
+
21
+ - The build warning `env var NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_MATOMO_URL is set but matomoAnalytics is not registered in scripts.registry` is a false positive: the `@nuxt/scripts` validator only checks the registry entry. The values still arrive via `runtimeConfig.public.scripts.matomoAnalytics` (see verification).
22
+ - A `mockNuxtImport("useRuntimeConfig")` without `app.baseURL` breaks the router setup of the Nuxt test environment (`useRouter()` in `@nuxt/test-utils` is then `undefined`; `HeaderRight.test.ts` mocks with `app.baseURL` and works). `test/nuxt/useTrackEvent.test.ts` therefore sets the real runtime config.
23
+
24
+ ## Verification
25
+
26
+ Production build locally against the La Fattoria Store API, three scenarios, Playwright records every request containing `matomo`:
27
+
28
+ - Without Matomo env and with `MATOMO_URL` only: no `matomo.js` reference in the SSR HTML, no request (neither `cdn.matomo.cloud` nor anything else).
29
+ - With URL + site ID: preload and request to `<matomoUrl>/matomo.js`, `_paq` contains `setTrackerUrl`, `setSiteId`, `trackPageView`. A client-side search from `/c/Pizza/` to `/suche?q=salat` pushes `trackSiteSearch` through the same instance (only one script request).
30
+
31
+ ## Behaviour change
32
+
33
+ Matomo now depends only on the configuration, no longer on `$production`. A dev server with a complete Matomo env therefore loads Matomo from the first page view (previously only on the first tracking event).
@@ -0,0 +1,25 @@
1
+ # Issue #295: Hydration mismatch on direct load of `/suche`
2
+
3
+ As of 2026-09-10, branch `fix/295-search-hydration-mismatch`.
4
+
5
+ ## Cause
6
+
7
+ Vue (dev server) named the element:
8
+
9
+ ```
10
+ Hydration text mismatch in <SelectValue>
11
+ - rendered on server: "Sortieren"
12
+ - expected on client: "Top results"
13
+ ```
14
+
15
+ `suche.vue` snapshotted the sorting select at setup: `ref(currentSortingOrder.value ?? "Sortieren")`. On the server the listing (`useLazyAsyncData`) resolves after setup and watchers do not run during SSR, so the server rendered the placeholder. The client hydrates with the payload present and rendered the actual sorting. Same defect as #239, which was fixed in `Category/Listing.vue` only.
16
+
17
+ ## Solution
18
+
19
+ - `app/composables/useSortingSelection.ts` holds the pattern from #239 once: `currentSorting` is a writable computed that follows the listing data and keeps the user's choice as an override; setting the placeholder clears the override. Exported `SORTING_PLACEHOLDER`.
20
+ - `suche.vue` and `Category/Listing.vue` use it. In `suche.vue` a new search term also resets the override (as #249 did for filters), because `applySearch` sends no order and the response falls back to the default sorting.
21
+ - Unit test `test/unit/useSortingSelection.spec.ts` covers the setup-before-data case.
22
+
23
+ ## Verification
24
+
25
+ Dev server against the demo Shopware, Playwright collecting Vue hydration warnings: before the fix `/suche?q=pizza` reported the mismatch above; after it `/suche?q=pizza`, `/suche?q=salat` and `/speisekarte/pizza/` report none. Changing the sorting on `/suche` still triggers a search request with `order` and updates the select. Production build checks in the PR.
@@ -0,0 +1,19 @@
1
+ # Issue #296: Search not tracked on direct load of `/suche`
2
+
3
+ As of 2026-09-10, branch `fix/296-track-direct-search`.
4
+
5
+ ## Cause
6
+
7
+ `useListingSearch` fetches the results during SSR via `useLazyAsyncData`; they end up in the payload. On a direct load the client hydrates with them, `elements` never changes, and the `watch(elements, …)` in `suche.vue` (not `immediate`) never fires. Only a search that re-fetches on the client (query change, sorting) triggered `trackSiteSearch`. Verified on a production build: direct load of `/suche?q=pizza` → `_paq` only had `trackPageView`.
8
+
9
+ ## Solution
10
+
11
+ `app/composables/useSearchTracking.ts` replaces the inline watcher:
12
+
13
+ - Watches `[elements, showSkeleton]` with `immediate: import.meta.client`, so results already present at setup are tracked as well. On the server the watcher does not fire.
14
+ - Tracks once per search term (`lastTrackedTerm`). A sorting change re-fetches the same term and is no longer reported again (previously it produced a second `trackSiteSearch`).
15
+ - Client-side navigation: the skeleton is shown until the fetch completes, so the empty initial `elements` are not tracked.
16
+
17
+ ## Verification
18
+
19
+ Production build against the La Fattoria Store API with Matomo configured: direct load of `/suche?q=pizza` pushes exactly one `trackSiteSearch`; a client-side search from `/c/Pizza/` to `/suche?q=salat` still pushes one.
@@ -0,0 +1,64 @@
1
+ # Issue #312: Store API criteria as POST body
2
+
3
+ As of 2026-09-10, branch `fix/312-store-api-criteria-post`.
4
+
5
+ ## Cause
6
+
7
+ The server routes for listing, category, product and cross-selling sent their
8
+ criteria as `_criteria` query parameters (`encodeForQuery` from
9
+ `@shopware/api-client/helpers`), and `useNavigation` used the
10
+ `readNavigationGet` operation the same way. Shopware applies `associations`
11
+ and `limit` from the query string, but not the `includes` projection: every
12
+ entity came back with all of its fields. Measured on the La Fattoria Store
13
+ API (category "Pizza", 100 products): the listing route returned 285 KB with
14
+ 92 fields per product; the same criteria as a POST body returns 147 KB with
15
+ the 11 requested fields. `/api/category/<id>` returned 40 fields incl.
16
+ `cmsPage`, `children` and `translations` although the route asked for five.
17
+ The category page shipped 546 KB of HTML (393 KB Nuxt payload).
18
+
19
+ ## Solution
20
+
21
+ - `server/utils/storeApi.ts`: `storeApiPost(path, body, { headers })` for
22
+ the Store API, plus `MEDIA_INCLUDES` (`media`, `media_thumbnail`,
23
+ `product_media`) so category and product images keep the URL, thumbnails
24
+ and intrinsic size that `mediaSrcSet`/`mediaSize` need (#273).
25
+ - Listing, category, product and cross-selling routes send their criteria as
26
+ the POST body; the category route lists the fields the header,
27
+ `useCategorySeo` and the menu-section schema read (`media`, `description`,
28
+ `metaTitle`, `metaDescription`, `active`, `type`, …), which used to arrive
29
+ only because the projection was ignored.
30
+ - `useNavigation` uses `readNavigation post /navigation/{activeId}/{rootId}`
31
+ with the criteria as body (plus `id` in the includes).
32
+ - Cache keys of the `defineCachedEventHandler`s are unchanged.
33
+ - `useNavigationSearch` (project copy of the layer composable, older) still
34
+ sends `_criteria` on GET for the SEO URL lookup; it uses no `includes`, so
35
+ nothing to gain there.
36
+
37
+ ## Verification
38
+
39
+ Production build against the La Fattoria Store API (category "Pizza", 100
40
+ products), uncompressed sizes:
41
+
42
+ | Response | Before | After |
43
+ | ------------------------- | ------ | ------------------------- |
44
+ | `/api/listing/<id>` | 285 KB | 147 KB (11 fields/product) |
45
+ | `/api/category/<id>` | 40 fields | 13 fields, 1 KB |
46
+ | `/` HTML (Nuxt payload) | 163 KB | 111 KB (32 KB) |
47
+ | `/c/Pizza/` HTML (payload) | 546 KB (393 KB) | 314 KB (134 KB) |
48
+
49
+ Category media keeps `url`, `thumbnails` (400/800/1920) and `metaData`.
50
+ Playwright category navigation (SSR, client link navigation, redirect,
51
+ back) shows the same product counts and no hydration warnings. Lighthouse
52
+ mobile on `/c/Pizza/` is unchanged on the CPU side (TBT 600 ms, main
53
+ thread 3.9 s): the gain is transfer size only; script cost is #314.
54
+
55
+ The product cover projection could not be checked on La Fattoria: 39 of
56
+ 100 products carry a `coverId`, but none of them resolves to a `cover`,
57
+ with or without `includes` (the media rows are gone; a data problem of that
58
+ instance, unrelated to this change). Verified against Shopware's public
59
+ demo Store API instead: the product route's criteria return 17 product
60
+ fields with `cover.media.{url,alt,thumbnails,metaData}`, and the listing
61
+ criteria return the 11 product fields with the same media shape. Option
62
+ images only read `media.url`, which `MEDIA_INCLUDES` keeps.
63
+
64
+ 235 unit tests, Prettier, ESLint, typecheck and build pass.
@@ -0,0 +1,29 @@
1
+ # Issue #313: Wishlist.vue re-imported Tailwind and Nuxt UI
2
+
3
+ As of 2026-09-10, branch `fix/313-wishlist-scoped-tailwind`.
4
+
5
+ ## Cause
6
+
7
+ `app/components/Wishlist.vue` ended with a `<style scoped>` block that
8
+ started with `@import "tailwindcss"` and `@import "@nuxt/ui"` to make two
9
+ `@apply` rules for `h1`/`h2` resolve. Tailwind v4 emits the complete base
10
+ and the Nuxt UI theme into that scoped stylesheet, so the build shipped a
11
+ second `merkliste.*.css` of 288 KB (32 KB gzipped) next to the global
12
+ `entry.css` (253 KB). The component renders no `h1`/`h2`; the rules
13
+ matched nothing.
14
+
15
+ ## Solution
16
+
17
+ Remove the `<style>` block. No other component imports Tailwind inside a
18
+ `<style>` (`Contact/Form.vue` has a plain scoped rule). If a component
19
+ needs `@apply` in the future, use `@reference "tailwindcss"` (Tailwind v4)
20
+ instead of `@import`; it resolves utilities without re-emitting the base.
21
+
22
+ ## Verification
23
+
24
+ - Production build: the `merkliste.*.css` chunk is gone; the remaining
25
+ chunks are `entry.css` (253 KB) and `kontakt.css` (117 B).
26
+ - `/merkliste` on the production build against the La Fattoria Store API
27
+ loads only `entry.css` (25 KB gzipped), renders the empty-wishlist state
28
+ as before, no console errors.
29
+ - Prettier and ESLint pass.
@@ -0,0 +1,119 @@
1
+ # Issue #314: Mobile JavaScript cost
2
+
3
+ As of 2026-09-10, branch `fix/314-mobile-js-cost`.
4
+
5
+ ## Measurement setup
6
+
7
+ Production build, La Fattoria Store API, Lighthouse 12.8.2 mobile
8
+ (simulated throttling, 4× CPU) behind the h2/gzip proxy from
9
+ `docs/notes/2026-09-10-issue-273-performance-media.md`; two runs per page,
10
+ same machine. Chunk attribution comes from the client manifest that Nuxt
11
+ inlines into `.output/server/chunks/virtual/precomputed.mjs` (the preload
12
+ set of the entry is what the head lists as `modulepreload`).
13
+
14
+ ## Findings on the baseline (main)
15
+
16
+ - The entry preloads 102 scripts (302 KB gzipped); 54 of them are below
17
+ 1 KB (reka-ui and Nuxt UI internals shared by several pages).
18
+ - `SalesChannelSwitch` was rendered on every page although the feature is
19
+ off by default: it pulled `USelectMenu` (Combobox virtualizer, 25 KB
20
+ gzipped) into the entry and fired a `/shopbite/multi-channel-group`
21
+ request per page.
22
+ - `useMatomo` (the @nuxt/scripts registry composable, 10 KB gzipped) sat in
23
+ the entry through `useTrackEvent`, also for shops without Matomo.
24
+ - `Header.vue` rendered a login `USlideover` that nothing opened.
25
+ - `NuxtLink` prefetched the chunks of every link in view: ~20 chunks and a
26
+ page stylesheet (72 KB) during the initial load of the home page.
27
+ - On the category page the cart drawer, the mobile filter drawer (both
28
+ vaul) and one `UCollapsible` per card were mounted with the page; the
29
+ drawer chunk and the collapsible chunk each cost ~400 ms of scripting
30
+ (mostly forced layout on a 1,200-element page).
31
+ - Client-side navigation to a content page (`/agb`) or back to `/` loads
32
+ the SQLite WASM build (865 KB) plus the collection dump, because
33
+ `queryCollection()` in the browser prefers WASM whenever
34
+ `window.WebAssembly` exists.
35
+ - `Style & Layout` (~1.1 s on the home page, 313 DOM elements) is the
36
+ first render of the 253 KB stylesheet; not JavaScript, not part of this
37
+ issue.
38
+ - Sentry ships no client code (no `sentry.client.config.ts`).
39
+
40
+ ## Changes
41
+
42
+ 1. `LazySalesChannelSwitch v-if="multiChannel"` in `Header.vue` and
43
+ `Header/Body.vue`; the dead login slideover is removed.
44
+ 2. `plugins/matomo.ts` imports `useMatomo` after `onNuxtReady`;
45
+ `useTrackEvent` pushes to Matomo's `_paq` queue directly (matomo.js
46
+ replays it), gated by the new `useMatomoConfig()`.
47
+ 3. `hydrateWhenVisible()` (`app/utils`): keeps the server-rendered markup of
48
+ a component and hydrates it when it comes within 600 px of the viewport,
49
+ without turning it into a separate chunk. Used for the product cards in
50
+ `Category/Listing.vue` and `pages/suche.vue` and for the footer in
51
+ `app.vue`. The margin exceeds the reveal margin of `AnimatedSection`
52
+ (100 px), so the scroll animation still runs.
53
+ 4. Cart drawer (`Header/Right.vue`), mobile filter drawer
54
+ (`Category/Listing.vue`) and the product options collapsible
55
+ (`Product/CardFooter.vue`) are created on first use (`v-if` + `nextTick`
56
+ before opening); the `ClientOnly` wrappers they needed are gone.
57
+ 5. `experimental.defaults.nuxtLink.prefetchOn = { visibility: false,
58
+ interaction: true }`: route chunks load on hover/touch.
59
+ 6. `server/api/content/home.get.ts` and `page.get.ts` run the content
60
+ queries on the server (`@nuxt/content/server`); `pages/index.vue` and
61
+ `pages/[...all].vue` fetch them.
62
+ 7. Rolldown `codeSplitting.groups` (`nuxt.config.ts`, `vite.build`):
63
+ framework and UI modules shared by at least two chunks form two chunks
64
+ instead of ~60 tiny ones.
65
+
66
+ ## Results (Lighthouse mobile, two runs each)
67
+
68
+ | Page | Metric | Baseline | After |
69
+ | --- | --- | --- | --- |
70
+ | `/` | TBT | 330–400 ms | 150–170 ms |
71
+ | `/` | Script evaluation | 705–811 ms | 600–630 ms |
72
+ | `/` | Script requests (transfer) | 135 (394 KB) | 34–35 (335 KB) |
73
+ | `/` | Main thread | 2.5–2.6 s | 2.1–2.2 s |
74
+ | `/c/Pizza/` | TBT | 570–590 ms | 300–340 ms |
75
+ | `/c/Pizza/` | Script evaluation | 1.5–1.6 s | 1.1–1.2 s |
76
+ | `/c/Pizza/` | Script requests (transfer) | 133 (394 KB) | 35 (321 KB) |
77
+ | `/c/Pizza/` | Main thread | 4.0 s | 2.9–3.1 s |
78
+
79
+ Three runs of the final build (two of the chunk-group step, one of the
80
+ final commit); the category numbers are for the 29-product "Pizza"
81
+ category, the 100-product case scales with the same mechanism (cards
82
+ hydrate on scroll).
83
+
84
+ Intermediate steps: changes 1–3 brought the home page to TBT 280–290 ms
85
+ / 650–680 ms script evaluation and the category page to 420–440 ms /
86
+ 1.25–1.3 s; changes 4–5 to 190–260 ms / 570–600 ms and 390–480 ms /
87
+ 1.14–1.2 s; the chunk groups (7) cut the requests from 116 to 34 and
88
+ took TBT to 170 ms / 340 ms. The entry's preload set went from 102
89
+ scripts (302 KB gzipped) to 25 (301 KB): the shared `ui` chunk carries
90
+ UI code that not every page needs, but the bytes are the same and the
91
+ module overhead is gone.
92
+
93
+ FCP (3.0–3.3 s) and LCP are unchanged: they are the local headless
94
+ first-paint artefact described in the #273 note and the stylesheet
95
+ (`Style & Layout` ~1 s on 311 DOM elements), not JavaScript.
96
+
97
+ ## Not done
98
+
99
+ - `Style & Layout` ~1 s on every page comes from the 253 KB Tailwind /
100
+ Nuxt UI stylesheet; a CSS topic of its own.
101
+ - `UHeader` imports `UModal`, `UDrawer` and `USlideover` statically
102
+ (Nuxt UI), so vaul stays in the entry even though the drawers are
103
+ created on demand.
104
+ - The wishlist button on the product card has only a tooltip, no
105
+ `aria-label` (noticed while writing the checks).
106
+ - `nuxt-vitalizer`'s `disablePreloadLinks` was not tried: with 25
107
+ preloads left, the trade (a later start per chunk) has little to gain.
108
+
109
+ ## Verification
110
+
111
+ - Playwright (mobile viewport): first and middle product card open their
112
+ options after scrolling, the wishlist button of the last card updates the
113
+ header count, the filter drawer and the cart drawer open, the footer's
114
+ colour mode button works, no console errors; client-side navigation to
115
+ `/agb` and back to `/` no longer requests the WASM build or a SQL dump.
116
+ - Matomo with `NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_*` set: the registry
117
+ chunk loads after `onNuxtReady`, `matomo.js` is requested and `_paq`
118
+ holds the page view.
119
+ - Unit tests, Prettier, ESLint, typecheck and build pass.