ENG-2084 Add schema import UI for Obsidian - #1265
Open
trangdoan982 wants to merge 14 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
This was referenced Jul 29, 2026
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-2084-add-schema-import-ui-for-obsidian
branch
from
July 29, 2026 02:59
11d1480 to
5f5edc0
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-2084-add-schema-import-ui-for-obsidian
branch
from
July 29, 2026 19:45
5f5edc0 to
ce3af53
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
July 30, 2026 02:17
2db3e8e to
1fc3e89
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 30, 2026 02:17
bc0e07d to
34254ad
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 30, 2026 03:18
34254ad to
9073b20
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
July 30, 2026 03:18
1fc3e89 to
c731999
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 30, 2026 17:01
9073b20 to
26d1ad2
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
July 30, 2026 17:01
c731999 to
f8c8b70
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
July 30, 2026 17:06
f8c8b70 to
20506b2
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 30, 2026 17:06
26d1ad2 to
6b684dc
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
July 30, 2026 17:18
20506b2 to
ab0552c
Compare
trangdoan982
force-pushed
the
eng-1977-add-schema-import-command-to-obsidian
branch
from
July 30, 2026 17:55
b0abbd4 to
2a39a08
Compare
6 tasks
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
July 30, 2026 18:37
6de77ff to
69deb70
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
August 6, 2026 02:48
b75cbd1 to
473201c
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
August 6, 2026 03:08
473201c to
aef517e
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
August 6, 2026 03:13
aef517e to
f0dc76d
Compare
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
August 6, 2026 03:47
f0dc76d to
8197207
Compare
…otModal abstraction)
…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>
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>
Holds which values the user chose to take from the imported file for items that already exist in the vault. Nothing is selected initially, so an untouched item keeps every local value — the state the apply path already treats an absent entry as. Kept out of useSchemaSelection deliberately. The two have different lifecycles: a choice only means anything for an item that is still selected, so this resets whenever the set of selected overlapping items changes, while the selection itself persists. It is also import-only — the export flow has nothing to choose between. Keyed by schema-file id rather than local id, matching the diff: the match plan collapses schema types that collide by normalized name, so two schema ids can share one local id. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
One table per overlapping item: a row per differing field, with the local value and the imported value side by side and a radio pair to pick between them. The chosen cell is highlighted, so the default reads as "keeping mine" rather than as an undecided checkbox. Per-item header buttons apply a whole side at once. They are buttons with a pressed state rather than a third radio pair, so a bulk action does not look like another per-field choice, and they fall out of the pressed state as soon as one field differs. Grouped by category, since that is the one axis on which every item has exactly one home — a template can be referenced by several node types, so nesting items under node types would either duplicate a row or pick an arbitrary owner. Values wrap rather than truncate. Colors render as swatches, covering both node types' hex and relation types' tldraw names. Templates show their size and the name the copy will land under, taken from the same helper the apply path uses so the two cannot drift. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two optional props so the import flow can mark, during selection, which items the vault already has and how many of their fields differ. The export flow has nothing to compare against and passes neither, so both default to undefined and its rendering is unchanged. useSchemaSelection and SchemaSelectionModalBody are deliberately untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds a step between selection and apply, entered only when selected items actually overlap with the vault; with nothing overlapping the import applies straight from selection as before. The resulting merge plan is passed to applySchemaImportSelection, which has accepted one since the data layer landed but never received one. The preview step now renders SchemaSelectionPanel directly rather than through SchemaSelectionModalBody. The shared body is fixed at a two-button footer and cannot forward the new note props, and the import flow now needs footer labels that vary by step. Overlaps are computed for the whole file, so they are filtered to the current selection before being offered — and the completion notice reports merged counts alongside created ones. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
trangdoan982
force-pushed
the
eng-2084-add-schema-import-ui-for-obsidian
branch
from
August 24, 2026 20:21
8197207 to
33cb043
Compare
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:
|
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/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 importImportSpecsModal.tsx— two-screen modal: file picker screen → preview + selection screen (reusesSchemaSelectionModalBody+SchemaSelectionPanelfrom ENG-2083); delegates apply logic toapplySchemaImportSelectionfrom ENG-1977GeneralSettings.tsx— adds "Import discourse graph schema" entry to the settings UIregisterCommands.ts— registersimport-dg-schemacommand in the command paletteStack
PR 5 of 5 for FEE-840. Stacks on #1264.
Test plan
pnpm --filter @discourse-graphs/obsidian check-typespassesprovisional