Skip to content

ENG-2128 Express source as a sourceDocument slot/reference of Evidence - #1329

Merged
maparent merged 7 commits into
mainfrom
eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence
Aug 31, 2026
Merged

ENG-2128 Express source as a sourceDocument slot/reference of Evidence#1329
maparent merged 7 commits into
mainfrom
eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence

Conversation

@maparent

@maparent maparent commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

@linear-code

linear-code Bot commented Aug 22, 2026

Copy link
Copy Markdown

ENG-2128

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
discourse-graph Skipped Skipped Aug 31, 2026 1:06pm

Request Review

@supabase

supabase Bot commented Aug 22, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@devin-ai-integration devin-ai-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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from 1a54ca6 to 3095571 Compare August 22, 2026 19:12
@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from 3095571 to 30f5a10 Compare August 23, 2026 13:57
@graphite-app

graphite-app Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

PR size/scope check

This PR is over our review-size guideline.

  • Recommended: ~200 lines changed
  • Acceptable limit: up to 400 lines when well-scoped/self-contained
  • Preferred file count: fewer than 5 files

Please split this into smaller PRs unless there is a clear reason the changes need to land together.

If keeping it as one PR, please add a brief justification covering:

  • What single problem this PR solves
  • Why the files/changes are coupled

@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from 1cf61d6 to f54d468 Compare August 23, 2026 15:10
@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from f54d468 to 1d4a208 Compare August 23, 2026 15:11
@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from 1d4a208 to bd6014f Compare August 23, 2026 17:45
@maparent
maparent force-pushed the eng-2129-allow-to-populate-reference_content-from-crossappnode-and branch from 03486e7 to 1f3c80c Compare August 23, 2026 17:45
@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from bd6014f to bb080ff Compare August 23, 2026 17:54
@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from bb080ff to 8317cba Compare August 23, 2026 18:13
@maparent
maparent force-pushed the eng-2129-allow-to-populate-reference_content-from-crossappnode-and branch from e094354 to f8a4742 Compare August 26, 2026 12:16
@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from 8317cba to a0f586b Compare August 26, 2026 12:18
@maparent
maparent force-pushed the eng-2129-allow-to-populate-reference_content-from-crossappnode-and branch 2 times, most recently from 38a56dc to a942edd Compare August 26, 2026 12:26
Base automatically changed from eng-2129-allow-to-populate-reference_content-from-crossappnode-and to main August 26, 2026 12:30
@maparent
maparent force-pushed the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch from a0f586b to 0266b22 Compare August 26, 2026 12:32
@mdroidian

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d27d958f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/roam/src/utils/sourceSlot.ts Outdated

@mdroidian mdroidian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the codex comment, let's make sure we default Page and Block matchers.
And there's a couple other comments we should address before merging.

Comment thread apps/roam/src/utils/sourceSlot.ts Outdated
Comment thread apps/roam/src/utils/conceptConversion.ts Outdated

@mdroidian mdroidian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this but the requested change is blocking and requires fixing. If you choose to go with code other than title: node.node_title ?? node.text,, please re-request a review.

const localConcept = discourseNodeBlockToLocalConcept(context, {
nodeUid: node.source_local_id,
schemaUid: node.type,
text: node.node_title ? `${node.node_title} ${node.text}` : node.text,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this breaks concept syncing for "page-backed nodes" (read regular nodes). The page query stores the page title in node.text and does not set node.node_title, so this passes undefined. That becomes an undefined concept name, but Concept.name is required, causing the upsert to fail with -2.

Please restore the fallback:

title: node.node_title ?? node.text,

For page-backed nodes, node.text is the page title. For "block-backed nodes" (read nodes that include an embedding block ref), node.node_title is the containing page’s title.

We should probably add a test that covers both cases.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch. I looked at getAllDiscourseNodesSince but not getDiscourseNodeTypeWithSettingsBlockNodes.
I think this is worth a refactor, where node-title is always the title, and optional embed-text is the block if different from the title.
But that's a different scope.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(And I prefer that to a test that would tend to enshrine the current inconsistency)

@maparent
maparent merged commit 1d74e96 into main Aug 31, 2026
11 checks passed
@maparent
maparent deleted the eng-2128-express-source-as-a-sourcedocument-slotreference-of-evidence branch August 31, 2026 13:08
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