Skip to content

ENG-2084 Add schema import UI for Obsidian - #1265

Open
trangdoan982 wants to merge 10 commits into
eng-1977-add-schema-import-command-to-obsidianfrom
eng-2084-add-schema-import-ui-for-obsidian
Open

ENG-2084 Add schema import UI for Obsidian#1265
trangdoan982 wants to merge 10 commits into
eng-1977-add-schema-import-command-to-obsidianfrom
eng-2084-add-schema-import-ui-for-obsidian

Conversation

@trangdoan982

@trangdoan982 trangdoan982 commented Jul 29, 2026

Copy link
Copy Markdown
Member

https://www.loom.com/share/477c5ed1d52442139ea4f6c99af47936

Summary

Adds the import modal UI and wires it into the command palette and settings.

  • ImportSchemaPreviewSummary.tsx — per-category new/existing counts shown before the user applies the import
  • ImportSpecsModal.tsx — two-screen modal: file picker screen → preview + selection screen (reuses SchemaSelectionModalBody + SchemaSelectionPanel from ENG-2083); delegates apply logic to applySchemaImportSelection from ENG-1977
  • GeneralSettings.tsx — adds "Import discourse graph schema" entry to the settings UI
  • registerCommands.ts — registers import-dg-schema command in the command palette

Stack

PR 5 of 5 for FEE-840. Stacks on #1264.

  1. Shared foundation — ENG-1975 (ENG-1975 Define schema file contract and shared foundation for Obsidian export/import #1180)
  2. Schema selection panel UI — ENG-2083 (ENG-2083 Add schema selection panel UI for Obsidian export/import #1262)
  3. Schema export command — ENG-1976 (ENG-1976 Add schema export command to Obsidian #1263)
  4. Schema import data layer — ENG-1977 (ENG-1977 Add schema import data layer for Obsidian #1264)
  5. This PR — schema import UI (ENG-2084)

Test plan

  • pnpm --filter @discourse-graphs/obsidian check-types passes
  • Command palette: Import discourse graph schema opens the import modal
  • Settings entry opens the import modal
  • Picking a non-schema JSON or wrong-version file shows a clear error notice
  • Preview summary shows correct new/existing counts per category
  • Selection panel enforces dependency constraints
  • Import applies correctly and creates new items as provisional
  • Re-importing the same file creates no duplicates

Open in Devin Review

@linear-code

linear-code Bot commented Jul 29, 2026

Copy link
Copy Markdown

ENG-2084

@vercel

vercel Bot commented Jul 29, 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 Jul 30, 2026 8:27pm

Request Review

@supabase

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

@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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@trangdoan982
trangdoan982 force-pushed the eng-1977-add-schema-import-command-to-obsidian branch from 23c69c1 to d417d43 Compare July 29, 2026 02:59
@trangdoan982
trangdoan982 force-pushed the eng-2084-add-schema-import-ui-for-obsidian branch from 11d1480 to 5f5edc0 Compare July 29, 2026 02:59
@trangdoan982
trangdoan982 force-pushed the eng-1977-add-schema-import-command-to-obsidian branch from d417d43 to bc0e07d Compare July 29, 2026 19:45
@trangdoan982
trangdoan982 force-pushed the eng-2084-add-schema-import-ui-for-obsidian branch from 5f5edc0 to ce3af53 Compare July 29, 2026 19:45
@trangdoan982
trangdoan982 force-pushed the eng-2084-add-schema-import-ui-for-obsidian branch from 2db3e8e to 1fc3e89 Compare July 30, 2026 02:17
@trangdoan982
trangdoan982 force-pushed the eng-1977-add-schema-import-command-to-obsidian branch from bc0e07d to 34254ad Compare July 30, 2026 02:17
Comment thread apps/obsidian/src/components/ImportSpecsModal.tsx
@trangdoan982
trangdoan982 force-pushed the eng-1977-add-schema-import-command-to-obsidian branch from 34254ad to 9073b20 Compare July 30, 2026 03:18
@trangdoan982
trangdoan982 force-pushed the eng-2084-add-schema-import-ui-for-obsidian branch from 1fc3e89 to c731999 Compare July 30, 2026 03:18
@trangdoan982
trangdoan982 force-pushed the eng-1977-add-schema-import-command-to-obsidian branch from 9073b20 to 26d1ad2 Compare July 30, 2026 17:01
@trangdoan982
trangdoan982 force-pushed the eng-2084-add-schema-import-ui-for-obsidian branch from c731999 to f8c8b70 Compare July 30, 2026 17:01
@trangdoan982
trangdoan982 force-pushed the eng-2084-add-schema-import-ui-for-obsidian branch from f8c8b70 to 20506b2 Compare July 30, 2026 17:06
@trangdoan982
trangdoan982 force-pushed the eng-1977-add-schema-import-command-to-obsidian branch from 26d1ad2 to 6b684dc Compare July 30, 2026 17:06
@trangdoan982
trangdoan982 force-pushed the eng-2084-add-schema-import-ui-for-obsidian branch from 20506b2 to ab0552c Compare July 30, 2026 17:18
@trangdoan982
trangdoan982 force-pushed the eng-1977-add-schema-import-command-to-obsidian branch from b0abbd4 to 2a39a08 Compare July 30, 2026 17:55
trangdoan982 and others added 8 commits July 30, 2026 14:37
…hemaPreviewSummary as sibling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…chemaSelection directly, batch warnings

- Constructor takes only plugin (extracts app internally), matching ExportSpecsModal pattern
- Pass payload directly to applySchemaImportSelection (no intermediate field mapping)
- Batch import warnings into one Notice

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nent lifetime

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@trangdoan982
trangdoan982 force-pushed the eng-2084-add-schema-import-ui-for-obsidian branch from 6de77ff to 69deb70 Compare July 30, 2026 18:37
Import stays reachable through the import-dg-schema command in the palette;
the settings entry duplicated it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The success path calls onClose() and unmounts, so the finally block was
setting state on an unmounted component. Harmless — React removed that
warning in 18.0 and it is a silent no-op — but the ordering read as if the
reset mattered after close. Only the catch stays mounted, so only it resets.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.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