Skip to content

Feat/storefront data prodcut lists - #435

Merged
6 commits merged into
masterfrom
feat/storefront-data-prodcut-lists
Jun 10, 2026
Merged

Feat/storefront data prodcut lists#435
6 commits merged into
masterfrom
feat/storefront-data-prodcut-lists

Conversation

@KaiUweCZE

@KaiUweCZE KaiUweCZE commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • New Features
    • Added product lists domain to the storefront data library with full support for creating, managing, and deleting product lists and list items
    • Added React hooks for product list operations including listing, fetching details, and cart creation
    • Expanded package subpath exports to include product lists utilities and configuration options

@semanticdiff-com

semanticdiff-com Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  libs/storefront-data/package.json  10% smaller
  libs/storefront-data/AGENTS.md Unsupported file format
  libs/storefront-data/README.md Unsupported file format
  libs/storefront-data/skills/audit-storefront-before-release/SKILL.md Unsupported file format
  libs/storefront-data/skills/configure-pagination-prefetch-and-cache-policy/SKILL.md Unsupported file format
  libs/storefront-data/skills/configure-pagination-prefetch-and-cache-policy/references/prefetch-and-pagination.md Unsupported file format
  libs/storefront-data/skills/decide-app-specific-overrides-vs-shared-platform/SKILL.md Unsupported file format
  libs/storefront-data/skills/extend-storefront-data-for-new-backend-use-cases/SKILL.md Unsupported file format
  libs/storefront-data/skills/extend-storefront-data-for-new-backend-use-cases/references/extension-recipe.md Unsupported file format
  libs/storefront-data/skills/implement-auth-and-customer-session-flows/SKILL.md Unsupported file format
  libs/storefront-data/skills/implement-cart-and-checkout-platform-flows/SKILL.md Unsupported file format
  libs/storefront-data/skills/implement-ssr-prefetch-and-query-client-boundaries/SKILL.md Unsupported file format
  libs/storefront-data/skills/migrate-custom-hooks-to-storefront-data/SKILL.md Unsupported file format
  libs/storefront-data/skills/setup-storefront-platform-in-next-app/SKILL.md Unsupported file format
  libs/storefront-data/skills/use-catalog-and-product-read-flows/SKILL.md Unsupported file format
  libs/storefront-data/skills/use-storefront-data-skills/SKILL.md Unsupported file format
  libs/storefront-data/src/medusa/foundation.ts  0% smaller
  libs/storefront-data/src/medusa/preset.ts  0% smaller
  libs/storefront-data/src/medusa/server-read.ts  0% smaller
  libs/storefront-data/src/product-lists/hooks.ts  0% smaller
  libs/storefront-data/src/product-lists/input-utils.ts  0% smaller
  libs/storefront-data/src/product-lists/medusa-service.ts  0% smaller
  libs/storefront-data/src/product-lists/query-keys.ts  0% smaller
  libs/storefront-data/src/product-lists/query-options.ts  0% smaller
  libs/storefront-data/src/product-lists/types.ts  0% smaller
  libs/storefront-data/src/product-lists/utils.ts  0% smaller
  libs/storefront-data/src/shared/object-utils.ts  0% smaller
  libs/storefront-data/tests/medusa.preset.test.tsx  0% smaller
  libs/storefront-data/tests/medusa.server-read.test.ts  0% smaller
  libs/storefront-data/tests/product-lists.hooks.test.tsx  0% smaller
  libs/storefront-data/tests/product-lists.medusa-service.test.ts  0% smaller
  libs/storefront-data/tests/product-lists.utils.test.ts  0% smaller
  libs/storefront-data/tests/regression.catalog-customers-exports.test.tsx  0% smaller
  pnpm-lock.yaml  0% smaller

@vercel

vercel Bot commented Jun 9, 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 10, 2026 3:13pm

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This pull request introduces comprehensive product-lists domain support to the storefront-data library. It adds domain types, service implementations, React hooks, query infrastructure, and full integration into the Medusa storefront preset system, along with documentation and package manifest updates.

Changes

Product-lists domain implementation

