Skip to content

[ENG-1852] Keep Roam shared node content fresh#1147

Draft
sid597 wants to merge 8 commits into
eng-1848-add-roam-full-markdown-content-variant-for-shared-nodesfrom
eng-1852-keep-roam-shared-node-content-fresh-in-the-sync-loop
Draft

[ENG-1852] Keep Roam shared node content fresh#1147
sid597 wants to merge 8 commits into
eng-1848-add-roam-full-markdown-content-variant-for-shared-nodesfrom
eng-1852-keep-roam-shared-node-content-fresh-in-the-sync-loop

Conversation

@sid597

@sid597 sid597 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Extends the existing Roam Supabase sync loop to refresh already-shared source nodes.
  • Detects shared source pages whose Roam page content changed via :page/edit-time or title-level :edit/time.
  • Uploads refreshed full markdown content without running embeddings, while keeping direct/direct_and_description embedding updates on the existing changed-node path.
  • Carries the matched node type through the shared freshness query so required schema metadata stays current.
  • Renames the compact full-markdown fixture into a typed example.

Stack / dependencies

This PR is stacked on #1134 / ENG-1848 because ENG-1852 extends the Roam full-markdown content writer introduced there. Stacking on ENG-1848 keeps that contract work out of this review.

It is still blocked by #1131 / ENG-1849 for schema metadata persistence. Until ENG-1849 lands or is restacked under ENG-1848, this PR can still show the small schema-metadata dependency in its diff.

Validation

  • pnpm --filter roam check-types
  • pnpm --filter @repo/database check-types
  • pnpm --filter roam lint (0 errors, existing warnings remain)
  • git diff --check HEAD~1..HEAD

sid597 added 8 commits June 18, 2026 14:35
The cross-app node contract (ENG-1847) carries nodeType = { sourceLocalId, label } and the instance Concept references it via schema_represented_by_local_id, but the fixtures persisted no is_schema:true schema Concept for that id. Add the required schemaConcept (Roam Claim, Obsidian Evidence) carrying stable source identity + label only -- no source_data/format/color/tag, per the contract's "without redefining schema shape".

Roam's existing 5-min sync already persists the schema Concept per contract (convertDgToSupabaseConcepts -> discourseNodeSchemaToLocalConcept; all types on initial sync, edited types incrementally via nodeTypeSince), so no Roam sync code change is needed for F4/F9/F13. Stacked on eng-1847 (PR #1129, unmerged).
…de-type-schema-metadata-for-shared-nodes

# Conflicts:
#	packages/database/package.json
#	packages/database/src/crossAppNodeContract.ts
#	packages/database/src/lib/rid.ts
# Conflicts:
#	apps/roam/src/utils/convertRoamNodeToFullContent.ts
#	apps/roam/src/utils/syncDgNodesToSupabase.ts
#	packages/database/package.json
#	packages/database/src/crossAppNodeContract.ts
#	packages/database/src/lib/rid.ts
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
discourse-graph Ready Ready Preview, Comment Jun 22, 2026 4:11pm

Request Review

@supabase

supabase Bot commented Jun 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 ↗︎.

@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

ENG-1852

@sid597 sid597 changed the base branch from main to eng-1848-add-roam-full-markdown-content-variant-for-shared-nodes June 22, 2026 16:13
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