ENG-1977 Add schema import data layer for Obsidian - #1264
Open
trangdoan982 wants to merge 2 commits into
Open
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This was referenced Jul 29, 2026
trangdoan982
force-pushed
the
eng-1976-add-schema-export-command-to-obsidian
branch
from
July 29, 2026 02:58
3af9adf to
f364d5a
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 29, 2026 02:59
23c69c1 to
d417d43
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 29, 2026 19:45
d417d43 to
bc0e07d
Compare
trangdoan982
force-pushed
the
eng-1976-add-schema-export-command-to-obsidian
branch
from
July 29, 2026 19:45
f364d5a to
09bb0e7
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 30, 2026 02:17
bc0e07d to
34254ad
Compare
… set, not schema intersection
trangdoan982
force-pushed
the
eng-1976-add-schema-export-command-to-obsidian
branch
from
July 30, 2026 03:18
5119839 to
cfff9bf
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 30, 2026 03:18
34254ad to
9073b20
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the import data layer — file parsing, match planning, and apply logic. The UI modal is in the next PR.
specImport.ts— three responsibilities co-located:parseDgSchemaFile— lightweight version guard + cast (no Zod; export is the authoritative source)buildSchemaImportMatchPlan— computes id and name/label mappings between the schema file and the local vault in one pass; id match first, name/label fallback secondapplySchemaImportSelection— creates new items asprovisional, skips existing matches; preserves template reference when template already exists locallyStack
PR 4 of 5 for FEE-840. Stacks on #1263.
Test plan
pnpm --filter @discourse-graphs/obsidian check-typespassesparseDgSchemaFilerejects files with wrong version with a clear errorbuildSchemaImportMatchPlanid-matches first, name/label fallback secondapplySchemaImportSelectioncreates new items asprovisional, skips duplicates