Skip to content

feat(herbatika): add fullscreen product gallery - #481

Merged
BleedingDev merged 5 commits into
masterfrom
feat/fullscreen-gallery
Jun 30, 2026
Merged

BleedingDev merged 5 commits into
masterfrom
feat/fullscreen-gallery

Conversation

@KaiUweCZE

@KaiUweCZE KaiUweCZE commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a fullscreen product gallery/lightbox to PDP images.

  • Opens the active product image in an overlay gallery
  • Supports larger image preview, thumbnails, close action, and carousel navigation
  • Keeps the current gallery selection in sync between PDP and lightbox
  • Preserves drag behavior so dragging the product gallery does not accidentally open the lightbox
  • Adds keyboard-accessible opening for the main product image
  • Uses fallback image data and clamps the selected index to avoid invalid selection states

Task

Notion: https://www.notion.so/pegak/Galerie-na-product-detailu-38b36e86b6ce80fca851cd1344efd705?v=36536e86b6ce805ca18a000cce0316d2&source=copy_link

Inspiration

Chakra UI lightbox carousel pattern:
https://chakra-ui.com/docs/components/carousel#lightbox

Summary by CodeRabbit

  • New Features
    • Added a client-side full-screen product image lightbox for the product gallery, with optional thumbnails and carousel controls when multiple images are available.
  • Bug Fixes
    • Clamped the selected gallery index for safer navigation, handled empty image sets gracefully, and improved image loading by eagerly loading the active slide while lazily loading the rest.
    • Refined carousel dragging and lightbox coordination to reduce unintended open/close behaviour.
  • Chores
    • Centralised product gallery and lightbox state management into a dedicated hook and reused it across the product media components.

@semanticdiff-com

semanticdiff-com Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
new-engine-ui-storybook Ready Ready Preview, Comment Jun 30, 2026 7:34am

@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ba7da6db-4755-4edc-86ec-442d0b8aa91f

📥 Commits

Reviewing files that changed from the base of the PR and between c3d53c5 and 068d98d.

📒 Files selected for processing (1)
  • apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx
📜 Recent review details
⚠️ CI failures not shown inline (1)

GitHub Check: Kilo Code Review: Kilo Code Review failed

Conclusion: failure

View job details

Review failed: The message could not be delivered
🧰 Additional context used
📓 Path-based instructions (9)
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Import UI components using the @techsio/ui-kit namespace, not @libs/ui, for runtime apps

Files:

  • apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx
**/*.{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/product-detail/sections/use-product-detail-gallery-state.tsx
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/product-detail/sections/use-product-detail-gallery-state.tsx
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/product-detail/sections/use-product-detail-gallery-state.tsx
apps/herbatika/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)

apps/herbatika/src/**/*.{jsx,tsx}: Use internal UI primitives/components from @techsio/ui-kit instead of native controls in app code. Avoid raw , , , <textarea>, , inline SVG icons. For Next.js links/images, prefer the UI-kit component with next/link or next/image adapter support when that component exposes it. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/**/*.{jsx,tsx,css} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) Use token-based utility classes instead of raw Tailwind palette/spacing values. Prefer tokenized classes like p-200, mt-300, gap-150, text-success, bg-danger over raw Tailwind values like p-4, mt-8, bg-red-600. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/** 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) apps/herbatika/src/**: Put Herbatika visual differences in src/styles/tokens/**; avoid JSX className overrides that duplicate UI-kit component props/tokens. Use kebab-case for file names and PascalCase for React component names in Herbatika. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/**/*.{ts,tsx} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) apps/herbatika/src/**/*.{ts,tsx}: Use explicit package subpath imports from @techsio/storefront-data. Do not import from package roots or dist/. Keep server-only and client-only boundaries explicit in Herbatika app code; use 'server-only' and 'getServerQueryClient' for Server Component/SSR data paths. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/**/*.{ts,tsx,js,jsx} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) Keep source files at a soft limit of ~200 lines; exceeding this should trigger refactor consideration. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx 🧠 Learnings (2) 📚 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/product-detail/sections/use-product-detail-gallery-state.tsx 📚 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/sections/use-product-detail-gallery-state.tsx 🔇 Additional comments (1) apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx (1) 58-61: LGTM! Also applies to: 72-72 Walkthrough Adds a controlled product gallery lightbox with fallback images, clamped selection, and Dialog/Gallery wiring. The media column now manages gallery state through a hook, including pointer-based opening and drag cancellation. Two formatting-only updates are also included. Changes Product Detail Gallery Lightbox Layer / File(s) Summary Gallery state hook apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx Defines the gallery state hook contract, manages selected-image and lightbox-open state, handles pointer and click/tap opening, builds fallback gallery items, and clamps the selected index. Lightbox component apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx Defines the lightbox props, prepares the clamped gallery value and slide content, handles empty input and callbacks, and renders the dialog-wrapped gallery with controls and close action. Media column integration apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx Replaces in-file gallery mapping with hook output, updates carousel control and drag handling, inserts the controlled lightbox, and changes the chat link target. Formatting-only updates apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx, apps/herbatika/src/components/product-detail.tsx Reformats the homepage hero carousel pointer handler and prop order, and simplifies the product detail state initialiser formatting. Estimated code review effort 🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs #330: Introduces the Gallery/Carousel APIs and controlled gallery composition used by the new product detail lightbox. #478: Touches the same carousel drag-versus-click handling and didDragRef interaction path as the homepage hero carousel changes. 🚥 Pre-merge checks | ✅ 4 | ❌ 1 ❌ Failed checks (1 warning) Check name Status Explanation Resolution Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold. ✅ Passed checks (4 passed) Check name Status Explanation Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled. Title check ✅ Passed The title clearly summarizes the main change: adding a fullscreen product gallery/lightbox for Herbatika. Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. ✨ Finishing Touches 📝 Generate docstrings [ ] Create stacked PR [ ] Commit on current branch 🧪 Generate unit tests (beta) [ ] Create PR with unit tests [ ] Commit unit tests in branch feat/fullscreen-gallery ✨ Simplify code [ ] Create PR with simplified code [ ] Commit simplified code in branch feat/fullscreen-gallery [!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. 🔧 ESLint If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration. 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. ❤️ Share X Mastodon Reddit LinkedIn Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR adds a fullscreen product gallery to Herbatika product pages. The main changes are:

  • New lightbox dialog for product images.
  • Shared gallery state for PDP and lightbox selection.
  • Fallback image handling and selected-index clamping.
  • Drag handling to avoid accidental lightbox opens.
  • Keyboard-accessible opening for the main image.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx Connects the PDP media column to shared gallery state and renders the fullscreen lightbox.
apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx Adds the fullscreen product gallery dialog with carousel controls, thumbnails, and fallback image data.
apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx Centralizes selected image state, lightbox open state, fallback item creation, and drag-cancel behavior.

Reviews (5): Last reviewed commit: "fix(herbatika): lazy-load inactive galle..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 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/product-detail/sections/product-detail-gallery-lightbox.tsx`:
- Around line 122-123: The Carousel.Previous and Carousel.Next controls in
product-detail-gallery-lightbox.tsx are using a hard-coded bg-white value
instead of the app’s tokenized surface/background utility. Update both button
classNames to use the matching Herbatika token-based background class so they
follow the theme in branded and dark variants, keeping the rest of the Carousel
button styling unchanged.

In
`@apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx`:
- Around line 227-230: The “Spustiť chat” CTA in product-detail-media-column.tsx
is pointing to the wrong destination; update the LinkButton rendered with
NextLink so it routes to the actual contact/chat flow instead of "/". Use the
existing CTA setup in this component to locate the LinkButton and restore the
intended chat entry target, keeping the label and destination consistent.
- Around line 78-101: The lightbox open trigger is only applied in the fallback
Button path, so gallery items that render through item.content lose fullscreen
access. Update product-detail-media-column’s gallery item rendering so the same
open handlers (handleMainImageClick, handleMainImagePointerDown,
handleMainImagePointerUp, cancelPendingOpen) are available for both item.content
and the fallback image branch, either by wrapping both branches in a shared
interactive container or by moving the trigger logic to a wrapper that always
renders.
🪄 Autofix (Beta)

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

Run ID: b5f57721-2191-411e-bd5c-6069454e8c37

📥 Commits

Reviewing files that changed from the base of the PR and between effc1c7 and 6bf7371.

📒 Files selected for processing (2)
  • apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: Greptile Review
  • GitHub Check: main
  • GitHub Check: Analyze (javascript-typescript)
⚠️ CI failures not shown inline (1)

GitHub Check: Kilo Code Review: Kilo Code Review failed

Conclusion: failure

View job details

Review failed: The message could not be delivered
🧰 Additional context used
📓 Path-based instructions (9)
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Import UI components using the @techsio/ui-kit namespace, not @libs/ui, for runtime apps

Files:

  • apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
