Repository navigation
feat(settings): connect a brand's Webflow site, collection and fields in Settings › Integrations (Send to CMS #1331, phase 2 part 3: Webflow card) - #1505
Merged
Conversation
…o CMS ansvisor#1331, phase 2 part 1: Webflow connection) A brand connects its Webflow site with a site token, kept by Composio as an API-key connected account under the brand's own Composio user, picks the collection pages go to and which of its fields takes the body, meta title, meta description and JSON-LD. 00283 adds brand_cms_connections (members read; the server writes for admins and managers). Routes under /api/cms/brands/:brandId/webflow connect, list collections and fields with a suggested map, save the map and disconnect. The token is never stored, logged or sent back. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…refusals narrowly (pre-push review) - A new token is a second Composio account until the first is removed, so connect with allowMultiple; once the new one is saved, the brand's other Webflow accounts go (forgetWebflowAccounts), and a disconnect removes them all, keeping the row when Composio can't. - Writes are tied to the account the request read: a map checked with a token replaced meanwhile isn't saved (409 changed), a late refusal marks only its own token, and a disconnect leaves a token connected meanwhile. - Only a 401 or a missing Composio account is auth_failed; a 403 is no_access and changes nothing; a successful read connects a refused connection again. - A collection's fields are given only for one on a site the token reaches. - A missing brand answers not_found; a required field can't be the JSON-LD's. - Unused exports dropped; composio.test.js covers the Webflow helpers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ction as draft items (Send to CMS ansvisor#1331, phase 2 part 2: Webflow send) POST /api/content-drafts/send takes target 'webflow': each page becomes a draft item in the brand's collection (00283) by its field map, or updates the item its last send made there (a new one when it was deleted in Webflow). Webflow's rich text has no tables, so a table goes as a list; images wait for workspace files (CHAT-06); the meta description falls back to the page's opening words; JSON-LD goes as its JSON to its own field. The same 200 a day, 25 per send and pause apply. 00284 adds the delivery's target and the item's collection, and reserve_content_deliveries takes the target ('webhook' by default, so the earlier API still works). A token Webflow refuses marks the connection auth_failed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… as they are (pre-push review) - A table cell keeps its paragraphs, items and lines a space apart, and its links; a table a figure wraps is kept, a table in a cell read once; words or items outside a block become paragraphs; comments go; a picture counts as one image. - A slug with nothing Latin left falls back to the draft's id, the same on every send, not the delivery's. - 00284: a second Webflow send of a page while one is queued is refused under the cap's lock (in_progress), so two sends can't make two items. - The item's id is kept even when the delivery's row was written meanwhile. - A batch stops once Webflow refuses the token, closing the rest. - The webhook callback answers only for webhook deliveries. - An emptied JSON-LD field clears the item's old one; every "<" in it is escaped; the opening words stay within 160 characters. - A taken slug says what to do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… in Settings › Integrations (Send to CMS ansvisor#1331, phase 2 part 3: Webflow card) A Webflow card under the product catalog: admins and managers paste the brand's site token (sent from the browser to the API's proxy once, never through a server action), pick the site and collection pages go to, and which field takes the page content, meta title, meta description and JSON-LD (the collection's suggested map first), replace the token and disconnect; members see where pages go. A refused token asks for a new one; a connection changed meanwhile is read again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 25, 2026
gkhngyk
reviewed
Oct 25, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good, with follow-ups to fix before it's turned on.
What I checked:
- The token's path. It goes once, from the field to
POST /api/cms/brands/:id/webflow, as a JSON body through the same-origin proxy. The proxy forwards the body and logs none of it, and the token never goes in a URL or a server action. The API hands it to Composio and answers with the connection's shape only: no token and no Composio ids. The field is a password input with autocomplete off, as the AI Providers key is. Its value is gone once connected, on Cancel, and on a brand switch, because the form unmounts while the next brand is read. The client'sconsole.errorlogs only a thrown fetch error, never the request. - Who sees what. The controls show for
canManage(admin or manager), the same roles as the API'sassertWriter. A member's card makes one call: the GET every member of the brand's organization may make. It never makes the collection reads or the writes, and a test checks that. - Another brand's answers. Reads are kept by the brand they were made for, effects cancel on a change, and the mapping remounts per brand.
- States. The card covers not set up, can't be read, not connected, token refused (an amber note and the token form) and connected. If Webflow answers
auth_failed,changedornot_connectedwhile the person works, the card reads the connection again without a reload. A failed fields read disables Save, and a failed collections read keeps the site picker. Disconnect asks first. - Pickers. Every
<Select>getsitemsof{ value, label }, and its label names its trigger. Each part lists only the fields of its type that no other part takes, and the body has no "Not sent". - Words. All of them are in
settings.webflow. Every code the client can return has a message, andinvalidfrom the token form reads as a token that doesn't look right. The card says pages go as draft items, published in Webflow, and that's what #1504 sends. - What's live. Once this is merged, every workspace's Settings › Integrations shows the card. Until the API has
COMPOSIO_WEBFLOW_AUTH_CONFIG_ID, it says Webflow isn't set up, as the Google cards do.
Low, follow-up (please fix before Webflow is turned on):
webflow-card.tsx:407and:513-517: the saved map comes back as it was saved. But if its field was deleted, or its type changed in Webflow, the picker shows "Not sent" ("Pick a field" for the body).mapstill holds the old slug, so Save sends it, and the API lists a problem about a field the picker doesn't show. When the fields arrive, keep only the parts whose field is among that part's choices, so what's saved is what's shown.webflow-card.tsx:534-538: each of the API'sproblemsstarts with its internal part key ("metaTitle: the collection has no field …", "body: pick the rich text field a page goes to"). Show the part's label (t('parts.metaTitle')) in place of the key, or have the API use the labels. Only the general toast is announced, not the list: give the listrole="alert". Also tie the token hint (:301) to its field witharia-describedby, as the Send dialog does for its slug hint.webflow-card.tsx:201-208: with a refused token, a member sees "Token refused" beside "Pages go to Blog Posts.", but no page can go until someone pastes a new token. In that state, say so, e.g. "Webflow refused the token. Pages can't go there until an admin or manager pastes a new one."
…-settings # Conflicts: # server/.env.example # supabase/schema.sql
…sed parts by their labels, tell members a refused token stops sends (review)
- A saved part whose field was deleted or changed type in Webflow is left
out when the fields arrive, so what's saved is what the pickers show.
- The API's problems name a part by its label ("Meta title: …"), in a
list read out as an alert; the token hint describes its field.
- With the token refused, a member reads that pages can't go to Webflow
until an admin or manager pastes a new one.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
Thanks. All three are fixed, and main is merged forward.
|
gkhngyk
approved these changes
Oct 25, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
What I checked:
- Earlier items.
- Done. When the fields arrive,
fitting(webflow-card.tsx:49-61) keeps a part only while its field is still one of that part's choices. It uses the pickers' own rules: the part's type, never Name or Slug, and one part per field. So what's saved is what the pickers show. If the body's field is gone, Save stays off until one is picked. There's a test. - Done. A problem names its part by its label (
:458-461), from the API'spart: …prefix (checkFieldMap), and the list isrole="alert". The token hint is tied to its field witharia-describedby. - Done. With the token refused, a member reads that pages can't go until an admin or manager pastes a new one (
:220-221). There's a test.
- Done. When the fields arrive,
- Merge
da34b6b6changes nothing beyond merging its parents. Itsserver/.env.exampleandschema.sqlare main's. On main, the PR is its six web files, and it merges cleanly. - Before the API is deployed. The card makes one read,
GET /api/cms/brands/:id/webflow. An API without #1503 answers it with Express's plain 404, and the card reads that as a failure. Every member of every workspace then sees "Couldn't read the Webflow connection right now." under the catalog card in Settings › Integrations. Nothing else is called: no token form shows, so no one can try to connect. Nothing that works today changes. - After the deploy, until the API has
COMPOSIO_WEBFLOW_AUTH_CONFIG_ID, the card says Webflow isn't set up.
If this merges before the API is deployed:
web/src/lib/webflow-client.ts:107-121andwebflow-card.tsx:97-108: until the deploy, every workspace sees a failure in Settings for a feature it doesn't have yet. These routes always send acodewith their own 404s (not_foundfor a brand that's gone). A 404 with nocodemeans the API has no Webflow routes yet. Read it asnot_configured, and have the card shownotConfiguredfor that code. It then says "Webflow isn't set up on this server yet." until the deploy, which is what it says after the deploy until the setting is on.useCmsTarget(#1506) can treat the same code as a brand without Webflow, not as a failed read. The other way out is to merge this after the API is deployed.
7 of 12 tasks
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
#1331, phase 2, part 3: the Webflow card in Settings › Integrations. Web only. Stacked on #1504, which is stacked on #1503: merge those first. The card uses #1503's routes.
What the person sees (the active brand, under the product catalog):
COMPOSIO_WEBFLOW_AUTH_CONFIG_ID): "Webflow isn't set up on this server yet." Nothing else.lib/webflow-client.ts. It never passes through a server action, and it's cleared from the field once connected. This is the same path the catalog upload uses.problems) are listed under the fields, e.g. a required field that Send to CMS doesn't fill.auth_failed,changedornot_connectedwhile the person works, so a refusal shows without a reload.States kept honest:
Text: all through
en.json(settings.webflow, ICU). The API'sproblemsshow as it words them, as the catalog card does with its errors.Related issue
Part of #1331 (phase 2, Webflow). Stacked on #1504 → #1503.
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
COMPOSIO_WEBFLOW_AUTH_CONFIG_ID: Settings › Integrations shows the Webflow card saying it isn't set up.I checked it locally in the browser at 1024px, in light and dark, with the API calls stubbed in the page (no Composio here):
Without Composio, it shows "not set up", as it should.
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): 0 errors; the 6 warnings are in files this PR doesn't touchyarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)A pre-push review found these, all fixed before the commit:
Web:
yarn test(3,873 passed) andyarn buildpass.🤖 Generated with Claude Code