Repository navigation
fix(cms): give a Webflow item sent again a date when it has none - #1677
Merged
Merged
Conversation
Follow-up from ansvisor#1600 (item 1). Only a new item was given the day it's sent; an item sent again kept its date. So a brand that maps an optional date later, or makes its date required in Webflow, kept an empty date on every item sent before, and a send again left it empty. When the field map gives a date, sendToWebflow now reads the item before updating it (getItem, which says which fields hold a value) and, when its date is empty, sends today's with the update. An item that can't be read is updated without a date, as before; without a date field nothing is read. The Send to CMS guide's field table lists the Date field (ansvisor#1507's follow-up) and says an item sent again keeps its date, or gets one. fieldDataFor (webflow-items.js) is unchanged, so this doesn't meet the Framer PRs' edit at its end (ansvisor#1576, ansvisor#1579). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review follow-up. The comment above createItem still said only a new item is given the day it's sent, but an item sent again with an empty date now gets it too. It names both now. Comment only; webflow-items.js untouched. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
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
Follow-up from #1600 (item 1): a Webflow item that's sent again gets a date when it has none.
Only a new item was given the day it's sent; an item sent again kept its date. So if a brand mapped an optional date later, or made its date required in Webflow, every item sent before kept an empty date, and sending it again left it empty.
sendToWebflowreads the item before updating it (getItem, which now also says which fields hold a value).getItem's other caller (webflow-status.js) only sees an extra field.fieldDataFor(webflow-items.js) is unchanged, so this doesn't touch the Framer PRs' edit (feat(cms): send pages to a brand's Framer collection as draft items (#1331) #1576, feat(cms): mark a page published once its Framer item is live on the site (#1331) #1579). Review fix eca0b66 updates the comment abovecreateItem.Cost: when a date field is mapped, each send of an existing item makes one extra Composio read. Bulk sends already go one page at a time, with a pause between them.
Related issue
Follow-up from #1600's review.
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 server && npx vitest run src/lib/cms/webflow-delivery.test.js src/lib/cms/webflow.test.jsChecklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Full checks were run in one tree with this batch's ten follow-up branches merged, and again after the review fixes:
npm test: 246 files, 3,343 tests passed;vitest: 447 files, 4,352 tests passed (after the review fixes).A pre-push review was run on all ten branches.
🤖 Generated with Claude Code