Layer / File(s) Summary
Domain types and utility helpers
libs/storefront-data/src/product-lists/types.ts, libs/storefront-data/src/product-lists/utils.ts, libs/storefront-data/tests/product-lists.utils.test.ts
ProductListItemBase, ProductListBase, and input/response types define the domain contract; ProductListService interface defines the service layer API. Utility helpers extract product/variant IDs, resolve quantities, detect favourite lists, and match products within lists.
Query keys and options factories
libs/storefront-data/src/product-lists/query-keys.ts, libs/storefront-data/src/product-lists/query-options.ts
Query key factory generates all, list, and detail keys with optional enabled field omitted; query options factory builds list and detail query options with customer scoping, pagination resolution, and cache strategy selection.
Medusa service layer
libs/storefront-data/src/product-lists/medusa-service.ts, libs/storefront-data/tests/product-lists.medusa-service.test.ts
Service implementation wraps Medusa client fetch calls for listing, detail retrieval, favourite/custom list creation, item add/update/delete, cart creation, and quantity changes; includes request body compaction, quantity normalisation, and response field-name resolution across API variants.
React hooks factory
libs/storefront-data/src/product-lists/hooks.ts
Generates query hooks (useProductLists, useSuspenseProductLists, useProductList, useProductListDetails) and mutation hooks (create/update/delete lists and items, create list cart) with cache invalidation on success and optional cart storage synchronisation.
Foundation and preset integration
libs/storefront-data/src/medusa/foundation.ts, libs/storefront-data/src/medusa/preset.ts, libs/storefront-data/src/medusa/server-read.ts
Wires product-lists query keys into foundation; extends CreateMedusaStorefrontPresetConfig with optional productLists configuration block; creates product-list services and hooks during preset instantiation; extends server-read preset to support product-lists with full query option generation. Note: Contains unresolved merge conflicts in type wiring.
Package exports and documentation
libs/storefront-data/package.json, libs/storefront-data/AGENTS.md, libs/storefront-data/README.md, libs/storefront-data/tests/regression.catalog-customers-exports.test.tsx, libs/storefront-data/tests/medusa.preset.test.tsx, libs/storefront-data/tests/medusa.server-read.test.ts
Adds ./product-lists/* subpath exports (hooks, medusa-service, query-keys, query-options, types, utils); documents domain in AGENTS and README; validates exports and integration through comprehensive tests including query key resolution, cart creation workflows, and server-read query option generation. Note: package.json contains unresolved merge conflict markers in query-options export definition.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • TechsioCZ/new-engine#434: Implements the backend Medusa store API routes for product-lists (cart creation, item mutations, quantity changes) that this PR's service layer consumes.
  • TechsioCZ/new-engine#360: Introduces the medusa/server-read preset foundation that this PR extends with product-lists domain support.
  • TechsioCZ/new-engine#351: Restructured the storefront-data package exports that this PR builds upon by adding new product-lists subpath entries.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Title check ❓ Inconclusive The title contains a typo ('prodcut' instead of 'product') and is vague about the specific changes being introduced to the product-lists feature. Correct the typo and make the title more specific, e.g. 'feat: add product lists domain to storefront data' to clearly convey the main change.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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/storefront-data-prodcut-lists
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/storefront-data-prodcut-lists

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: dependency version conflict. Check your lock file or package.json.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a complete product-lists domain to the @techsio/storefront-data library, following the existing factory hook pattern used by products, orders, collections, etc. All previously flagged merge-conflict markers and missing type exports have been resolved in the current HEAD.

  • createProductListHooks factory (hooks.ts): provides the full suite of read hooks (useProductLists, useSuspenseProductLists, useProductList, useSuspenseProductList, useProductListDetails, prefetch hooks) and mutation hooks (create/update/delete lists and items, cart creation with cart-cache sync). The factory is wired into both createMedusaStorefrontPreset (full preset) and createMedusaStorefrontServerReadPreset (SSR read-only preset).
  • createMedusaProductListService (medusa-service.ts): implements the ProductListService contract against the custom /store/product-lists backend routes, with quantity normalization helpers and flexible response resolution via normalizeProductListsResponse / resolveProductList*FromResponse helpers.
  • Package exports: all new subpaths (product-lists/hooks, product-lists/medusa-service, product-lists/query-keys, product-lists/query-options, product-lists/types, product-lists/utils) are added to package.json; shared/object-utils (new compactRecord home) is kept internal-only.

Confidence Score: 5/5

Safe to merge; all previously flagged blocking issues (conflict markers, missing type exports) are resolved in the current HEAD, and the new product-lists domain follows the established factory patterns correctly.

The product-lists domain is a clean additive feature that mirrors the existing hook factory structure throughout the library. The core read/mutation/prefetch hooks, Medusa service, query-options factory, and type system are all internally consistent. Previously unresolved issues (merge conflicts in foundation.ts/preset.ts/medusa.preset.test.tsx, missing Key types in medusa-service.ts) have been addressed. One minor inconsistency in null handling for quantity in updateProductListItem is the only new finding and does not affect correctness of the primary flows.

libs/storefront-data/src/product-lists/medusa-service.ts — the null-quantity handling in updateProductListItem differs from the other nullable fields in the same body.

Important Files Changed

Filename Overview
libs/storefront-data/src/product-lists/hooks.ts Factory function creating all read, prefetch, and mutation hooks; type-safe SuspenseDetailInput enforces non-null id; cart sync wired correctly; no new issues beyond items already discussed.
libs/storefront-data/src/product-lists/medusa-service.ts Implements ProductListService against the custom store API; quantity normalization helpers are well-guarded; minor inconsistency: normalizeQuantity(null) strips the field entirely while null note/sortOrder/metadata are forwarded as-is in updateProductListItem.
libs/storefront-data/src/product-lists/types.ts Clean type definitions for lists, items, mutations, service interface, and hook result types; no issues found.
libs/storefront-data/src/product-lists/query-options.ts Standalone query-options factory (for SSR / server-read usage); correctly exposes a cacheStrategy override per-call; no issues found.
libs/storefront-data/src/medusa/foundation.ts Previously had git merge-conflict markers; now clean. Adds productLists to the shared MedusaStorefrontQueryKeys and resolveMedusaStorefrontFoundation factory.
libs/storefront-data/src/medusa/preset.ts Previously had git merge-conflict markers; now clean. Wires productLists into createMedusaStorefrontPreset including auth-invalidation keys for productLists.all().
libs/storefront-data/src/medusa/server-read.ts Previously missing MedusaProductList*KeyInput types are now exported from medusa-service.ts and imported correctly here; SSR read preset wires product-list query-options factory cleanly.
libs/storefront-data/src/shared/object-utils.ts New shared home for compactRecord (previously duplicated across three files); also adds isPlainRecord, toPlainRecord, and omitKeys utilities.

Sequence Diagram

sequenceDiagram
    participant App as App / Preset
    participant Factory as createProductListHooks()
    participant SVC as ProductListService
    participant RQ as TanStack Query
    participant BE as Backend /store/product-lists

    App->>Factory: "createProductListHooks({ service, queryKeys, cacheConfig, ... })"
    Factory-->>App: "{ useProductLists, useProductList, useSuspenseProductList, usePrefetchProductLists, useCreateFavoriteProductList, useAddProductListItem, useCreateProductListCart, ... }"

    Note over App,BE: Read flow (useProductLists)
    App->>RQ: "useQuery({ queryKey: keys.list({...customerId}), queryFn, ...userData })"
    RQ->>SVC: listProductLists(params, signal)
    SVC->>BE: "GET /store/product-lists?limit=20&offset=0"
    BE-->>SVC: "{ product_lists: [...], count, limit, offset }"
    SVC-->>RQ: normalizeProductListsResponse(response)
    RQ-->>App: "{ productLists, count, limit, offset }"

    Note over App,BE: Mutation flow (useAddProductListItem)
    App->>RQ: "mutate({ listId, productId, variantId, quantity })"
    RQ->>SVC: addProductListItem(input)
    SVC->>BE: "POST /store/product-lists/{listId}/items"
    BE-->>SVC: "{ product_list_item: {...} }"
    SVC-->>RQ: resolveProductListItemFromResponse(response)
    RQ->>RQ: invalidateQueries(keys.all())
    RQ-->>App: "{ data: item }"

    Note over App,BE: Cart creation (useCreateProductListCart)
    App->>RQ: "mutate({ listId, regionId })"
    RQ->>SVC: createProductListCart(input)
    SVC->>BE: "POST /store/product-lists/{listId}/cart"
    BE-->>SVC: "{ cart: {...} }"
    SVC-->>RQ: transformCart(cart)
    RQ->>RQ: syncCartCaches + invalidate cartQueryKeys.all()
    RQ->>RQ: cartStorage.set(cart.id)
    RQ-->>App: cart
Loading

Fix All in Codex

Reviews (5): Last reviewed commit: "refactor: clean up product list storefro..." | Re-trigger Greptile

Comment thread libs/storefront-data/src/medusa/foundation.ts Outdated
Comment thread libs/storefront-data/src/medusa/server-read.ts
Comment thread libs/storefront-data/src/product-lists/medusa-service.ts
Comment thread libs/storefront-data/src/product-lists/hooks.ts
Comment thread libs/storefront-data/src/product-lists/hooks.ts Outdated

@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: 10

🤖 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 `@libs/storefront-data/package.json`:
- Around line 244-250: The package.json contains unresolved Git merge conflict
markers (<<<<<<<, =======, >>>>>>>) that break JSON parsing; remove the conflict
markers and restore a valid JSON object, keeping the
"./product-lists/query-options" export entry (with its "types" and "import"
fields) as expected by regression.catalog-customers-exports.test.tsx; update the
exports map in package.json to a well-formed JSON entry for
"./product-lists/query-options" and ensure there are no leftover conflict tokens
elsewhere in the file.
- Around line 232-258: Remove the leftover merge conflict markers (<<<<<<<,
=======, >>>>>>>) around the product-lists exports and add a proper export entry
for "./product-lists/query-options" matching the other product-lists entries:
set "types" to "./dist/src/product-lists/query-options.d.ts" and "import" to
"./dist/product-lists/query-options.js", ensure JSON punctuation (commas/braces)
stays valid and the shape aligns with other domains like catalog/orders.

In `@libs/storefront-data/src/medusa/foundation.ts`:
- Around line 42-49: Remove the unresolved git merge conflict markers and keep
the "Stashed changes" variant of the imports and generics (use
MedusaProductListDetailKeyInput and MedusaProductListListKeyInput) wherever the
conflict blocks appear (including the blocks around the current import lines and
the other two conflict regions around lines indicated in the review); delete the
<<<<<<<, =======, and >>>>>>> markers and any duplicated old imports
(MedusaProductListDetailInput/MedusaProductListListInput) so the file
consistently imports and uses MedusaProductListDetailKeyInput and
MedusaProductListListKeyInput to match server-read.ts.

In `@libs/storefront-data/src/medusa/preset.ts`:
- Around line 126-147: The file contains unresolved git conflict markers; remove
all conflict markers (<<<<<<<, =======, >>>>>>>) and choose the imports and
types consistent with server-read.ts: keep createMedusaProductListService plus
the detailed type set including MedusaProductListListKeyInput,
MedusaProductListDetailKeyInput, MedusaProductListListHookInput,
MedusaProductListDetailHookInput and MedusaProductListServiceConfig from
product-lists/medusa-service, while retaining createProductListHooks,
CreateProductListHooksConfig, and ProductListHooks from product-lists/hooks;
apply the same resolution for all other conflicted blocks (lines noted in the
review) so usages of createMedusaProductListService, createProductListHooks,
ProductListHooks, CreateProductListHooksConfig and the MedusaProductList* types
compile correctly.

In `@libs/storefront-data/src/product-lists/hooks.ts`:
- Around line 516-539: The useSuspenseProductList hook calls
getDetailQueryOptions without ensuring input.id, which can cause the suspense
query to throw; update useSuspenseProductList to validate that input.id is
present before creating the query (mirror useProductList’s enabled guard) or
tighten the SuspenseDetailInput type to require id (e.g., make id: string) so
the runtime cannot pass a falsy id; adjust getDetailQueryOptions usage in
useSuspenseProductList accordingly to avoid constructing a suspense query when
id is missing.

In `@libs/storefront-data/src/product-lists/medusa-service.ts`:
- Around line 55-67: normalizeQuantityDelta currently returns 1 for
invalid/non-finite input while normalizeQuantity returns undefined; make them
consistent by having normalizeQuantityDelta return undefined for non-number or
non-finite inputs (replace the early return of 1 with undefined) and adjust all
call sites that use normalizeQuantityDelta to handle an undefined result (apply
the desired default or validation there). Locate the function
normalizeQuantityDelta and the other normalizer normalizeQuantity and update
callers to either coalesce the undefined value to a default or explicitly
validate/throw before using the value.

In `@libs/storefront-data/tests/medusa.preset.test.tsx`:
- Around line 416-431: Resolve the merge conflict in the
customProductListQueryKeys declaration by removing the conflict markers and
selecting the correct key types; update the ProductListQueryKeys generic to use
the consistent key input types used elsewhere (either
MedusaProductListListKeyInput and MedusaProductListDetailKeyInput or
MedusaProductListListInput & { customerId?: string | null } and
MedusaProductListDetailInput & { customerId?: string | null }), then delete the
<<<<<<<, =======, and >>>>>>> lines so customProductListNamespace and
customProductListQueryKeys compile cleanly and match the rest of the codebase.
- Around line 33-40: There are unresolved Git merge conflict markers in the
import list — remove the conflict markers and pick one consistent pair of types
(either MedusaProductListDetailInput & MedusaProductListListInput or
MedusaProductListDetailKeyInput & MedusaProductListListKeyInput) that matches
the actual exported types from ../src/product-lists/medusa-service; update the
import to only include the chosen identifiers and then update any usages in this
test (medusa.preset.test.tsx) to use the selected symbol names (e.g.,
MedusaProductListDetailInput or MedusaProductListDetailKeyInput and
MedusaProductListListInput or MedusaProductListListKeyInput) so the code
compiles without conflict markers.

In `@libs/storefront-data/tests/regression.catalog-customers-exports.test.tsx`:
- Around line 291-294: The test fails because package.json contains unresolved
merge conflict markers that prevent the "./product-lists/query-options" export
from being present; open package.json, remove the conflict markers and merge the
competing sections so that packageJson.exports includes the
"./product-lists/query-options" key with { types:
"./dist/src/product-lists/query-options.d.ts", import:
"./dist/product-lists/query-options.js" } (or the correct consolidated paths),
save the clean JSON and re-run tests to verify the assertion in the test
referencing packageJson.exports["./product-lists/query-options"] passes.
🪄 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: 925324e4-66fb-4a8e-9cef-5a51c01e79c5

📥 Commits

Reviewing files that changed from the base of the PR and between 8c80ca0 and 9afe8ab.

📒 Files selected for processing (17)
  • libs/storefront-data/AGENTS.md
  • libs/storefront-data/README.md
  • libs/storefront-data/package.json
  • libs/storefront-data/src/medusa/foundation.ts
  • libs/storefront-data/src/medusa/preset.ts
  • libs/storefront-data/src/medusa/server-read.ts
  • libs/storefront-data/src/product-lists/hooks.ts
  • libs/storefront-data/src/product-lists/medusa-service.ts
  • libs/storefront-data/src/product-lists/query-keys.ts
  • libs/storefront-data/src/product-lists/query-options.ts
  • libs/storefront-data/src/product-lists/types.ts
  • libs/storefront-data/src/product-lists/utils.ts
  • libs/storefront-data/tests/medusa.preset.test.tsx
  • libs/storefront-data/tests/medusa.server-read.test.ts
  • libs/storefront-data/tests/product-lists.medusa-service.test.ts
  • libs/storefront-data/tests/product-lists.utils.test.ts
  • libs/storefront-data/tests/regression.catalog-customers-exports.test.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Greptile Review
  • GitHub Check: Kilo Code Review
🧰 Additional context used
📓 Path-based instructions (7)
libs/storefront-data/*.md

📄 CodeRabbit inference engine (libs/storefront-data/AGENTS.md)

Edit only libs/storefront-data/AGENTS.md for documentation - CLAUDE.md is a symlink and should not be edited directly

Files:

  • libs/storefront-data/README.md
  • libs/storefront-data/AGENTS.md
libs/storefront-data/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (libs/storefront-data/AGENTS.md)

Never import from ./dist/ paths - use source imports instead

Never mix server/client code in the same file - keep server and client code separated

Files:

  • libs/storefront-data/src/product-lists/query-keys.ts
  • libs/storefront-data/tests/product-lists.utils.test.ts
  • libs/storefront-data/tests/product-lists.medusa-service.test.ts
  • libs/storefront-data/tests/regression.catalog-customers-exports.test.tsx
  • libs/storefront-data/src/product-lists/utils.ts
  • libs/storefront-data/tests/medusa.server-read.test.ts
  • libs/storefront-data/src/product-lists/types.ts
  • libs/storefront-data/src/medusa/foundation.ts
  • libs/storefront-data/src/product-lists/medusa-service.ts
  • libs/storefront-data/src/medusa/preset.ts
  • libs/storefront-data/src/product-lists/hooks.ts
  • libs/storefront-data/src/medusa/server-read.ts
  • libs/storefront-data/tests/medusa.preset.test.tsx
  • libs/storefront-data/src/product-lists/query-options.ts
libs/storefront-data/**/*.{ts,tsx}

