feat(herbatika): render homepage promo from CMS page - #543
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe homepage now fetches promotional content from the CMS, sanitises the supplied HTML, and renders dynamic promotion text and images. A redirect sends ChangesHomepage promotion
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Visitor
participant HomePage
participant CMS
participant HomepagePromoSection
Visitor->>HomePage: open homepage
HomePage->>CMS: fetch homepage promotion
CMS-->>HomePage: return promotion data or null
HomePage->>HomepagePromoSection: pass homepagePromo
HomepagePromoSection-->>Visitor: render sanitised promotion or fallback
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.5.5)apps/herbatika/src/styles/tokens/_herbatika-spacing.cssFile contains syntax errors that prevent linting: Line 1: Tailwind-specific syntax is disabled. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR moves the Herbatika homepage promotional section to CMS-managed content while retaining static fallbacks.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/herbatika/src/app/page.tsx | Fetches the homepage promo alongside existing SSR data and passes it into the homepage composition. |
| apps/herbatika/src/components/homepage/sections/homepage-promo-section.tsx | Renders CMS promo fields with sanitized rich text, static fallbacks, and hash-target scrolling. |
| apps/herbatika/src/lib/storefront/cms-homepage-promo.ts | Maps the dedicated CMS page into the homepage promo data contract and rejects incomplete title/content records. |
| apps/herbatika/next.config.ts | Redirects the standalone CMS promo path to the homepage promo anchor. |
| apps/herbatika/src/styles/tokens/_herbatika-spacing.css | Defines a tokenized scroll offset accounting for the mobile header and search form. |
Reviews (2): Last reviewed commit: "fix(herbatika): scroll to homepage promo..." | Re-trigger Greptile
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts`:
- Around line 1-4: Reorder the specifiers in the import declaration for
sanitizeHtml and SanitizeHtmlOptions so the type-only specifier appears before
the value specifier, without changing the import source or running Biome.
In `@apps/herbatika/src/styles/tokens/_herbatika-spacing.css`:
- Around line 39-43: Update the calc expression for
--spacing-homepage-promo-scroll-offset so each continuation operator is placed
at the beginning of the following line, preserving the existing spacing
calculation and satisfying the stylesheet formatting rule.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f1fe8fc6-01a8-43c1-9f96-4caa987d5718
📒 Files selected for processing (8)
apps/herbatika/next.config.tsapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-html.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/lib/storefront/cms.tsapps/herbatika/src/styles/tokens/_herbatika-spacing.css
💤 Files with no reviewable changes (1)
- apps/herbatika/src/lib/storefront/cms.ts
📜 Review details
⚠️ CI failures not shown inline (2)
GitHub Actions: CI / 0_main.txt: feat(herbatika): render homepage promo from CMS page
Conclusion: failure
##[group]❌ > nx run herbatika:lint
�[2m$ biome check�[22m
next.config.ts:73:3 lint/suspicious/useAwait ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× This async function lacks an await expression.
71 │ reactCompiler: true,
72 │ cacheComponents: true,
> 73 │ async redirects() {
│ ^^^^^^^^^^^^^^^^^^^
> 74 │ return [
...
> 80 │ ]
> 81 │ },
│ ^
82 │ outputFileTracingRoot: join(__dirname, "../../"),
83 │ outputFileTracingExcludes: {
i Remove this async modifier, or add an await expression in the function.
71 │ reactCompiler: true,
72 │ cacheComponents: true,
> 73 │ async redirects() {
│ ^^^^^^^^^^^^^^^^^^^
> 74 │ return [
...
> 80 │ ]
> 81 │ },
│ ^
82 │ outputFileTracingRoot: join(__dirname, "../../"),
83 │ outputFileTracingExcludes: {
i Async functions without await expressions may not need to be declared async.
src/app/page.tsx format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Formatter would have printed the following content:
8 8 │
9 9 │ export default async function HomePage() {
10 │ - ··const·[{·dehydratedState·},·heroBanners,·homepagePromo]·=·await·Promise.all(
11 │ - ····[
12 │ - ······prefetchHomePageStorefrontData(),
13 │ - ······fetchCmsHeroBanners(),
14 │ - ······fetchCmsHomepagePromo(),
15 │ - ····]
16 │ - ··)
10 │ + ··const·[{·dehydratedState·},·heroBanners,·homepagePromo]·=·await·Promise.all([
11 │ + ····prefetchHomePageStorefrontData(),
12 │ + ····fetchCmsHeroBanners(),
13 │ + ····fetchCmsHomepagePromo(),
14 │ + ··])
17 15 │
18 16 │ return (
src/components/homepage/sections/homepage-promo-html.ts:1:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━
× The imports and exports are not sorted.
> 1 │ impo...
GitHub Actions: CI / main: feat(herbatika): render homepage promo from CMS page
Conclusion: failure
##[group]❌ > nx run herbatika:lint
�[2m$ biome check�[22m
next.config.ts:73:3 lint/suspicious/useAwait ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× This async function lacks an await expression.
71 │ reactCompiler: true,
72 │ cacheComponents: true,
> 73 │ async redirects() {
│ ^^^^^^^^^^^^^^^^^^^
> 74 │ return [
...
> 80 │ ]
> 81 │ },
│ ^
82 │ outputFileTracingRoot: join(__dirname, "../../"),
83 │ outputFileTracingExcludes: {
i Remove this async modifier, or add an await expression in the function.
71 │ reactCompiler: true,
72 │ cacheComponents: true,
> 73 │ async redirects() {
│ ^^^^^^^^^^^^^^^^^^^
> 74 │ return [
...
> 80 │ ]
> 81 │ },
│ ^
82 │ outputFileTracingRoot: join(__dirname, "../../"),
83 │ outputFileTracingExcludes: {
i Async functions without await expressions may not need to be declared async.
src/app/page.tsx format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Formatter would have printed the following content:
8 8 │
9 9 │ export default async function HomePage() {
10 │ - ··const·[{·dehydratedState·},·heroBanners,·homepagePromo]·=·await·Promise.all(
11 │ - ····[
12 │ - ······prefetchHomePageStorefrontData(),
13 │ - ······fetchCmsHeroBanners(),
14 │ - ······fetchCmsHomepagePromo(),
15 │ - ····]
16 │ - ··)
10 │ + ··const·[{·dehydratedState·},·heroBanners,·homepagePromo]·=·await·Promise.all([
11 │ + ····prefetchHomePageStorefrontData(),
12 │ + ····fetchCmsHeroBanners(),
13 │ + ····fetchCmsHomepagePromo(),
14 │ + ··])
17 15 │
18 16 │ return (
src/components/homepage/sections/homepage-promo-html.ts:1:1 assist/source/organizeImports FIXABLE ━━━━━━━━━━
× The imports and exports are not sorted.
> 1 │ impo...
🧰 Additional context used
📓 Path-based instructions (10)
apps/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Import UI components using the
@techsio/ui-kitnamespace, not@libs/ui, for runtime apps
Files:
apps/herbatika/next.config.tsapps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run Biome linting and formatting only on changed files using 'bunx biome check --write path/to/file'
Files:
apps/herbatika/next.config.tsapps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/herbatika/**
📄 CodeRabbit inference engine (AGENTS.md)
apps/herbatika/**: Read apps/herbatika/AGENTS.md before editing Herbatika app and follow its specific configuration which overrides root assumptions
Herbatika app runs on http://localhost:3001 and routes work through libs/ui/skills and libs/storefront-data/skills workflows
Files:
apps/herbatika/next.config.tsapps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/styles/tokens/_herbatika-spacing.cssapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/**/!(medusa-be)/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use modern React patterns and React 19 for frontend applications in the monorepo
Files:
apps/herbatika/next.config.tsapps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/herbatika/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)
apps/herbatika/**/*.{ts,tsx}: Keep app-specific behavior in Herbatika; promote behavior into shared libraries only when there is a real API or platform gap.
For UI work consuming@techsio/ui-kit, follow the required UI-kit workflow and relevant usage, integration, token, and audit skills; library authoring must followlibs/ui/AGENTS.mdand library skills.
For storefront-data work, use the relevant shared-data skill and prefer the preset surface from@techsio/storefront-data, including shared hooks, flows, query keys, query options, cache policy, and SSR helpers.
Files:
apps/herbatika/next.config.tsapps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/herbatika/**/*
📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)
apps/herbatika/**/*: Do not edit generated outputs in.next/,dist/, orstorybook-static/. Do not edit ignoredlocal/reference files unless explicitly requested.
The app runs onhttp://localhost:3001; do not assume the root frontend-demo URLlocalhost:3000. Prefer root-invoked scripts usingpnpm -C apps/herbatika <script>.
Do not run Biome commands in this app until the stability issue is resolved.
Treat approximately 200 lines per source file as a soft limit; exceeding it should prompt refactoring consideration, not act as an absolute blocker.
Files:
apps/herbatika/next.config.tsapps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/styles/tokens/_herbatika-spacing.cssapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/herbatika/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)
apps/herbatika/src/**/*.{ts,tsx}: Use internal UI primitives and components first; avoid raw<button>,<input>,<select>,<textarea>,<img>, and inline SVG icons unless a documented exception exists.
For Next.js links and images, prefer UI-kit components withnext/linkornext/imageadapter support when available.
Use token-based utility classes instead of raw Tailwind palette or spacing values.
Put Herbatika visual differences insrc/styles/tokens/**; avoid JSXclassNameoverrides that duplicate UI-kit component props or tokens.
Keep app-local data code thin: SDK instances, field defaults, localized text, toasts, analytics, form DTOs, address adapters, and Herbatika-specific read models may remain local.
Move repeated backend communication, query-key construction, cache synchronization, mutation invalidation, and reusable Medusa behavior intolibs/storefront-data.
Use explicit package subpath imports; never import from package roots ordist/.
Keep server-only and client-only boundaries explicit; useserver-onlyandgetServerQueryClientfor Server Component and SSR data paths.
Prefer small composable modules and shared helpers over duplicated logic.
Use kebab-case file names and PascalCase React component names.
Files:
apps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/herbatika/src/lib/storefront/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)
Compose the shared storefront data layer in
src/lib/storefront/storefront.tsand adjacentstorefront-definition*files.
Files:
apps/herbatika/src/lib/storefront/cms-homepage-promo.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Vitest for running tests in backend and UI library projects
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.test.ts
apps/herbatika/**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)
Manual QA must include a user-flow smoke pass, DevTools Console and Network checks, and visual regression review; save evidence under
.qa/local-web-testing-YYYY-MM-DD/.
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.test.ts
🧠 Learnings (2)
📚 Learning: 2026-06-14T17:05:00.817Z
Learnt from: KaiUweCZE
Repo: TechsioCZ/new-engine PR: 442
File: apps/herbatika/src/components/reviews/product-review-token-page.tsx:36-42
Timestamp: 2026-06-14T17:05:00.817Z
Learning: When reviewing code in apps/herbatika that calls `useProducts(input: ProductListInput, options?)`, treat `enabled` provided inside the first argument (`input`) as intentional and valid. The `ProductListInput` type includes an optional `enabled?: boolean` (via `BaseStorefrontProductListInput & { enabled?: boolean }`), and the hook infrastructure strips `enabled` before constructing the HTTP request and query key (following the same `stripListInput` behavior used elsewhere). Therefore, do NOT flag `useProducts({ enabled: ... , ... }, options)` as a contract violation; `enabled` belongs in the input object, not in the `options` argument.
Applied to files:
apps/herbatika/src/components/product-detail/utils/html-sanitizer.tsapps/herbatika/src/lib/storefront/cms-homepage-promo.tsapps/herbatika/src/components/homepage/sections/homepage-promo-html.test.tsapps/herbatika/src/components/homepage/sections/homepage-promo-section.tsxapps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
📚 Learning: 2025-12-16T19:45:17.746Z
Learnt from: BleedingDev
Repo: NMIT-WR/new-engine PR: 207
File: libs/ui/src/molecules/select.tsx:50-50
Timestamp: 2025-12-16T19:45:17.746Z
Learning: When reviewing Tailwind classes in TSX/TS files, prefer using square brackets for arbitrary CSS values and complex expressions. Specifically: - Do not use the parentheses syntax (z-(--z-index)) for anything beyond simple CSS variable references; this syntax auto-wraps in var() and cannot handle calc or complex functions. - Use the square brackets syntax (e.g., h-[calc(var(--available-height)-var(--spacing-content))]) for calc expressions, var with calc, and any complex CSS expressions. This rule applies broadly to Tailwind v4 usage in TSX code across the project.
Applied to files:
apps/herbatika/src/components/homepage/sections/homepage-promo-section.tsx
🪛 ast-grep (0.45.0)
apps/herbatika/src/components/homepage/sections/homepage-promo-section.tsx
[warning] 54-54: Usage of dangerouslySetInnerHTML detected. This bypasses React's built-in XSS protection. Always sanitize HTML content using libraries like DOMPurify before injecting it into the DOM to prevent XSS attacks.
Context: dangerouslySetInnerHTML
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation
(react-unsafe-html-injection)
🪛 GitHub Actions: CI / 0_main.txt
apps/herbatika/next.config.ts
[error] 73-81: Biome lint error (lint/suspicious/useAwait): async function 'redirects' has no await expression. Remove 'async' or add an await.
apps/herbatika/src/components/product-detail/utils/html-sanitizer.ts
[error] 99-105: Biome lint error (lint/nursery/useMaxParams): isAttributeAllowed has 5 parameters, but no more than 4 are allowed.
apps/herbatika/src/lib/storefront/cms-homepage-promo.ts
[error] 35-37: Biome formatting check failed. Collapse the mapCmsPageToHomepagePromo call to the expected single-line format.
apps/herbatika/src/components/homepage/sections/homepage-promo-section.tsx
[error] 53-53: Biome lint error (lint/nursery/useSortedClasses): CSS classes in the className attribute are not sorted.
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
[error] 1-4: Biome organizeImports check failed (assist/source/organizeImports). Reorder the type and value imports.
🪛 GitHub Actions: CI / main
apps/herbatika/next.config.ts
[error] 73-81: Biome lint/suspicious/useAwait: async function 'redirects' lacks an await expression. Remove async or add an await.
apps/herbatika/src/components/product-detail/utils/html-sanitizer.ts
[error] 99-105: Biome lint/nursery/useMaxParams: Function 'isAttributeAllowed' has 5 parameters; no more than 4 are allowed.
apps/herbatika/src/lib/storefront/cms-homepage-promo.ts
[error] 35-37: Biome formatter check failed. Format the mapCmsPageToHomepagePromo call according to Biome's expected formatting.
apps/herbatika/src/components/homepage/sections/homepage-promo-section.tsx
[error] 53-53: Biome lint/nursery/useSortedClasses: CSS classes in className are not sorted.
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
[error] 1-4: Biome assist/source/organizeImports: Imports and exports are not sorted. Run Biome's organize imports fix.
🪛 Stylelint (17.14.1)
apps/herbatika/src/styles/tokens/_herbatika-spacing.css
[error] 40-40: Unexpected newline after "+" (scss/operator-no-newline-after)
(scss/operator-no-newline-after)
[error] 41-41: Unexpected newline after "+" (scss/operator-no-newline-after)
(scss/operator-no-newline-after)
🔇 Additional comments (6)
apps/herbatika/next.config.ts (1)
73-81: LGTM!apps/herbatika/src/lib/storefront/cms-homepage-promo.ts (1)
8-8: LGTM!Also applies to: 13-31
apps/herbatika/src/components/product-detail/utils/html-sanitizer.ts (1)
44-52: LGTM!Also applies to: 100-116, 248-280, 292-313, 329-329
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts (1)
6-35: LGTM!apps/herbatika/src/components/homepage/sections/homepage-promo-html.test.ts (1)
1-50: LGTM!apps/herbatika/src/components/homepage/sections/homepage-promo-section.tsx (1)
2-6: LGTM!Also applies to: 18-33, 53-55
There was a problem hiding this comment.
♻️ Duplicate comments (1)
apps/herbatika/src/styles/tokens/_herbatika-spacing.css (1)
40-42:⚠️ Potential issue | 🟠 MajorRestore the formatter-approved
calclayout.CI still rejects this expression. Keep each
+at the end of the preceding line, as in Lines 64-68.Proposed fix
- var(--height-header-mobile) - + var(--height-search-form) - + var(--spacing-300) + var(--height-header-mobile) + + var(--height-search-form) + + var(--spacing-300)As per coding guidelines, do not run Biome commands in this app until the stability issue is resolved. Apply this formatting manually.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/herbatika/src/styles/tokens/_herbatika-spacing.css` around lines 40 - 42, Manually restore the formatter-approved calc layout in the spacing expression around the listed CSS variables by placing each “+” at the end of the preceding line, matching the existing pattern in the nearby Lines 64-68; do not run Biome commands.Sources: Coding guidelines, Linters/SAST tools, Pipeline failures
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@apps/herbatika/src/styles/tokens/_herbatika-spacing.css`:
- Around line 40-42: Manually restore the formatter-approved calc layout in the
spacing expression around the listed CSS variables by placing each “+” at the
end of the preceding line, matching the existing pattern in the nearby Lines
64-68; do not run Biome commands.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: af094f80-e9f0-4f07-ab3e-981f0e3034a3
📒 Files selected for processing (2)
apps/herbatika/src/components/homepage/sections/homepage-promo-html.tsapps/herbatika/src/styles/tokens/_herbatika-spacing.css
📜 Review details
⚠️ CI failures not shown inline (2)
GitHub Actions: CI / main: feat(herbatika): render homepage promo from CMS page
Conclusion: failure
##[group]❌ > nx run herbatika:lint
�[2m$ biome check�[22m
next.config.ts:73:3 lint/suspicious/useAwait ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× This async function lacks an await expression.
71 │ reactCompiler: true,
72 │ cacheComponents: true,
> 73 │ async redirects() {
│ ^^^^^^^^^^^^^^^^^^^
> 74 │ return [
...
> 80 │ ]
> 81 │ },
│ ^
82 │ outputFileTracingRoot: join(__dirname, "../../"),
83 │ outputFileTracingExcludes: {
i Remove this async modifier, or add an await expression in the function.
71 │ reactCompiler: true,
72 │ cacheComponents: true,
> 73 │ async redirects() {
│ ^^^^^^^^^^^^^^^^^^^
> 74 │ return [
...
> 80 │ ]
> 81 │ },
│ ^
82 │ outputFileTracingRoot: join(__dirname, "../../"),
83 │ outputFileTracingExcludes: {
i Async functions without await expressions may not need to be declared async.
src/app/page.tsx format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Formatter would have printed the following content:
8 8 │
9 9 │ export default async function HomePage() {
10 │ - ··const·[{·dehydratedState·},·heroBanners,·homepagePromo]·=·await·Promise.all(
11 │ - ····[
12 │ - ······prefetchHomePageStorefrontData(),
13 │ - ······fetchCmsHeroBanners(),
14 │ - ······fetchCmsHomepagePromo(),
15 │ - ····]
16 │ - ··)
10 │ + ··const·[{·dehydratedState·},·heroBanners,·homepagePromo]·=·await·Promise.all([
11 │ + ····prefetchHomePageStorefrontData(),
12 │ + ····fetchCmsHeroBanners(),
13 │ + ····fetchCmsHomepagePromo(),
14 │ + ··])
17 15 │
18 16 │ return (
src/components/homepage/sections/homepage-promo-section.tsx:53:23 lint/nursery/useSortedClasses FIXABLE ━━━━━━━━━━
× These CSS classes should be sorted.
51 │ ...
GitHub Actions: CI / 0_main.txt: feat(herbatika): render homepage promo from CMS page
Conclusion: failure
##[group]❌ > nx run herbatika:lint
�[2m$ biome check�[22m
next.config.ts:73:3 lint/suspicious/useAwait ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× This async function lacks an await expression.
71 │ reactCompiler: true,
72 │ cacheComponents: true,
> 73 │ async redirects() {
│ ^^^^^^^^^^^^^^^^^^^
> 74 │ return [
...
> 80 │ ]
> 81 │ },
│ ^
82 │ outputFileTracingRoot: join(__dirname, "../../"),
83 │ outputFileTracingExcludes: {
i Remove this async modifier, or add an await expression in the function.
71 │ reactCompiler: true,
72 │ cacheComponents: true,
> 73 │ async redirects() {
│ ^^^^^^^^^^^^^^^^^^^
> 74 │ return [
...
> 80 │ ]
> 81 │ },
│ ^
82 │ outputFileTracingRoot: join(__dirname, "../../"),
83 │ outputFileTracingExcludes: {
i Async functions without await expressions may not need to be declared async.
src/app/page.tsx format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× Formatter would have printed the following content:
8 8 │
9 9 │ export default async function HomePage() {
10 │ - ··const·[{·dehydratedState·},·heroBanners,·homepagePromo]·=·await·Promise.all(
11 │ - ····[
12 │ - ······prefetchHomePageStorefrontData(),
13 │ - ······fetchCmsHeroBanners(),
14 │ - ······fetchCmsHomepagePromo(),
15 │ - ····]
16 │ - ··)
10 │ + ··const·[{·dehydratedState·},·heroBanners,·homepagePromo]·=·await·Promise.all([
11 │ + ····prefetchHomePageStorefrontData(),
12 │ + ····fetchCmsHeroBanners(),
13 │ + ····fetchCmsHomepagePromo(),
14 │ + ··])
17 15 │
18 16 │ return (
src/components/homepage/sections/homepage-promo-section.tsx:53:23 lint/nursery/useSortedClasses FIXABLE ━━━━━━━━━━
× These CSS classes should be sorted.
51 │ ...
🧰 Additional context used
📓 Path-based instructions (7)
apps/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Import UI components using the
@techsio/ui-kitnamespace, not@libs/ui, for runtime apps
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run Biome linting and formatting only on changed files using 'bunx biome check --write path/to/file'
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/herbatika/**
📄 CodeRabbit inference engine (AGENTS.md)
apps/herbatika/**: Read apps/herbatika/AGENTS.md before editing Herbatika app and follow its specific configuration which overrides root assumptions
Herbatika app runs on http://localhost:3001 and routes work through libs/ui/skills and libs/storefront-data/skills workflows
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.tsapps/herbatika/src/styles/tokens/_herbatika-spacing.css
apps/**/!(medusa-be)/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use modern React patterns and React 19 for frontend applications in the monorepo
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/herbatika/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)
apps/herbatika/**/*.{ts,tsx}: Keep app-specific behavior in Herbatika; promote behavior into shared libraries only when there is a real API or platform gap.
For UI work consuming@techsio/ui-kit, follow the required UI-kit workflow and relevant usage, integration, token, and audit skills; library authoring must followlibs/ui/AGENTS.mdand library skills.
For storefront-data work, use the relevant shared-data skill and prefer the preset surface from@techsio/storefront-data, including shared hooks, flows, query keys, query options, cache policy, and SSR helpers.
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
apps/herbatika/**/*
📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)
apps/herbatika/**/*: Do not edit generated outputs in.next/,dist/, orstorybook-static/. Do not edit ignoredlocal/reference files unless explicitly requested.
The app runs onhttp://localhost:3001; do not assume the root frontend-demo URLlocalhost:3000. Prefer root-invoked scripts usingpnpm -C apps/herbatika <script>.
Do not run Biome commands in this app until the stability issue is resolved.
Treat approximately 200 lines per source file as a soft limit; exceeding it should prompt refactoring consideration, not act as an absolute blocker.
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.tsapps/herbatika/src/styles/tokens/_herbatika-spacing.css
apps/herbatika/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)
apps/herbatika/src/**/*.{ts,tsx}: Use internal UI primitives and components first; avoid raw<button>,<input>,<select>,<textarea>,<img>, and inline SVG icons unless a documented exception exists.
For Next.js links and images, prefer UI-kit components withnext/linkornext/imageadapter support when available.
Use token-based utility classes instead of raw Tailwind palette or spacing values.
Put Herbatika visual differences insrc/styles/tokens/**; avoid JSXclassNameoverrides that duplicate UI-kit component props or tokens.
Keep app-local data code thin: SDK instances, field defaults, localized text, toasts, analytics, form DTOs, address adapters, and Herbatika-specific read models may remain local.
Move repeated backend communication, query-key construction, cache synchronization, mutation invalidation, and reusable Medusa behavior intolibs/storefront-data.
Use explicit package subpath imports; never import from package roots ordist/.
Keep server-only and client-only boundaries explicit; useserver-onlyandgetServerQueryClientfor Server Component and SSR data paths.
Prefer small composable modules and shared helpers over duplicated logic.
Use kebab-case file names and PascalCase React component names.
Files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
🧠 Learnings (1)
📚 Learning: 2026-06-14T17:05:00.817Z
Learnt from: KaiUweCZE
Repo: TechsioCZ/new-engine PR: 442
File: apps/herbatika/src/components/reviews/product-review-token-page.tsx:36-42
Timestamp: 2026-06-14T17:05:00.817Z
Learning: When reviewing code in apps/herbatika that calls `useProducts(input: ProductListInput, options?)`, treat `enabled` provided inside the first argument (`input`) as intentional and valid. The `ProductListInput` type includes an optional `enabled?: boolean` (via `BaseStorefrontProductListInput & { enabled?: boolean }`), and the hook infrastructure strips `enabled` before constructing the HTTP request and query key (following the same `stripListInput` behavior used elsewhere). Therefore, do NOT flag `useProducts({ enabled: ... , ... }, options)` as a contract violation; `enabled` belongs in the input object, not in the `options` argument.
Applied to files:
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts
🪛 GitHub Actions: CI / 0_main.txt
apps/herbatika/src/styles/tokens/_herbatika-spacing.css
[error] 40-42: Biome formatter check failed. Format the calc expression according to the formatter output.
🪛 GitHub Actions: CI / main
apps/herbatika/src/styles/tokens/_herbatika-spacing.css
[error] 40-42: Biome formatting check failed. Format the calc expression according to Biome.
🪛 Stylelint (17.14.1)
apps/herbatika/src/styles/tokens/_herbatika-spacing.css
[error] 41-41: Unexpected newline before "+" (scss/operator-no-newline-before)
(scss/operator-no-newline-before)
[error] 42-42: Unexpected newline before "+" (scss/operator-no-newline-before)
(scss/operator-no-newline-before)
🔇 Additional comments (1)
apps/herbatika/src/components/homepage/sections/homepage-promo-html.ts (1)
3-3: LGTM!
|
🎉 This PR is included in version 0.32.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
New Features
/homepage-promoto the homepage promotion section.Bug Fixes
Tests