Skip to content

Fix storefront style isolation and price validation - #1487

Merged
wcole1-godaddy merged 5 commits into
godaddy:mainfrom
sbolinger-godaddy:fix/commerce-storefront-reliability
Oct 1, 2026
Merged

wcole1-godaddy merged 5 commits into
godaddy:mainfrom
sbolinger-godaddy:fix/commerce-storefront-reliability

Conversation

@sbolinger-godaddy

@sbolinger-godaddy sbolinger-godaddy commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • isolate storefront typography and surface colors from host styles, including paired dark-theme colors
  • remove the unsupported SKUGroup.status selection so variant product details load through GET /api/commerce/products/:id
  • match the catalog's ACTIVE filter on product details; missing and inactive products return 404 and show the storefront's "Product not found" page with a link back to the shop
  • expand storefront, catalog-model, server route, and compiled-artifact coverage

Testing

  • Commerce server: 161 tests pass; build, typecheck, and lint pass
  • Commerce storefront: 28 tests pass; build, typecheck, and lint pass

@sbolinger-godaddy
sbolinger-godaddy requested a review from a team as a code owner September 28, 2026 20:58
@changeset-bot

changeset-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 786d744

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@godaddy/gd-commerce-server Patch
@godaddy/gd-commerce-storefront Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sbolinger-godaddy

Copy link
Copy Markdown
Contributor Author

Addressed the product availability review in 7732af8.

The catalog API rejects SKUGroup.status as a selected field, which caused product details to fail for every product. We removed that field and chose to match the catalog list's ACTIVE-only behavior by checking the requested ID with skuGroups(id: { in: [$id] }, status: { eq: "ACTIVE" }) in the same catalog request. A missing or inactive group now returns 404, including when it still has ACTIVE SKUs. We removed the unreachable client-side group.status branch; inactive product pages do not need to remain viewable.

This change sets the package's default product-page behavior. Cart and checkout SKU validation are outside this fix's scope. The tests cover active variant details, selected variants, and an inactive group with active SKUs. Commerce server: 161 tests pass; storefront: 28 tests pass; both packages build, typecheck, and lint.

@wcole1-godaddy wcole1-godaddy 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.

Approved. This PR correctly:

  1. Removes unsupported field - Clean removal from both server and client type definitions and GraphQL query, fixing API compatibility issues.

  2. Aligns product details with catalog ACTIVE filter - Server now returns 404 for inactive/missing products instead of returning data that the client had to filter. This is the right architecture decision - server owns the filtering logic.

  3. Improves style isolation - The approach for derived neutral colors elegantly supports dark themes. The reset with color: inherit; font-family: inherit properly isolates descendant typography.

  4. Good test coverage - Integration test validates the variant product flow without the status field, CSS artifact test verifies reset ordering, and unit tests are updated appropriately.

  5. Proper documentation - Server API contract and README are updated to reflect the new behavior.

Well-structured changes with clear separation of concerns between server and client.

@wcole1-godaddy wcole1-godaddy 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.

Approved. This PR correctly:

  1. Removes unsupported status field - Clean removal from both server and client type definitions and GraphQL query, fixing API compatibility issues.

  2. Aligns product details with catalog ACTIVE filter - Server now returns 404 for inactive/missing products instead of returning data that the client had to filter. This is the right architecture decision - server owns the filtering logic.

  3. Improves style isolation - The color-mix approach for derived neutral colors elegantly supports dark themes. The universal reset with inherited color and font-family properly isolates descendant typography from host styles.

  4. Good test coverage - Integration test validates the variant product flow without the status field, CSS artifact test verifies reset ordering, and unit tests are updated appropriately.

  5. Proper documentation - Server API contract and README are updated to reflect the new behavior.

Well-structured changes with clear separation of concerns between server and client.

@wcole1-godaddy
wcole1-godaddy merged commit 8bb3830 into godaddy:main Oct 1, 2026
3 checks passed
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.

3 participants