Repository navigation
feat(cms): connect a brand's Framer project from Settings › Integrations (#1331) - #1578
Conversation
…ord and send pages to it as draft posts (ansvisor#1331) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… read when the Library opens and daily (ansvisor#1331) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ons (ansvisor#1331) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ss-server # Conflicts: # server/src/lib/content-delivery.test.js # supabase/schema.sql
The Send dialog (editor, Library row, bulk) offers the brand's WordPress site beside Webflow and the webhook. A remembered CMS that isn't ready goes to the webhook, never the other CMS. The toast says when a live post got a new draft and when JSON-LD was left out. The Library marks rows sent to WordPress and asks /wordpress-status once per brand per visit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Node 20 is end of life since 2026-04-30, and Framer's official Server API package (framer-api, for Send to CMS ansvisor#1331) needs Node 22 or later for its global WebSocket. Node 24 is LTS until April 2028. The Dockerfile, CI's server job and the server README move to 24; the web job stays on 20. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…re/cms-framer-server
…#1331) Framer's official Server API (framer-api, needs Node 22+): a brand's project connects with an API key made in it, sealed as WordPress's sign-in is. 00295 adds provider 'framer' (site_id = project id) and the 'framer' delivery target, and reserve_content_deliveries keeps one queued send per page for it too. Routes check the project, list the user's own collections with their fields, save the collection and field map (title to text, page to formatted text, required fields refused as for Webflow) and disconnect (Framer has no API to revoke a key). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…feature/cms-framer-settings
…ons (ansvisor#1331) The Framer card connects the brand's project with an API key made in it, lists the project's own collections with their fields, suggests and saves which field takes the title, the page, meta and JSON-LD (required fields it can't fill and missing title or page fields marked), replaces the key, shows a refused key, and disconnects with a reminder to delete the key in Framer, which has no API to revoke it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… has ended Since ansvisor#1589 a workspace whose plan has ended can't write, but taking back an outside account's access stays open (COST_STOPPING), as Webflow's disconnect does. WordPress's disconnect revokes the Application Password where the site allows, so it joins the list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s-published Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ress-web Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r-server Co-Authored-By: Claude Opus 5.5 <[email protected]>
… has ended Since ansvisor#1589 a workspace whose plan has ended can't write, but taking back an outside account's access stays open (COST_STOPPING), as Webflow's and WordPress's disconnects do. Framer's disconnect deletes the project's API key, so it joins the list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ings Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tings Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ce is read-only Connect, Replace key and Save open it before anything is sent, and a connect, save or disconnect the API refuses for the plan opens it instead of an error. Disconnect stays open, as WordPress's and Webflow's.
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good with e4b66d5: the Framer card now works like the WordPress and Webflow cards on a workspace whose plan has ended. Connect, Replace key and Save open the plan dialog, a connect, save or disconnect the API refuses for the plan opens it too instead of a toast, and Disconnect stays open; the client maps the 402 to subscription. Three new tests fail without it.
Reviewed this PR's own change: its head 666028d against #1575 (a5e9577) merged with #1572 (355b62e), 7 web files: framer-client.ts, framer-card.tsx, their tests, en.json, the Integrations section and Picker's export from webflow-card.tsx. This PR's own files merge clean on main (cfd8a35). The branch as a whole conflicts on main only through #1572, in content/library/_bulk-send-dialog.tsx, content/library/page.tsx and components/content/send-to-cms-dialog.tsx. Those are resolved in #1572, and this branch then merges #1572's new head.
What I checked
- The key in the browser. It's typed into the form and sent once to the API with the person's session, and it's never put in state that outlives the form, in a log or in a toast. The connection the API returns has no key.
- Who sees what. Members only read where pages go. Connect, collections, Save, Replace key and Disconnect show for
canManage, and the API enforces the same thing inassertWriter(#1575). The card only shows a connection read for the active brand, so switching brands never shows the previous brand's. - Field mapping.
suggestFramerMap,fittingFramerMap,unfillableFramerFields,missingFramerPartsandunmappedFramerFieldsfollow the API'scheckFieldMaprules. A collection the API would refuse is marked and can't be saved, and a400 invalid_mapstill shows the API's problems. The name-hint regexes run on Framer field names only. - Errors. Every
framer_*/API code has an English message.auth_failed,changedandnot_connectedread the connection again. Disconnect warns that the key still works until it's deleted in Framer. - Before the API is deployed (the web goes out on merge): the card's read gets 404 and shows "Couldn't read the Framer connection right now." Nothing else changes. On an API still running Node 20 (see #1575), the card reads fine, but Connect answers "Something went wrong with Framer".
- Tests: settings, content and Library tests on the stack: 28 files, 421 passed.
tsc --noEmitis clean. eslint and prettier are clean on the touched files.
Follow-ups
- If #1575 gets an
unavailablecode for an API on Node 20, give it a line here, e.g. "Framer needs Node 22 or later on the API server." - Moving
Pickerto a small shared file (settings/picker.tsx) would save the Framer card from importing from the Webflow card.
Summary
Send to CMS, phase 2 (#1331): Framer, part 4: the Settings › Integrations card. It sits below WordPress's. It joins WordPress's sign-in form to Webflow's collection and field picker.
Stacked on #1575 (Framer's connect API) and #1572 (the WordPress web parts this builds beside). The Framer send (part 2, #1576) is server only and doesn't touch this. This PR's own change is its last commit, web only.
Admins and managers connect the active brand's Framer project:
framer.com/projects/…), or its id.autocomplete="new-password"), never shown again.The API checks the project with the key first (#1575). A failure shows its own message, and the form keeps what was typed.
Connected, the card shows:
invalid_mapproblems are listed.A refused key shows Key refused, a note, and the form to connect again.
Members see where pages go, or that Framer isn't connected, with no form or buttons. A server without
CONNECTOR_CREDENTIALS_KEYsays Framer isn't set up. A failed read says it couldn't be read. Another brand's read never shows after a switch.Other changes:
lib/framer-client.tscalls the API through the same-origin proxy, aswordpress-client.tsdoes. It also has the field-map helpers: the suggestion, the fitting fields, and the required-field checks.webflow-card.tsxonly exports itsPickerfor the Framer card to use.en.json(settings.framer).ERROR_TEXTS: Record<FramerError, string>in the test makes a missing error string a typecheck error.Next: part 5, the Send dialog's Framer target (editor, Library row, bulk), and the Library's published read. Then the docs.
Related issue
Part of #1331 (phase 2, Framer). Stacked on #1575 and #1572.
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/framer-card.test.tsx src/lib/framer-client.test.tsCONNECTOR_CREDENTIALS_KEYset and a real Framer project (gkhngyk), open Settings › Integrations as an admin.Checked in the browser at 1024 px, light and dark. I ran this branch's API and web against the dev DB, with 00295 applied there:
/collectionsanswer in the page (nothing reached Framer):The review's fixes came after this check. They change wording, a warning line and the saved map on going back; the card's tests cover them.
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),yarn typecheck,yarn test(4,189 tests) andyarn build;yarn testagain (4,199 tests).The review's fixes are folded in:
aria-describedby);🤖 Generated with Claude Code