📄 CodeRabbit inference engine (libs/storefront-data/AGENTS.md)

Never use any type - use proper generics instead

Never hardcode query keys - use createQueryKey() utility instead

Use TanStack Query 5+ for all data fetching, caching, and SSR hydration

Files:

  • libs/storefront-data/src/product-lists/query-keys.ts
  • libs/storefront-data/tests/product-lists.utils.test.ts
  • libs/storefront-data/tests/product-lists.medusa-service.test.ts
  • libs/storefront-data/tests/regression.catalog-customers-exports.test.tsx
  • libs/storefront-data/src/product-lists/utils.ts
  • libs/storefront-data/tests/medusa.server-read.test.ts
  • libs/storefront-data/src/product-lists/types.ts
  • libs/storefront-data/src/medusa/foundation.ts
  • libs/storefront-data/src/product-lists/medusa-service.ts
  • libs/storefront-data/src/medusa/preset.ts
  • libs/storefront-data/src/product-lists/hooks.ts
  • libs/storefront-data/src/medusa/server-read.ts
  • libs/storefront-data/tests/medusa.preset.test.tsx
  • libs/storefront-data/src/product-lists/query-options.ts
libs/storefront-data/**/AGENTS.md

📄 CodeRabbit inference engine (libs/storefront-data/CLAUDE.md)

