Skip to content

ENG-1859 Add Roam import action for selected shared nodes#1226

Draft
sid597 wants to merge 2 commits into
eng-1858-materialize-obsidian-origin-markdown-into-roam-v2from
eng-1859-add-roam-import-action-for-selected-shared-nodes
Draft

ENG-1859 Add Roam import action for selected shared nodes#1226
sid597 wants to merge 2 commits into
eng-1858-materialize-obsidian-origin-markdown-into-roam-v2from
eng-1859-add-roam-import-action-for-selected-shared-nodes

Conversation

@sid597

@sid597 sid597 commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add Blueprint selection controls to the existing Roam shared-node discovery dialog.
  • Import one or more selected Obsidian-origin nodes through the ENG-1858 materializer.
  • Fetch the selected node's full canonical CrossAppNode payload only when import begins.
  • Process selected nodes sequentially so an individual failure does not abort the remaining batch.
  • Report imported, updated, skipped, and failed results, including actionable per-node failure details.
  • Keep failed rows selected for retry and immediately mark successful rows as imported.

Why

Roam could discover group-visible shared nodes, but discovery alone did not let a user pull selected Obsidian-origin nodes into the graph. The missing integration was the action that loads a selected node's full shared payload, passes it to the Roam materializer, and reports the outcome of a multi-node import.

Behavior

Selection

  • Obsidian-origin rows are selectable.
  • Roam-origin rows remain visible but are disabled because this ticket covers Obsidian-to-Roam import.
  • The header checkbox selects or deselects the currently visible Obsidian rows, respecting the search filter.
  • Reloading discovery clears stale selection and previous result state.

Import

  • Loads the selected concept plus its direct and full content from shared persistence.
  • Builds the canonical CrossAppNode consumed by materializeObsidianNode.
  • Creates a new Roam page for a source node that has not been imported.
  • Updates the existing Roam page found through stable source RID for a previously imported node.
  • Runs selected imports sequentially and records each result independently.
  • Prevents dialog close and discovery reload while Roam mutations are active.

Results

  • Shows imported, skipped, and failed counts.
  • Calls out how many successful imports updated existing pages.
  • Displays the source node title and actionable materializer message for each failure.
  • Marks successful rows as imported and leaves failed rows selected for retry.

Shared boundary

The database-to-CrossAppNode payload loader lives in packages/database because it is the natural cross-app boundary. The Blueprint UI, batch state, failure presentation, and ENG-1858 adapter remain Roam-specific. This PR does not refactor the existing Obsidian importer.

Stack

This PR is intentionally stacked on ENG-1858 v2 / #1224:

  • Base branch: eng-1858-materialize-obsidian-origin-markdown-into-roam-v2
  • Upstream materializer commit: b977291b
  • ENG-1859 implementation commit: 2cb31690
  • CI import-boundary fix: 2774f48d

The wider dependency chain also includes ENG-1855 discovery, ENG-2019 shared discovery extraction, and ENG-1856 stable source identity.

Validation

  • pnpm exec turbo check-types — 8/8 workspace tasks passed, including Obsidian
  • pnpm --filter @repo/database test:unit -- src/lib/__tests__/sharedNodes.test.ts — 1 file / 12 tests passed
  • pnpm --filter roam test — 14 files / 63 tests passed
  • pnpm --filter @repo/database check-types — passed
  • pnpm --filter roam check-types — passed
  • ESLint on every affected Roam and database file — passed
  • Prettier on every affected file — passed
  • pnpm --filter roam build — built with 0 errors
  • git diff --check — passed

The repository requests Node 22+, while the validation shell used Node 20.20.2. This produced an engine warning but no test, type-check, lint, formatting, or build failure.

Runtime demo

Loom: pending manual recording

A loadable integrated developer-extension bundle was prepared at:

/mnt/data/projects/dg-test-eng-1859

The recording plan exercises the real stacked UI flow with two selected Obsidian-origin nodes:

  1. Import one previously unseen node to prove fresh Roam page creation.
  2. Re-import one existing node after its upstream Markdown changes to prove stable-source-identity update without duplication.
  3. Confirm the dialog reports 2 imported, 0 skipped, 0 failed and identifies one updated node.
  4. Confirm both rows change to Imported.
  5. Confirm the existing page keeps its identity and receives the updated body.

Proof boundary

Automated tests cover canonical payload construction, created/updated result adaptation, sequential batching, result counts, continuing after individual failures, and actionable failure aggregation.

The pending Loom will be one manual runtime run of the real shared-persistence, Datalog, block-props, and Roam fromMarkdown path. It is not an automated runtime regression guard. Partial-failure continuation is unit-tested and will not be claimed as deliberately forced against live persistence unless the recording includes that scenario.

Out of scope

  • Manual refresh after import
  • Relations and assets
  • Advanced title collision UX

@linear-code

linear-code Bot commented Jul 12, 2026

Copy link
Copy Markdown

ENG-1859

@vercel

vercel Bot commented Jul 12, 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 Jul 12, 2026 8:47pm

Request Review

@supabase

supabase Bot commented Jul 12, 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 ↗︎.

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