**/*.{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/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
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/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
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/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
apps/herbatika/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)

apps/herbatika/src/**/*.{jsx,tsx}: Use internal UI primitives/components from @techsio/ui-kit instead of native controls in app code. Avoid raw , , , <textarea>, , inline SVG icons. For Next.js links/images, prefer the UI-kit component with next/link or next/image adapter support when that component exposes it. Files: apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{jsx,tsx,css} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) Use token-based utility classes instead of raw Tailwind palette/spacing values. Prefer tokenized classes like p-200, mt-300, gap-150, text-success, bg-danger over raw Tailwind values like p-4, mt-8, bg-red-600. Files: apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/** 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) apps/herbatika/src/**: Put Herbatika visual differences in src/styles/tokens/**; avoid JSX className overrides that duplicate UI-kit component props/tokens. Use kebab-case for file names and PascalCase for React component names in Herbatika. Files: apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{ts,tsx} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) apps/herbatika/src/**/*.{ts,tsx}: Use explicit package subpath imports from @techsio/storefront-data. Do not import from package roots or dist/. Keep server-only and client-only boundaries explicit in Herbatika app code; use 'server-only' and 'getServerQueryClient' for Server Component/SSR data paths. Files: apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{ts,tsx,js,jsx} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) Keep source files at a soft limit of ~200 lines; exceeding this should trigger refactor consideration. Files: apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx 🧠 Learnings (2) 📚 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/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx 📚 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/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx

BleedingDev
BleedingDev previously approved these changes Jun 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx (1)

32-120: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

refactor: extract the gallery item preparation

This component is now 243 lines, and the new state/handler/map block is a good extraction boundary. Consider moving the lightbox trigger state and galleryItemsWithFallback construction into a small hook/helper to keep the Herbatika source file near the soft limit. As per coding guidelines, apps/herbatika/src/**/*.{ts,tsx}: Keep source files at a soft limit of ~200 lines; exceeding this should trigger refactor consideration.

🤖 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/components/product-detail/sections/product-detail-media-column.tsx`
around lines 32 - 120, The new state, pointer handlers, and
galleryItemsWithFallback mapping in product-detail-media-column are pushing the
component beyond the soft file-size limit. Extract the lightbox selection logic
and gallery preparation into a small hook or helper (for example around
handleOpenLightbox, handleMainImagePointerDown, and galleryItemsWithFallback) so
the ProductDetailMediaColumn component stays focused and closer to the ~200-line
guideline.

Source: Coding guidelines

🤖 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.

Outside diff comments:
In
`@apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx`:
- Around line 32-120: The new state, pointer handlers, and
galleryItemsWithFallback mapping in product-detail-media-column are pushing the
component beyond the soft file-size limit. Extract the lightbox selection logic
and gallery preparation into a small hook or helper (for example around
handleOpenLightbox, handleMainImagePointerDown, and galleryItemsWithFallback) so
the ProductDetailMediaColumn component stays focused and closer to the ~200-line
guideline.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e2d284d0-cb5d-40c2-9dfd-beaa42791c45

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf7371 and 07aa02a.

📒 Files selected for processing (4)
  • apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx
  • apps/herbatika/src/components/product-detail.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Greptile Review
  • GitHub Check: main
⚠️ CI failures not shown inline (1)

GitHub Check: Kilo Code Review: Kilo Code Review failed

Conclusion: failure

View job details

Review failed: The message could not be delivered
🧰 Additional context used
📓 Path-based instructions (9)
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Import UI components using the @techsio/ui-kit namespace, not @libs/ui, for runtime apps

Files:

  • apps/herbatika/src/components/product-detail.tsx
  • apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
**/*.{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/product-detail.tsx
  • apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
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/product-detail.tsx
  • apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
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/product-detail.tsx
  • apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
apps/herbatika/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)

apps/herbatika/src/**/*.{jsx,tsx}: Use internal UI primitives/components from @techsio/ui-kit instead of native controls in app code. Avoid raw , , , <textarea>, , inline SVG icons. For Next.js links/images, prefer the UI-kit component with next/link or next/image adapter support when that component exposes it. Files: apps/herbatika/src/components/product-detail.tsx apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{jsx,tsx,css} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) Use token-based utility classes instead of raw Tailwind palette/spacing values. Prefer tokenized classes like p-200, mt-300, gap-150, text-success, bg-danger over raw Tailwind values like p-4, mt-8, bg-red-600. Files: apps/herbatika/src/components/product-detail.tsx apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/** 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) apps/herbatika/src/**: Put Herbatika visual differences in src/styles/tokens/**; avoid JSX className overrides that duplicate UI-kit component props/tokens. Use kebab-case for file names and PascalCase for React component names in Herbatika. Files: apps/herbatika/src/components/product-detail.tsx apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{ts,tsx} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) apps/herbatika/src/**/*.{ts,tsx}: Use explicit package subpath imports from @techsio/storefront-data. Do not import from package roots or dist/. Keep server-only and client-only boundaries explicit in Herbatika app code; use 'server-only' and 'getServerQueryClient' for Server Component/SSR data paths. Files: apps/herbatika/src/components/product-detail.tsx apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{ts,tsx,js,jsx} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) Keep source files at a soft limit of ~200 lines; exceeding this should trigger refactor consideration. Files: apps/herbatika/src/components/product-detail.tsx apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx 🧠 Learnings (2) 📚 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/product-detail.tsx apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx 📚 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.tsx apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx 🔇 Additional comments (5) apps/herbatika/src/components/homepage/sections/homepage-hero-carousel-section.tsx (2) 127-131: Formatting-only change: multi-line generic type annotation improves readability. LGTM! 161-170: Formatting-only change: prop reordering for consistency. LGTM! apps/herbatika/src/components/product-detail.tsx (1) 26-28: LGTM! apps/herbatika/src/components/product-detail/sections/product-detail-gallery-lightbox.tsx (1) 65-67: LGTM! Also applies to: 90-90, 121-125 apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx (1) 189-195: LGTM! Also applies to: 233-233

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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/product-detail/sections/use-product-detail-gallery-state.tsx`:
- Around line 63-73: The gallery image fallback in useProductDetailGalleryState
is eagerly loading every mapped PDP slide, which should only happen for the
active/visible image. Update the FallbackImage props so loading is conditional
rather than always eager, using the existing active-slide logic in this hook
(and matching the lightbox behavior) to keep only the current image prioritized
while the rest load lazily.
🪄 Autofix (Beta)

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