libs/storefront-data/**/AGENTS.md: Document agent definitions and configurations in AGENTS.md
Maintain an up-to-date AGENTS.md file documenting all agents in the system

Files:

  • libs/storefront-data/AGENTS.md
libs/storefront-data/src/**/types.{ts,tsx}

📄 CodeRabbit inference engine (libs/storefront-data/AGENTS.md)

Always type service interfaces with generics for product/collection/category/region/auth/cart/checkout/order/customer/product-list services

Files:

  • libs/storefront-data/src/product-lists/types.ts
**/package.json

📄 CodeRabbit inference engine (CLAUDE.md)

Use pnpm CLI to add dependencies; never edit package.json directly

Files:

  • libs/storefront-data/package.json
libs/storefront-data/src/**/*hooks.{ts,tsx}

📄 CodeRabbit inference engine (libs/storefront-data/AGENTS.md)

Always use factory pattern for creating hooks (createProductHooks, createCollectionHooks, etc.)

Always use cache strategies from CacheConfig (static, semiStatic, realtime, userData) when configuring TanStack Query

Files:

  • libs/storefront-data/src/product-lists/hooks.ts
🧠 Learnings (3)
📚 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:

  • libs/storefront-data/tests/regression.catalog-customers-exports.test.tsx
  • libs/storefront-data/tests/medusa.preset.test.tsx
