Repository navigation
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
Conversation
…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.
|
I took the review's before-merge item over (e86f3cf): Coming soon only on the cloud ( |
gkhngyk
left a comment
There was a problem hiding this comment.
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").
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:
/statusanswersnot_configured, the same check as/api/integrations/config'sgoogleMerchantCenter), 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.No Merchant Center claim without Merchant Center (your #1610 follow-up 1):
getShoppingChecknow reports whether the brand has amerchant_centercatalog source. A failed read counts as none, so the copy says less, never more.okDetailand 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._rules-tab.tsx'sHINTED. They're listed now.No-catalog copy points to a feed URL or a file upload instead of Merchant Center:
Related issue
Part of #1270 (the connector is merged; connecting waits on Google's approval).
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
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"COMPOSIO_GMC_AUTH_CONFIG_IDunset on the API, Settings › Integrations shows Merchant Center with "Coming soon" and no Connect.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run in
web/:yarn format,yarn lint(0 errors, the 7 earlier warnings),yarn typecheckandyarn 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:
COMPOSIO_GMC_AUTH_CONFIG_IDon 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.🤖 Generated with Claude Code