Run ID: 99808738-7775-4ea1-bee6-7f150c4ec767

📥 Commits

Reviewing files that changed from the base of the PR and between 07aa02a and c3d53c5.

📒 Files selected for processing (2)
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
  • apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: main
⚠️ CI failures not shown inline (1)

GitHub Check: Kilo Code Review: Kilo Code Review failed

Conclusion: failure

View job details

Review failed: The message could not be delivered
🧰 Additional context used
📓 Path-based instructions (9)
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Import UI components using the @techsio/ui-kit namespace, not @libs/ui, for runtime apps

Files:

  • apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
**/*.{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/product-detail/sections/use-product-detail-gallery-state.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
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/product-detail/sections/use-product-detail-gallery-state.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
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/product-detail/sections/use-product-detail-gallery-state.tsx
  • apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx
apps/herbatika/src/**/*.{jsx,tsx}

📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md)

apps/herbatika/src/**/*.{jsx,tsx}: Use internal UI primitives/components from @techsio/ui-kit instead of native controls in app code. Avoid raw , , , <textarea>, , inline SVG icons. For Next.js links/images, prefer the UI-kit component with next/link or next/image adapter support when that component exposes it. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{jsx,tsx,css} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) Use token-based utility classes instead of raw Tailwind palette/spacing values. Prefer tokenized classes like p-200, mt-300, gap-150, text-success, bg-danger over raw Tailwind values like p-4, mt-8, bg-red-600. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/** 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) apps/herbatika/src/**: Put Herbatika visual differences in src/styles/tokens/**; avoid JSX className overrides that duplicate UI-kit component props/tokens. Use kebab-case for file names and PascalCase for React component names in Herbatika. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{ts,tsx} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) apps/herbatika/src/**/*.{ts,tsx}: Use explicit package subpath imports from @techsio/storefront-data. Do not import from package roots or dist/. Keep server-only and client-only boundaries explicit in Herbatika app code; use 'server-only' and 'getServerQueryClient' for Server Component/SSR data paths. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx apps/herbatika/src/**/*.{ts,tsx,js,jsx} 📄 CodeRabbit inference engine (apps/herbatika/AGENTS.md) Keep source files at a soft limit of ~200 lines; exceeding this should trigger refactor consideration. Files: apps/herbatika/src/components/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx 🧠 Learnings (2) 📚 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/product-detail/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx 📚 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/sections/use-product-detail-gallery-state.tsx apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx 🔇 Additional comments (1) apps/herbatika/src/components/product-detail/sections/product-detail-media-column.tsx (1) 12-12: LGTM! Also applies to: 29-60, 101-107, 145-145

@BleedingDev
BleedingDev merged commit 523fc63 into master Jun 30, 2026
6 of 7 checks passed
@BleedingDev
BleedingDev deleted the feat/fullscreen-gallery branch June 30, 2026 08:25
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Preview — 068d98de Deployed Jun 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants