Skip to content

FEE-840 Add Obsidian schema export/import flow#1156

Closed
trangdoan982 wants to merge 5 commits into
mainfrom
fee-840-enable-export-import-of-a-zip-file-of-dg-specs-for-obsidian
Closed

FEE-840 Add Obsidian schema export/import flow#1156
trangdoan982 wants to merge 5 commits into
mainfrom
fee-840-enable-export-import-of-a-zip-file-of-dg-specs-for-obsidian

Conversation

@trangdoan982

@trangdoan982 trangdoan982 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

  • add schema archive/export/import utilities for Obsidian using dg-schema-{vaultname}.json, including native save/open dialog flows with a download fallback
  • add new Export discourse graph schema and Import discourse graph schema commands plus settings entry points
  • implement a shared schema selection panel for export/import, and wire import apply with ID/name matching and provisional relation type/triple creation

Test plan

  • pnpm --filter @discourse-graphs/obsidian check-types
  • pnpm --filter @discourse-graphs/obsidian exec eslint src/components/SchemaSelectionPanel.tsx src/components/ExportSpecsModal.tsx src/components/ImportSpecsModal.tsx src/utils/specArchive.ts src/utils/specExport.ts src/utils/specImport.ts src/utils/registerCommands.ts src/components/GeneralSettings.tsx
  • Manual: open Export schema modal from command palette and settings
  • Manual: export selected schema to a custom filesystem location via native save picker
  • Manual: open Import schema modal, pick exported file, verify dependency-aware selection behavior
  • Manual: import selected items and confirm ID/name matching, provisional relation schemas, template creation/reuse, and persisted settings updates

Made with Cursor


Open in Devin Review

Add a shared schema selection UI for export and import, support native save/open dialog flows, and implement import apply logic with ID/name matching plus provisional relation schema creation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 24, 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 Jun 24, 2026 10:15pm

Request Review

@linear-code

linear-code Bot commented Jun 24, 2026

Copy link
Copy Markdown

FEE-840

@supabase

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

@graphite-app

graphite-app Bot commented Jun 24, 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

Comment thread apps/obsidian/src/utils/specImport.ts Outdated

@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 found 2 potential issues.

Open in Devin Review

Comment thread apps/obsidian/src/utils/specImport.ts Outdated
Comment thread apps/obsidian/src/utils/specImport.ts Outdated
Consolidate export/import selection flows behind shared modal and state primitives, move schema transfer types into core Obsidian types, and rename spec archive validation utilities to clearer spec validation naming.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract shared JSON open/save dialog helpers and replace archive terminology with loaded schema file and preview stats in the import flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reduce file dialog and import logic to Electron-only flows, compute match plans once at preview, and use skip-or-create apply behavior while trusting the shared selection UI for dependency closure.

Co-authored-by: Cursor <cursoragent@cursor.com>
…om domain types.

Remove redundant SchemaNodeTypeLike/SchemaRelationTypeLike/SchemaRelationTripleLike
and SchemaSelectionInitialValues by expressing them as Pick<> expressions over the
existing DiscourseNode/DiscourseRelationType/DiscourseRelation types. Fold initial
selection into the hook with an optional initialTemplateNames override, and fix the
useEffect reset to depend only on resetKey rather than on a new-each-render object.

Co-authored-by: Cursor <cursoragent@cursor.com>
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