Skip to content

Fix Builder source field sync#1990

Open
3mdistal wants to merge 5 commits into
mainfrom
codex/fix-builder-source-sync
Open

Fix Builder source field sync#1990
3mdistal wants to merge 5 commits into
mainfrom
codex/fix-builder-source-sync

Conversation

@3mdistal

@3mdistal 3mdistal commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What this fixes

Content was not reliably importing all configured Builder CMS fields, so values such as topics, tags, custom model fields, and fields whose names differ only by capitalization could disappear during refreshes. This PR makes both Builder readers request and materialize those fields while continuing to exclude large page bodies from ordinary source refreshes.

It also protects existing data when Builder unexpectedly returns an empty result: Content now keeps the previous rows and reports the source as stale instead of silently erasing the snapshot. If Builder model discovery fails, attach and role-change operations now stop before replacing valid field mappings with an empty set.

Verification

  • focused Vitest suite: 7 files, 131 tests passed
  • Content typecheck passed
  • Content production build passed
  • disposable database-mode verification on port 8080 passed and the test database was cleaned up
  • exact-model Claude Fable 5 review returned NO BLOCKERS
  • fresh tester blockers for discovery errors and case-distinct fields are covered by production-semantics and database regressions

Manual QA note

Google login for alice@builder.io could not be verified in this isolated worktree because the Google auth route is not configured (404). No alternate account was used.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@3mdistal 3mdistal marked this pull request as ready for review July 10, 2026 00:36
builder-io-integration[bot]

This comment was marked as outdated.

builder-io-integration[bot]

This comment was marked as outdated.

@3mdistal 3mdistal requested a review from steve8708 July 10, 2026 01:18
builder-io-integration[bot]

This comment was marked as outdated.

@builder-io-integration builder-io-integration Bot 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.

Builder reviewed your changes — looks good ✅

Review Details

This incremental review focused on the latest follow-up for case-distinct Builder field mappings. I verified that the previously reported collapse bug is now addressed: seedMockSourceFields() preserves the existing Builder sourceFieldKey by propertyId during regeneration, so a mapped data.Status field no longer gets recomputed back to data.status on resync. The new focused tests around exact-case metadata matching and preserved mapped field keys line up with that behavior.

Risk assessment: High. These paths still control Builder-backed source refreshes and field regeneration, but the newest patch is narrowly scoped and appears to fix the reported regression without expanding behavior elsewhere.

For this incremental pass, I did not find a new actionable issue beyond the still-open earlier continuation/shrink concern, and I resolved the stale comment about case-distinct mapped fields collapsing after both were mapped.

🧪 Browser testing: Skipped — PR only modifies backend/source-sync logic and tests, no UI impact.

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