Skip to content

ENG-1611 Add provisional status to imported relation schemas#948

Open
trangdoan982 wants to merge 4 commits intomainfrom
eng-1611-add-provisional-property-to-imported-relation-schemas
Open

ENG-1611 Add provisional status to imported relation schemas#948
trangdoan982 wants to merge 4 commits intomainfrom
eng-1611-add-provisional-property-to-imported-relation-schemas

Conversation

@trangdoan982
Copy link
Copy Markdown
Member

@trangdoan982 trangdoan982 commented Apr 8, 2026

https://www.loom.com/share/8d9ac02487f74b54ac4a06893ca61ab5

Summary

  • Newly imported relation types and triplets are marked provisional and hidden from all creation UIs until the user explicitly accepts them
  • Adds ImportStatus type and status? field to DiscourseRelationType and DiscourseRelation; backward-compatible (imported schemas with no status field are treated as provisional)
  • Settings UI shows a Provisional badge with Accept + Delete buttons for unreviewed imported schemas; accepting a triplet cascades to also accept its relation type
  • Guards publishNewRelation and the Supabase sync from sending provisional schemas

Test plan

  • Import nodes from a remote space → relation types and triplets appear in Settings with "Provisional" badge and no Accept button shown yet for accepted ones
  • Provisional types/triplets absent from canvas relation tool, RelationshipSection, and RelationPanel dropdowns
  • Accept a triplet → triplet and its relation type both flip to accepted; both now appear in creation panels
  • Accept a relation type directly → type accepted, triplets remain provisional
  • Delete an imported provisional type/triplet → removed correctly
  • Sync to Supabase → provisional schemas not included in upsert_concepts payload
  • publishNewRelation returns false for provisional triple/type/instance
  • Existing imported schemas without a status field treated as provisional (not accepted)

🤖 Generated with Claude Code


Open with Devin

Mark newly imported relation types and triplets as provisional so they
don't appear in creation UIs until explicitly accepted by the user.

- Add ImportStatus type and status? field to DiscourseRelationType and DiscourseRelation
- Add isAcceptedSchema / isProvisionalSchema helpers (imported + no status = provisional)
- Set status: "provisional" on all newly imported relation types and triplets
- Fix provisional: true on imported relation instances (was incorrectly false)
- Settings UI: show Provisional badge + Accept/Delete buttons for provisional imported schemas
- Accepting a triplet cascades to also accept its relation type
- Filter provisional schemas from all creation panels (canvas tool, RelationshipSection, RelationPanel)
- Guard publishNewRelation and sync against provisional schemas
- Prevent status from leaking into literal_content.source_data in conceptConversion

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear bot commented Apr 8, 2026

@supabase
Copy link
Copy Markdown

supabase bot commented Apr 8, 2026

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 ↗︎.

trangdoan982 and others added 2 commits April 8, 2026 19:12
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

- tentative: false = unreviewed (not tentative: true); fix importRelations,
  publishNode guard, and syncDgNodesToSupabase filter accordingly
- Add isAcceptedSchema to compatible node types useEffect in RelationshipSection

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

Comment thread apps/obsidian/src/utils/publishNode.ts
@trangdoan982 trangdoan982 requested a review from mdroidian April 13, 2026 15:55
Copy link
Copy Markdown
Member

@mdroidian mdroidian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you delete a schema and then re-import or sync? Does it re-import the deleted schema? If so, this would be a confusing UX.

Copy link
Copy Markdown
Member Author

yes it will. but I think we haven't decided on what the mechanism for deleting an imported schema and reimporting them is. Team decided to table this decision is the last I've got.

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