Skip to content

ENG-2083 Add schema selection panel UI for Obsidian export/import - #1262

Merged
trangdoan982 merged 15 commits into
mainfrom
eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport
Aug 25, 2026
Merged

ENG-2083 Add schema selection panel UI for Obsidian export/import#1262
trangdoan982 merged 15 commits into
mainfrom
eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport

Conversation

@trangdoan982

@trangdoan982 trangdoan982 commented Jul 29, 2026

Copy link
Copy Markdown
Member

https://www.loom.com/share/fe0b8ebcf08e48229a4afdb7a6cc5e43

Summary

Adds the reusable schema selection panel used by both the export and import modals.

  • SchemaSelectionModalBody.tsx — modal layout with a header slot, scrollable content area, and footer action buttons; consumed by both ExportSpecsModal and ImportSpecsModal
  • SchemaSelectionPanel.tsx — four-section checklist (node types, relation types, relation triples, templates) driven by useSchemaSelection; shows locked/required badges when an item is forced by a selected triple

Stack

PR 2 of 5 for FEE-840. Stacks on #1180.

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

Test plan

  • pnpm --filter @discourse-graphs/obsidian check-types passes
  • All four categories render with checkboxes

Open in Devin Review

trangdoan982 and others added 2 commits June 30, 2026 18:26
…export/import.

Adds DiscourseSchemaFile and DiscourseSchemaTemplate type definitions, plus
getDgSchemaFileName and DG_SCHEMA_EXPORT_VERSION — the minimal shared primitives
needed by both the schema export (ENG-1976) and import (ENG-1977) features.

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

linear-code Bot commented Jul 29, 2026

Copy link
Copy Markdown

ENG-2083

@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 Aug 22, 2026 4:59am

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-2083-add-schema-selection-panel-ui-for-obsidian-exportimport branch from 1e624f3 to f8e4b8d Compare July 29, 2026 02:53
@trangdoan982
trangdoan982 force-pushed the eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport branch from f8e4b8d to e9132f3 Compare July 29, 2026 02:58
trangdoan982 and others added 2 commits July 29, 2026 15:31
… types

- Delete ReactRootModal.tsx (no callers yet; DRY savings too small to justify the abstraction layer)
- Annotate each sub-schema with z.ZodType<T> so TypeScript verifies schema coverage against the authoritative types in types.ts at compile time
- Drop the `as DiscourseSchemaFile` cast from parseDgSchemaFile — no longer needed once dgSchemaFileSchema is typed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@trangdoan982
trangdoan982 force-pushed the eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport branch from e9132f3 to 6eefcca Compare July 29, 2026 19:45
@graphite-app

graphite-app Bot commented Jul 29, 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/components/SchemaSelectionPanel.tsx Outdated
…port)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@trangdoan982
trangdoan982 force-pushed the eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport branch from bc97511 to 55f5f58 Compare July 30, 2026 16:54
trangdoan982 and others added 2 commits July 30, 2026 14:05
vaultName is not unique — two vaults can share a name — so it cannot
identify the source space. Recording vaultId (the Obsidian appId) lets an
importer rebuild the source RID as orn:obsidian.schema:<appId>/<localId>,
which is what the existing Supabase import path already generates. Schema
imported from a file and content imported from that same vault over
Supabase then resolve to the same importedFromRid.

Required rather than optional: the export command that produces these
files has not shipped, so no version 1 files exist to stay compatible
with.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
trangdoan982 and others added 4 commits July 30, 2026 14:06
…emplateToNodeTypeNames double-pass

- Remove `emptyTemplateText` prop from SchemaSelectionPanel and SchemaSelectionModalBody; hardcode "No template files found."
- Remove `beforePanel` and `afterPanel` props from SchemaSelectionModalBody (afterPanel had no callers; beforePanel is now composed as a sibling at the call site)
- Collapse templateToNodeTypeNames two-pass sort into a single sorted source array + single map-build pass

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@trangdoan982
trangdoan982 force-pushed the eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport branch from 55f5f58 to 07ccd44 Compare July 30, 2026 18:12
@trangdoan982
trangdoan982 requested a review from mdroidian August 5, 2026 04:23
Comment thread apps/obsidian/src/components/SchemaSelectionModalBody.tsx
Comment thread apps/obsidian/src/components/SchemaSelectionPanel.tsx
Comment thread apps/obsidian/src/components/SchemaSelectionPanel.tsx Outdated
…dencyViolation prop

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread apps/obsidian/src/components/SchemaSelectionPanel.tsx Outdated
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@trangdoan982
trangdoan982 changed the base branch from eng-1975-schema-foundation to main August 25, 2026 22:28
@trangdoan982
trangdoan982 merged commit 313f1ac into main Aug 25, 2026
9 checks passed
@trangdoan982
trangdoan982 deleted the eng-2083-add-schema-selection-panel-ui-for-obsidian-exportimport branch August 25, 2026 22:29
trangdoan982 added a commit that referenced this pull request Aug 25, 2026
Resolve conflicts with ENG-2083 (#1262), which landed the shared schema
selection panel on main. Main's SchemaSelectionPanel/ModalBody inline the
same Notice this branch routed through onDependencyViolation and adds node
type sorting, so take main's version and drop the now-redundant prop from
ExportSpecsModal. GeneralSettings and registerCommands conflicts were
additive (export modal vs. help menu / feedback command) — keep both.

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.

2 participants