Skip to content

feat(cms): send pages to Framer from Send to CMS (#1331) - #1580

Merged
gkhngyk merged 54 commits into
ansvisor:mainfrom
cihan-gyk:feature/cms-framer-send-target
Oct 28, 2026
Merged

gkhngyk merged 54 commits into
ansvisor:mainfrom
cihan-gyk:feature/cms-framer-send-target

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Send to CMS, phase 2 (#1331): Framer, part 5. The Send dialog sends to the brand's Framer collection: from the editor, a Library row and the Library's bulk send. The Library reads which Framer items went live.

Stacked on #1578 (the Settings card), which is stacked on #1575 and #1572. It uses the API of #1576 (send) and #1579 (/framer-status). This PR's own change is its last commit, web only. It follows WordPress's part 4 (#1572).

Where pages go (components/content/cms-target.tsx):

  • useCmsTarget reads Webflow, WordPress and Framer together.
  • Framer is ready when it's connected, a collection is picked, and its title and page fields are mapped. That's the API's own framer_not_ready rule.
  • The order is Webflow, WordPress, Framer, then your workflow.
  • The rules stay as in feat(cms): send pages to WordPress from Send to CMS (#1331) #1572:
    • with nothing remembered, or the remembered CMS no longer connected, the first one ready is picked;
    • a remembered CMS that isn't ready sends to the webhook, never to another CMS;
    • a connection that can't be read is left out, with Try again for a person who picked it.
  • Layout: two cards side by side, three in a row from sm, four in a 2×2 grid. The arrow keys still go round, past one that's off.

The dialog:

  • The description says the page goes to the collection as a draft item, with its slug and meta, and that images aren't sent yet.
  • The toast says "Sent to Framer as a draft item" or "Updated in Framer", with two notes:
    • how many images were left out;
    • for an updated item that isn't a draft: the change goes live with the site's next publish. That's Framer's live, not WordPress's.
  • Framer's refusals have their own messages. "No webhook" now covers three CMSs.

The Library:

  • Bulk send offers Framer the same way. Its description says an item that isn't a draft is updated in place, and that images aren't sent.
  • A row sent to Framer reads "In Framer as a draft item since …". "Removed in Framer" shows as the failed send's reason.
  • Opening the Library asks /framer-status once per brand per visit, when a listed page is in Framer as a draft item.

cms-send-client.ts:

  • refreshFramerPublished shares the helper with Webflow's and WordPress's.
  • CmsTarget takes 'framer', with the four framer_* errors.

Strings are in en.json.

Next: the docs.

Related issue

Part of #1331 (phase 2, Framer). Stacked on #1578 → #1575 + #1572; needs #1576 and #1579 on the API.

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/content "src/app/[locale]/(dashboard)/dashboard/content/library" src/lib/content/cms-send-client.test.ts
  2. With a real Framer project connected and a collection picked (gkhngyk), open a page in the editor and click Send to CMS.
    • Framer is offered. Send makes a draft item; sending again says it was updated.
    • Take the item out of draft and publish the site, then open the Library: the row turns Published.

Checked in the browser at 1024 px, light and dark. I ran this branch's API and web against the dev DB, with temporary Webflow, WordPress and Framer rows, removed afterwards. Nothing was sent.

  • The editor's dialog shows the four cards in a 2×2 grid, with Webflow first when nothing is remembered.
  • Picking Framer shows its description, with the collection's name.
  • Reopened, the dialog keeps Framer, as remembered.

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), yarn typecheck, yarn test (4,228 tests) and yarn build. They ran after the pre-push review's fixes:

  • the bulk description's note on items that aren't drafts;
  • the live toast's wording;
  • "Images aren't sent yet" in the editor;
  • tests for a Framer missing its collection or page field, a remembered Webflow or WordPress that can't be read, and the Library's read (not when no row is sent, and again for another brand).

Kept as Webflow has it: "as a draft item" for an updated item that isn't a draft. The delivery row doesn't keep live, so the web can't tell the two apart.

🤖 Generated with Claude Code

cihan-gyk and others added 13 commits October 27, 2026 10:18
…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]>
…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]>
…#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]>
…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]>
The Send dialog (editor, Library row, bulk) offers the brand's Framer
collection beside Webflow, WordPress and the webhook, in a 2x2 grid when
all four are there. Framer is ready with a collection and its title and
page fields; a remembered CMS that isn't ready goes to the webhook. The
toast says made or updated, images left out, and that a non-draft item's
change waits for the site's next publish. The Library marks rows sent to
Framer and asks /framer-status once per brand per visit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cihan-gyk and others added 10 commits October 28, 2026 03:07
… 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]>
… 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]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

Merged main forward (8356ba3) via #1578; no new conflicts. Lint and typecheck pass on the chain tip.

@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

Merged main (cfd8a35) through #1578; the Library's Framer published read now skips while the workspace is read-only, like Webflow's.

@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

Reviewed this PR's own change: #1578's head 666028d → fb1811d, 12 web files. The branch holds #1578 (and #1575, #1569–#1572), but not #1576 or #1579. It needs their API (target: 'framer' and /framer-status), so merge it after both. On main (cfd8a35) it conflicts in the same three files as #1572 (_bulk-send-dialog.tsx, library/page.tsx, send-to-cms-dialog.tsx), and this PR's own diff edits all three. Once #1572 is resolved, merge #1578's new head here and keep both sides: WordPress's lines from #1572 and Framer's from here.

What I checked

  • Picking the target. useCmsTarget reads Webflow, WordPress and Framer together. Framer counts as ready under the API's own rule (framerFor): connected, a collection, and title and body fields. The order is Webflow, WordPress, Framer, then the webhook. A remembered CMS that's connected but not ready still sends to the webhook, never to another CMS. A remembered one that can't be read is named, with Try again.
  • The dialog and bulk send. Framer's description, the "made" and "updated" toasts, the images note and the "goes live with the next publish" note for a live item all match what #1576 returns. The four framer_* refusals have their own messages.
  • The Library. /framer-status is asked once per brand per visit, only when a listed row was sent to Framer and is still sent. "Removed in Framer" shows as the reason.
  • Before the API is deployed: Framer's read fails and Framer is left out of the picker. Only someone who picked Framer before (nobody yet) would see the "couldn't check" note. Nothing changes for Webflow, WordPress or the webhook.
  • Tests: content, Library and send-client tests pass (part of the 421 above). tsc --noEmit and eslint/prettier are clean on the touched files.

@gkhngyk
gkhngyk merged commit 6aa58bd into ansvisor:main Oct 28, 2026
4 of 5 checks passed
@github-actions github-actions Bot removed the needs-migration Adds or edits a migration — apply it to the hosted database label Oct 28, 2026
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