📚 Learning: 2026-02-05T14:43:17.404Z
Learnt from: KaiUweCZE
Repo: NMIT-WR/new-engine PR: 324
File: apps/medusa-be/package.json:0-0
Timestamp: 2026-02-05T14:43:17.404Z
Learning: Validate and enforce React 19 compatibility across monorepo workspaces. Since Medusa UI supports React 19 via root package.json overrides and Medusa Cloud prerequisites show React 19 overrides for npm workspaces, ensure workspace root and all relevant package.json files align with React 19 (18+ requirement is satisfied). When reviewing, verify that overrides exist in the root package.json and that dependent packages in apps or packages directories declare React 19 (or compatible) in their peerDependencies or dependencies as appropriate for workspace usage.

Applied to files:

  • libs/storefront-data/package.json
📚 Learning: 2026-05-07T19:05:58.339Z
Learnt from: redeyecz
Repo: TechsioCZ/new-engine PR: 390
File: apps/medusa-be/package.json:78-81
Timestamp: 2026-05-07T19:05:58.339Z
Learning: When reviewing changes to `package.json`, do not automatically flag dependency additions/removals as "manually edited" or as "bypassing the pnpm lockfile" just because the `package.json` diff shows only that file changed. First verify whether `pnpm-lock.yaml` is missing the corresponding entries. Since `pnpm add` updates both `package.json` and `pnpm-lock.yaml` together, legitimate changes can appear in the `package.json` diff while still being properly tracked in the lockfile.

