Skip to content

fix(settings): show Merchant Center as coming soon while the server has no setup for it, and claim its checks only for brands it reads - #1618

Merged
gkhngyk merged 3 commits into
ansvisor:mainfrom
cihan-gyk:fix/merchant-center-coming-soon
Oct 28, 2026
Merged

gkhngyk merged 3 commits into
ansvisor:mainfrom
cihan-gyk:fix/merchant-center-coming-soon

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Merchant Center shows as coming soon until we can connect it, and nothing claims a Merchant Center check that wasn't made.

Google Merchant Center can't be connected yet. Composio doesn't manage the Merchant API scope, so Ansvisor has to apply to Google for it, and approval can take a while. Today the card offers Connect and then says the server isn't set up correctly.

Meanwhile a brand's catalog comes from a feed URL or a file upload in Product catalog. Every shopping feature reads the catalog whatever its source. Merchant Center adds only the refused-item issues.

Settings › Integrations:

  • While the server has no Merchant Center setup (/status answers not_configured, the same check as /api/integrations/config's googleMerchantCenter), the card shows a Coming soon badge and no Connect. A line says: "Until then, add your products with a feed URL or a file upload in Product catalog below." Self-hosted gets the same card instead of the env-vars line.
  • A configured server behaves as before. A card whose status can't be read is hidden, as before.
  • Merchant Center sources a brand added earlier stay listed and removable in Product catalog.

No Merchant Center claim without Merchant Center (your #1610 follow-up 1):

  • getShoppingCheck now reports whether the brand has a merchant_center catalog source. A failed read counts as none, so the copy says less, never more.
  • Before you publish's okDetail and the Shopping rules' hints (shopProductLinks, shopLinksLive) say "accepted by Merchant Center" only then. Otherwise they say just "in stock". "Merchant Center refuses it" is unchanged, since only Merchant Center's data can say it.
  • The three Shopping rules' hover hints were never shown: they weren't in _rules-tab.tsx's HINTED. They're listed now.

No-catalog copy points to a feed URL or a file upload instead of Merchant Center:

  • Brief › Shopping path's empty state;
  • the My Products note;
  • Quality's "Connect a feed" link ("Add a feed URL or a file");
  • the Shopping path description: "and by Merchant Center status once it's connected".

Related issue

Part of #1270 (the connector is merged; connecting waits on Google's approval).

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. cd web && yarn vitest run src/components/settings/integrations-section.test.tsx src/lib/content/shopping-check.test.ts src/lib/actions/shopping-path.test.ts "src/app/[locale]/(dashboard)/dashboard/content/editor/[draftId]/_before-publish.test.tsx" "src/app/[locale]/(dashboard)/dashboard/content/editor/[draftId]/_rules-tab.test.tsx"
  2. With COMPOSIO_GMC_AUTH_CONFIG_ID unset on the API, Settings › Integrations shows Merchant Center with "Coming soon" and no Connect.
  3. On a draft with a shopping path, for a brand whose catalog is a feed or an upload, Before you publish says "in stock", without "accepted by Merchant Center".

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

Also run in web/:

  • yarn format, yarn lint (0 errors, the 7 earlier warnings), yarn typecheck and yarn build;
  • yarn test: the editor page's test file timed out under load in the full run. It passes alone (271 tests), and settings, lib/content, lib/actions, content and shopping pass together (189 files, 2,131 tests).

No browser check: the card needs an API without the Merchant Center env. It's covered by the card's tests with and without the setup.

For you, @gkhngyk:

  • Unset COMPOSIO_GMC_AUTH_CONFIG_ID on the production API until Google approves the Merchant API scope. While it's set, the card keeps offering Connect, and that fails as today. Set it again once approved, and the card comes back with no code change.
  • The connector's acceptance test (feat(integrations): Google Merchant Center connector: products and item issues #1270: a real Merchant Center account) waits on that approval.

🤖 Generated with Claude Code

…as no setup for it, and claim its checks only for brands it reads

Google Merchant Center needs Ansvisor's own approval before it can be
connected. Until the server has its setup, Settings › Integrations shows
the card with a "Coming soon" badge and a line pointing to a feed URL or
a file upload, with no Connect; sources added earlier stay listed and
removable. The catalog's other sources already carry every shopping
feature.

Before you publish and the Shopping rule hints say "accepted by Merchant
Center" only for a brand with a Merchant Center source (ansvisor#1610 follow-up
1); the Shopping rules' hints, never listed in HINTED, now show. The
no-catalog copy points to a feed URL or a file upload.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…keep the set-up line self-hosted, and claim its checks only for an account last read

A self-hosted server that isn't set up for Merchant Center shows Not configured and the line naming its variable again, as for the other integrations. The editor says a product is accepted by Merchant Center only when the brand's Merchant Center source last synced fine.
@gkhngyk

gkhngyk commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

I took the review's before-merge item over (e86f3cf): Coming soon only on the cloud (isCloud()), so self-hosted keeps Not configured and the set-up line; hasMerchantCenter counts only a source whose last sync was ok. Tests for both.

@gkhngyk gkhngyk 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.

Looks good with e86f3cf: Coming soon shows only on the cloud, self-hosted keeps Not configured and the set-up line, and the Merchant Center wording needs a source whose last sync was ok. To show Coming soon on production, COMPOSIO_GMC_AUTH_CONFIG_ID has to be unset on the API.

The main merge keeps both sides in shopping-check.ts (#1664's prices and this PR's merchantCenter), and the Rules tab test now names the rule as #1662 calls it ("No out-of-stock or refused product linked").

@gkhngyk
gkhngyk merged commit 5986fd6 into ansvisor:main Oct 28, 2026
5 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.

2 participants