Skip to content

Edit Builder-backed Content database fields normally#1758

Merged
3mdistal merged 9 commits into
mainfrom
codex/content-builder-source-bulk-updates
Jul 7, 2026
Merged

Edit Builder-backed Content database fields normally#1758
3mdistal merged 9 commits into
mainfrom
codex/content-builder-source-bulk-updates

Conversation

@3mdistal

@3mdistal 3mdistal commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace the selected-row Set/Stage split with one normal Edit affordance for database field edits. Builder-backed fields edit through the same UI as local fields.
  • Persist Builder-owned/source-backed field edits as local Content overwrites first, so the table reflects the latest local value immediately even before anything is sent to Builder.
  • Keep Builder writes guarded: local overwrites become reviewable Builder change diffs, and any Builder execution still goes through the existing staged review/execution gates.
  • Preserve the bounded source-backed bulk-update plumbing behind that review path, with validation for unsupported, stale, or unsafe rows/fields.
  • Reduce Builder-backed table read weight and update caches optimistically so cell/property saves render without waiting on a heavy full refresh.
  • Add focused tests plus a pending Content changelog entry for the Builder-backed edit/cache behavior.

Safety / Scope

  • Ready for review; not merged, and auto-merge is not enabled.
  • No live Builder writes are introduced by normal editing. Content saves locally first; sending changes to Builder remains an explicit guarded review/execution flow.
  • Scope stays on Content safe updates for Builder/source-backed database rows.
  • The user-facing edit path should not expose separate Set/Stage vocabulary for Builder-backed fields.

Verification

  • node_modules/.bin/vitest run app/hooks/use-content-database.test.ts app/components/editor/database/DatabaseView.test.ts actions/stage-builder-source-bulk-update.db.test.ts
  • node_modules/.bin/tsc --noEmit
  • PATH=/Users/alicemoore/.local/share/fnm/node-versions/v22.21.1/installation/lib/node_modules/corepack/shims:$PATH fnm exec --using v22.21.1 pnpm guards
  • git diff --check
  • Manual smoke: ran Content in database mode with pnpm dev:database, confirmed AGENT_NATIVE_MODE=database, and opened Chrome at http://localhost:8080/.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@3mdistal 3mdistal force-pushed the codex/content-builder-source-bulk-updates branch from 4531031 to fe6caa9 Compare July 1, 2026 19:01
@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.

@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.

@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.

@netlify

This comment has been minimized.

@3mdistal 3mdistal marked this pull request as ready for review July 7, 2026 17:42

@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 and found 1 potential issue 🟡

Review Details

This PR adds a new stage-builder-source-bulk-update action, extends Builder review prep to accept explicit changeSetIds, and trims heavy row/body payloads out of read snapshots while improving optimistic property updates in the database UI. The backend action/test coverage is substantial, and the scoped review-prep change is a sound way to keep apply limited to the reviewed rows.

Risk assessment: standard. The change spans shared source-sync business logic plus editor/database UI behavior, so the main failure mode is the UI wiring not actually driving the new guarded review path.

Key findings

  • 🟡 MEDIUM: the new bulk Builder staging path does not appear to be wired into the selected-row edit flow, so bulk edits still mutate rows through the existing per-row property update path instead of opening the promised staged review dialog.

Positives: the PR adds strong DB-level tests for stale rows, fixture rows, ambiguous mappings, scoped review prep, and unsupported property types; and omitting heavy Builder body payloads from normal table reads should reduce unnecessary response weight.

🧪 Browser testing: Will run after this review (PR touches UI code)

Comment thread templates/content/app/components/editor/database/DatabaseView.tsx
@3mdistal 3mdistal changed the title Stage bulk Builder source updates in Content Edit Builder-backed Content database fields normally Jul 7, 2026
@3mdistal 3mdistal requested a review from steve8708 July 7, 2026 18:17
@3mdistal 3mdistal merged commit 179d5ed into main Jul 7, 2026
94 of 95 checks passed
@3mdistal 3mdistal deleted the codex/content-builder-source-bulk-updates branch July 7, 2026 18:43
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