Applied to files:

  • libs/storefront-data/package.json
🪛 GitHub Actions: CI / 0_main.txt
libs/storefront-data/package.json

[error] 244-244: pnpm install --frozen-lockfile failed: ERR_PNPM_JSON_PARSE Expected double-quoted property name in JSON at position 8289 (line 244 column 1) while parsing '{ "name": "@techsio/storefront-data",'.

🪛 GitHub Actions: CI / main
libs/storefront-data/package.json

[error] 244-244: pnpm install --frozen-lockfile failed: ERR_PNPM_JSON_PARSE Expected double-quoted property name in JSON at position 8289 (line 244 column 1) while parsing '{ "name": "@techsio/storefront-data",'.

🔇 Additional comments (29)
libs/storefront-data/src/product-lists/types.ts (1)

1-264: LGTM!

libs/storefront-data/src/product-lists/utils.ts (1)

1-101: LGTM!

libs/storefront-data/tests/product-lists.utils.test.ts (1)

1-63: LGTM!

libs/storefront-data/src/product-lists/hooks.ts (3)

1-393: LGTM!


394-515: LGTM!


540-863: LGTM!

libs/storefront-data/AGENTS.md (1)

35-35: LGTM!

libs/storefront-data/README.md (1)

174-179: LGTM!

