Repository navigation
fix(settings): load each integration card on its own and open Connect at once - #1783
Merged
Merged
Conversation
Settings › Integrations read every Google card's status, the catalog's sources and the property lists through server actions. Next runs those one at a time, so a slow Composio answer for one provider (Analytics) left Merchant Center and Product catalog on their skeletons behind it, and Connect, a server action too, queued after them all: measured locally with Analytics' status held 8 s, the popup opened 18.5 s after the click. - Status, Connect and the property lists go from the browser through the API's proxy (lib/integrations-client.ts), side by side and each with a time limit: 10 s for a read, 20 s for Connect and the property lists. Connect now opens in under a second while a status is still loading. - A status that times out or fails says so, with Try again in place of the skeleton. A Connect that can't start says why (took too long, admins and managers only, or failed) or opens the upgrade dialog. - Google Merchant Center's card shows only where the server offers it, from the API's env-only config: no skeleton and no Coming soon while it isn't, and an older API without the config offers nothing. - The catalog's sources read stops being waited for after 10 s and says it can't be read; the store connectors, category pages and Webflow / WordPress / Framer reads get the same limit. - The server actions left (Merchant Center offered, disconnect, the first sync, the suggestion sources' config) get time limits; the ones the browser calls now are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…with a 504 The same-origin proxy waited on the API without a limit, up to the function's 300 s, so a hung upstream left a page's cards loading. A GET or HEAD now gives up after 60 s without an answer and returns a 504 with a JSON body (code upstream_timeout). Once the API answers, its body streams through as before; changes keep the long limit the suggestion runs need. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ting a CMS The Library asks Webflow, WordPress and Framer whether sent pages were published each time it opens: three requests from cmsLimiter's 60 a quarter-hour, the bucket connecting a CMS uses too. Opening the Library often could leave Connect refused with a 429. The three checks get a bucket of their own (cmsStatusLimiter, 180 a quarter-hour; the server answers them from a two-minute memory per brand), and cmsLimiter keeps to connections. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
approved these changes
Oct 29, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Each integration card loads on its own, the Library's CMS status checks get their own rate-limit bucket (cmsStatusLimiter), and a proxied read gives up after 60 s with a 504 instead of hanging. Conflicts with #1777 in integrations.ts only on the same timeout line; this PR's CONFIG_TIMEOUT_MS is kept. Web typecheck, the settings, integration and proxy tests, and the rate-limiter and content-drafts route tests pass.
This was referenced Oct 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Production fix. Customers reported that Settings › Integrations' Connect buttons come very late, and that clicking Connect does nothing.
Root cause: Next.js runs a page's server actions one at a time (
next/dist/client/components/app-router-instance.jsdispatchAction: a new action waits at the end of the queue).getIntegrationStatus,integrations-section.tsx:203-220), and Connect was one too (connectIntegration,use-integration-connect.ts:59).server/src/routes/integrations.js:110; the SDK defaults to a 60 s timeout and 2 retries), and the web side had no limit at all./api/integrations/configexisted before.Changes
/api/aeoproxy from the browser (newweb/src/lib/integrations-client.ts), so nothing queues behind anything.en.jsoninstead of a skeleton./config, and a 404 counts as not offered. No skeleton or "Coming soon" shows while loading.upstream_timeout) instead of hanging (web/src/app/api/aeo/[...path]/route.ts).cmsStatusLimiter, 180 per 15 min). Opening the Library no longer uses up the quota that CMS Connect needs.Not in this PR:
_data-strip.tsxstill calls three server actions together.Related issue
None (production bug report).
Type of change
fix— Bug fixHow to test
COMPOSIO_GMC_AUTH_CONFIG_ID, no Merchant Center card shows.integrations-client.test.ts,actions/integrations.test.ts, the proxy'sroute.test.ts;integrations-section,use-integration-connect,catalog-sources-cardand the serverrate-limitertests.Screenshots
Checked locally at 1024 px in light and dark mode.
Checklist
🤖 Generated with Claude Code