Skip to content

Commit a3b2ef1

Browse files
trangdoan982devin-ai-integration[bot]graphite-app[bot]
authored
ENG-1412: Documentations for sync relations (#901)
* add doc * update * correct * Update apps/website/app/(docs)/docs/obsidian/pages/sync-and-import.md Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Update apps/website/app/(docs)/docs/obsidian/pages/sync-and-import.md Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * format * address PR comment --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
1 parent 8cc8dc6 commit a3b2ef1

1 file changed

Lines changed: 28 additions & 14 deletions

File tree

apps/website/app/(docs)/docs/obsidian/pages/sync-and-import.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The Sync and Import feature allows you to synchronize your discourse nodes with
1010
> **Note:** This feature is currently in **beta**. The sync functionality requires an active connection to the Discourse Graph database.
1111
1212
> **Warning:** When using sync and import:
13+
>
1314
> - Don't edit the things you imported
1415
> - Don't click to create new files (from imported nodes)
1516
> - Don't delete imported node types
@@ -65,18 +66,22 @@ Before publishing, make sure:
6566
2. **Open the command palette** by pressing `Cmd/Ctrl + P`
6667

6768
3. **Search for the publish command** by typing "Publish" and select **"Discourse Graph: Publish current node to lab space"**
68-
![Publish command in palette](/docs/obsidian/publish-command.png)
69+
![Publish command in palette](/docs/obsidian/publish-command.png)
6970

7071
4. The plugin will:
7172
- Publish the node to your group
73+
- **Automatically publish any relations** connected to this node where the other endpoint has already been published to the same group
7274
- Sync any embedded assets (images, attachments) to the shared storage
7375
- Update the node's frontmatter with a `publishedToGroups` field
7476

7577
5. A confirmation notice will appear: **"Published"**
76-
![Node published successfully](/docs/obsidian/publish-success.png)
78+
![Node published successfully](/docs/obsidian/publish-success.png)
79+
80+
**Note on publishing relations:** Relations between nodes are published **automatically** — you do not need to publish them separately. When you publish a node, the plugin checks all its relations and publishes any where:
81+
82+
- Both the source and destination nodes are published to the same group, **and**
83+
- The relation type is defined in your discourse relation settings
7784

78-
> **Tip:** If you see the message "Please sync the node first", wait a moment for the automatic sync to complete, or manually trigger a sync via the command palette using **"Discourse Graph: Sync discourse nodes to Supabase"**.
79-
![Sync command](/docs/obsidian/sync-command.png)
8085
---
8186

8287
## Importing discourse nodes from another space
@@ -95,12 +100,20 @@ Importing allows you to bring published discourse nodes from other group members
95100

96101
![Selecting nodes to import](/docs/obsidian/import-modal.png)
97102

98-
4. The plugin will import each selected node and display a progress bar. Once complete, a confirmation notice will appear showing how many nodes were imported successfully.
103+
4. Before importing, the modal shows an **import preview** summarizing everything that will be created:
104+
- Number of nodes and relations to be imported
105+
- Any new node types that will be added to your vault
106+
- Any new relation types that will be added
107+
- Any new discourse relation triplets (source → relation → destination) that will be established
108+
109+
5. The plugin will import each selected node **and their associated relations**, then display a progress bar. Once complete, you will see a confirmation notice.
99110

100111
Imported nodes are saved in an `import/{spaceName}/` folder in your vault, preserving the original space organization.
101112

102113
![Import location](/docs/obsidian/import-location.png)
103114

115+
> **Note:** Relations are only imported when **both** the source and destination nodes are present in your local vault (either as previously imported nodes or nodes you already have locally). Relations whose endpoints are missing will be skipped.
116+
104117
---
105118

106119
## Refreshing imported nodes
@@ -116,21 +129,22 @@ After importing, you can fetch the latest content from the original sources to k
116129
Alternatively, you can click the "Refresh" button in the Discourse Context panel.
117130

118131
![Refresh button](/docs/obsidian/refresh-button.png)
119-
---
120132

121133
## Summary of commands
122134

123-
- **Sync discourse nodes to Supabase**: Manually sync all discourse nodes to the database
124-
- **Publish current node to lab space**: Publish the active discourse node to your group
125-
- **Import nodes from another space**: Open the import modal to browse and import shared nodes
126-
- **Fetch latest content from imported nodes**: Refresh all imported nodes with the latest content
127-
135+
- **Sync discourse nodes to Supabase**: Manually sync all discourse nodes to the database
136+
- **Publish current node to lab space**: Publish the active discourse node to your group, including any relations whose other endpoint is already published to the same group
137+
- **Import nodes from another space**: Open the import modal to browse and import shared nodes along with their relations
138+
- **Fetch latest content from imported nodes**: Refresh all imported nodes with the latest content
128139

129140
## Troubleshooting
130141

131142
- **"Sync mode is not enabled"** — You need to enable sync mode in the admin panel first (see [Enabling sync mode](#enabling-sync-mode) above)
132-
- **"Please sync the node first"** — The node hasn't been synced yet. Wait for automatic sync or trigger a manual sync
143+
- **"Please sync the node first"** — The node hasn't been synced yet. Wait for automatic sync or trigger a manual sync via the command palette using **"Discourse Graph: Sync discourse nodes to Supabase"**.
144+
145+
![Sync command](/docs/obsidian/sync-command.png)
146+
133147
- **"You are not a member of any groups"** — You need to be added to a group before you can import nodes. Contact your team administrator
134148
- **No importable nodes found** — Either no nodes have been published to your groups, or you have already imported all available nodes
135-
- If you want to see more information about imported nodes, you can unhide frontmatter information in the setting panel
136-
![Show frontmatter](/docs/obsidian/show-frontmatter.png)
149+
- The frontmatter fields related to sync are normally hidden. You can choose to display them in the setting panel
150+
![Show frontmatter](/docs/obsidian/show-frontmatter.png)

0 commit comments

Comments
 (0)