ENG-1976 Add schema export command to Obsidian - #1263
Open
trangdoan982 wants to merge 9 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.
|
This was referenced Jul 29, 2026
trangdoan982
force-pushed
the
eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport
branch
2 times, most recently
from
July 29, 2026 02:58
f8e4b8d to
e9132f3
Compare
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-2083-add-schema-selection-panel-ui-for-obsidian-exportimport
branch
from
July 29, 2026 19:45
e9132f3 to
6eefcca
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-1976-add-schema-export-command-to-obsidian
branch
from
July 30, 2026 03:18
5119839 to
cfff9bf
Compare
trangdoan982
force-pushed
the
eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport
branch
from
July 30, 2026 16:54
bc97511 to
55f5f58
Compare
trangdoan982
changed the base branch from
eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport
to
main
July 30, 2026 16:56
Contributor
PR size/scope checkThis PR is over our review-size guideline.
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:
|
trangdoan982
changed the base branch from
main
to
eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport
July 30, 2026 16:56
trangdoan982
force-pushed
the
eng-1976-add-schema-export-command-to-obsidian
branch
from
July 30, 2026 17:01
cfff9bf to
3820532
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…csModal constructor, fix type guard, batch warnings - specExport.ts: drop SpecExportSelection, import SchemaSelection from ~/types; add type guard on selectedRelationTypes - ExportSpecsModal.tsx: constructor takes only plugin (extracts app internally); remove plugin.app from useMemo deps; pass payload directly to exportSchemaSelection; batch warnings into one Notice - registerCommands.ts: simplify callback to single expression - GeneralSettings.tsx: remove redundant void cast Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rectly Replace asMap + map + filter with Set membership filter over settings arrays. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ifetime Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ortSchemaSelection Removes SpecExportResult and buildSchemaExportPayload; exportSchemaSelection now returns Promise<string> and surfaces warnings via onWarning callback, eliminating the three-hop pass-through. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The field is part of the schema file contract defined in ENG-1975; this fills it from the vault's appId so importers can rebuild the source RID. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5 tasks
trangdoan982
force-pushed
the
eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport
branch
from
July 30, 2026 18:12
55f5f58 to
07ccd44
Compare
trangdoan982
force-pushed
the
eng-1976-add-schema-export-command-to-obsidian
branch
from
July 30, 2026 18:12
31a387c to
83e0548
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.
https://www.loom.com/share/38ffe52d5c5e410282e962079103513d
https://www.loom.com/share/45b49cc16d7b498482643edcc68e4a4c
Summary
Adds the schema export command and settings entry point.
specExport.ts— serializes the vault's selected node types, relation types, relation triples, and templates into theDiscourseSchemaFileJSON formatExportSpecsModal.tsx— modal that rendersSchemaSelectionModalBody+SchemaSelectionPanel; user selects items to export then saves to a filesystem location via the native save dialogGeneralSettings.tsx— adds "Export discourse graph schema" entry to the settings UIregisterCommands.ts— registersexport-dg-schemacommand in the command palettePopulating
vaultIdspecExport.tsfillsvaultIdfrom the vault's ObsidianappIdviagetVaultId(plugin.app).The field itself — the type and the Zod validation — is defined in #1180, since it is part of the schema file contract. This PR only populates it. The reason it exists:
vaultNameis not unique across vaults, so it cannot identify a source space;vaultIdlets the importer in #1264 rebuild the source RID asorn:obsidian.schema:<appId>/<localId>, matching what the existing Supabase import path generates.Stack
PR 3 of 5 for FEE-840. Stacks on #1262.
Test plan
pnpm --filter @discourse-graphs/obsidian check-typespassesdg-schema-<vault>.jsonto the chosen filesystem locationvaultIdmatching the vault'sappIdvaultNameproduce differentvaultIdvalues