Skip to content

Connect Add Column to Sources - #2662

Draft
3mdistal wants to merge 5 commits into
mainfrom
codex/connect-add-column-sources
Draft

Connect Add Column to Sources#2662
3mdistal wants to merge 5 commits into
mainfrom
codex/connect-add-column-sources

Conversation

@3mdistal

@3mdistal 3mdistal commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Problem

Content databases can already connect Builder, Notion, local tables, and local-folder Sources, but that capability is hidden in database settings. Someone adding a column has no obvious route to discover source-backed fields, so the existing Source model feels like separate database machinery instead of a natural way to add data.

Approach

Add one small handoff from the existing Add column menu into the existing Sources UI. A successful connection returns to the database with Add column open and the newly available fields grouped under From [source]. Closing Sources is a true cancel: it returns to the database without reopening Add column or mutating a connection.

This PR deliberately does not add source suggestions, relationship matching, formula UI, or a separate “add property from this source” workflow. The existing Sources UI remains responsible for choosing and connecting a source.

What changed

  • Added a localized Connect a source entry to Add column, including localized search matching.
  • Reused the database’s existing Sources panel and attach actions instead of introducing another connection surface.
  • Added an acknowledged, monotonic handoff request so Add column reopens after each successful connection, including across database refresh/remount behavior, without reopening after cancel.
  • Suppressed the Add column popover's exit animation only during the Sources handoff so the two surfaces never appear stacked; ordinary open/cancel behavior is unchanged.
  • Reused the existing source-field grouping and optimistic source-field property mutation for From [source] fields.
  • Generalized local-primary bootstrap for read-only detail Sources so a normal local database remains the primary side before a detail Source is attached.
  • Added focused regression coverage for cancel/no-mutation, repeated successful handoffs, localized search, handoff animation cleanup, and local-primary bootstrap, plus a user-facing changelog entry.

Safety and operations

  • No schema migration, new route, credential path, feature flag, or production-data operation is introduced.
  • Source connection still goes through the existing typed action surface and existing Sources UI.
  • The detail-source bootstrap creates the same local source snapshot already used for Notion details; the broader condition preserves local-primary semantics for any supported details Source and composes with current source-mutation locking.
  • Rollback is limited to the Add column handoff, its focused source-bootstrap condition, tests, translations, and changelog entry.

Verification

Exact repaired head: 0c30726392256c8c7711dc367fbe439cb0dd92c5, refreshed onto current main at 86ea1866721a64527b412cd43ad32428e490f4a9.

  • 86 focused tests passed across Add column behavior, translated search, source actions, and database UI regressions.
  • 200 Content database tests passed, including the current migration and locking-sensitive database suite.
  • Full Content suite passed: 170 files passed, 2 skipped; 2,120 tests passed, 3 expected failures, and 18 skipped.
  • Content typecheck passed on the repository-pinned Node 24 runtime.
  • Repository guards passed 50/50.
  • Content product-impact policy passed with a valid local_refinement declaration and no deterministic findings.
  • git diff --check passed.
  • Independent exact-head technical review found no issues. The reviewer verified the handoff-only animation suppression and its reset behavior, cancel/retry handling, repeated-success path, and the absence of boundary expansion.
  • Independent exact-head real-interface QA passed the complete frozen H1–H7 story: Add property entry; clean handoff to existing Sources with no stacked popover; cancel/no-new-connection; existing source selection and match review; confirmation; Add property reopened; exact From QA Books 2662 grouping with federated fields. No console or page errors were observed in the successful run.
  • Alice's prior product/interaction acceptance remains the governing boundary: existing Sources UI, no suggested-sources expansion.
  • Current-head GitHub checks are green except Fast tests lane-2 and its aggregate. The lane failed identically on its one bounded rerun because packages/docs/server/plugins/agent-chat.spec.ts could not import the generated packages/docs/.generated/actions-registry.js; the other 161 tests in that package run passed. This PR changes no Docs or CI-generation files, so that unrelated base/workflow defect is intentionally not folded into this stack base.

Review focus

  • Does the one-shot handoff preserve the intended difference between cancel and successful connection, including repeated connections and remounts?
  • Does generalizing local-primary bootstrap keep detail-source attachment compatible with current mutation locking and source ownership?
  • Does the Add column entry remain a thin discovery route into Sources without creating a competing suggestion or relationship workflow?
  • Are translated search and the existing From [source] grouping understandable without changing source-field identity or write ownership?

Prospective stack order

This draft is the intended base of a future dependency stack, but this PR does not create or authorize any child branch or PR:

  1. PR Connect Add Column to Sources #2662 — Add column → existing Sources UI (this change)
  2. Refresh/phantom lane — only after separate evidence, shaping, and Alice authorization
  3. 587/589 hydration lane — only after separate evidence, shaping, and Alice authorization
  4. Review Diff latency lane — only after separate evidence, shaping, and Alice authorization

Product roadmap impact

content_product_impact:
  lane: local_refinement
  features:
    - content.feature.connect-your-sources
  capabilities:
    - content.source.catalog
    - content.object.database
  record_change: none
  proof:
    - 86 focused Add column, source action, and database UI tests
    - 200 Content database tests
    - full Content suite, Content typecheck, and 50/50 repository guards
    - exact-head independent technical review and H1-H7 real-interface acceptance
  rationale: The change makes existing Source discovery available from Add column without claiming the governed catalog or cross-source Query contract is complete.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Visual recap — skipped

The visual recap job did not run for this pull request. This is informational only and does not block the PR.

Recap skipped for 0c30726: draft PR.

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

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.

1 participant