Also applies to: 189-189

libs/storefront-data/src/product-lists/query-keys.ts (1)

1-28: LGTM!

libs/storefront-data/src/product-lists/query-options.ts (1)

1-226: LGTM!

libs/storefront-data/src/medusa/server-read.ts (7)

56-76: LGTM!


140-159: LGTM!


217-248: LGTM!


272-284: LGTM!


344-344: LGTM!


382-386: LGTM!


469-470: LGTM!

Also applies to: 490-495, 531-537

libs/storefront-data/src/medusa/preset.ts (3)

307-313: LGTM!


798-799: LGTM!

Also applies to: 824-829


901-906: LGTM!

libs/storefront-data/tests/medusa.server-read.test.ts (4)

6-10: LGTM!


35-48: LGTM!


87-131: LGTM!


135-136: LGTM!

Also applies to: 152-166

libs/storefront-data/src/product-lists/medusa-service.ts (3)

186-207: LGTM!


209-223: LGTM!


320-341: LGTM!

libs/storefront-data/tests/product-lists.medusa-service.test.ts (1)

1-127: LGTM!

libs/storefront-data/tests/medusa.preset.test.tsx (1)

497-568: LGTM!

Comment thread libs/storefront-data/package.json
Comment thread libs/storefront-data/package.json Outdated
Comment thread libs/storefront-data/src/medusa/foundation.ts Outdated
Comment thread libs/storefront-data/src/medusa/preset.ts
Comment thread libs/storefront-data/src/product-lists/hooks.ts
Comment thread libs/storefront-data/src/product-lists/medusa-service.ts
Comment thread libs/storefront-data/tests/medusa.preset.test.tsx Outdated
Comment thread libs/storefront-data/tests/medusa.preset.test.tsx
Comment thread libs/storefront-data/tests/medusa.preset.test.tsx
@kilo-code-bot

kilo-code-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Changed Files

  • libs/storefront-data/package.json - Added repository metadata, skills to published files, and @tanstack/intent devDependency/keyword.
  • libs/storefront-data/skills/** - New skill documentation files.
  • pnpm-lock.yaml - Lockfile updated for @tanstack/intent.

Resolved Findings From Prior Review

  • Merge conflict markers previously flagged in libs/storefront-data/package.json and the test files are no longer present.
Files Reviewed (2 paths)
  • libs/storefront-data/package.json - metadata and publish-path additions only
  • libs/storefront-data/skills/*.md - documentation additions

Reviewed by step-3.7-flash-20260528 · 487,156 tokens

@KaiUweCZE KaiUweCZE closed this pull request by merging all changes into master in 3268fae Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant