Skip to content

docs: add Snippets feature guide (self-host)#840

Open
RiskeyL wants to merge 2 commits into
release/1.16.0from
docs/snippets-1.15.0
Open

docs: add Snippets feature guide (self-host)#840
RiskeyL wants to merge 2 commits into
release/1.16.0from
docs/snippets-1.15.0

Conversation

@RiskeyL

@RiskeyL RiskeyL commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What

Adds documentation for Snippets: reusable groups of workflow nodes you can save, share across a workspace, and insert into other workflows.

Covers:

  • Creating a snippet (from a workflow selection, from scratch, or from a DSL file)
  • Editing: which nodes aren't available, and how Input Variables replace the Start node
  • The draft-and-publish model and version history
  • Adding a snippet to a workflow (independent copy, wiring its input variables)
  • Role-based permissions

Scope

Self-host tree only, in English, Chinese, and Japanese. Community Edition ships first; the Cloud copy follows when Cloud reaches 1.16.

Behavior is verified against the merged feature in the dify codebase (the forbidden-node set, the runtime virtual-start-node injection, and the RBAC permission model), not carried over from earlier drafts.

Also included

A glossary fix: workspace role names are no longer localized. The member UI renders role.name raw and the localized name keys were removed, so the stale zh/ja role-name table becomes a note to use the English names in all languages. The guide's Permissions tables follow this.

RiskeyL added 2 commits July 3, 2026 16:35
Document the Snippets feature on the self-host tree in English, Chinese, and Japanese: creating snippets, the node and Input Variables differences from a standard workflow, the draft-and-publish model, adding a snippet to a workflow, and role-based permissions. Add the pages to docs.json.

Community Edition ships first; the Cloud copy follows when Cloud reaches 1.16.
Workspace role names are no longer localized: the member UI renders role.name directly from RBAC/backend data, and the localized name keys were removed. Replace the stale zh/ja translation table with a note to use the English role names in all languages.
Copilot AI review requested due to automatic review settings July 3, 2026 08:47
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. documentation Improvements or additions to documentation labels Jul 3, 2026

Copilot AI 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.

Pull request overview

Adds a new self-host user guide page documenting the Snippets feature (reusable node groups) and updates terminology guidance around workspace role names.

Changes:

  • Add a Snippets feature guide under self-host/use-dify/build/ (en/zh/ja).
  • Update writing-guides/glossary.md to reflect that workspace role names are no longer localized in the UI.
  • Add Snippets to navigation (docs.json).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
en/self-host/use-dify/build/snippet.mdx New English Snippets guide (create/edit/publish/insert/permissions).
zh/self-host/use-dify/build/snippet.mdx New Chinese Snippets page (manual translation) with frontmatter issues to address.
ja/self-host/use-dify/build/snippet.mdx New Japanese Snippets page (manual translation) with frontmatter issues to address.
writing-guides/glossary.md Workspace role localization guidance updated; requires regenerating derived termbase output.
docs.json Adds Snippets to nav; non-English nav entries should not be edited per repo guidelines.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +3
---
title: Snippets
---
Comment on lines +1 to +3
---
title: スニペット
---
Comment thread docs.json
Comment on lines +1603 to 1606
"zh/self-host/use-dify/build/snippet",
"zh/self-host/use-dify/build/shortcut-key",
"zh/self-host/use-dify/build/version-control",
"zh/self-host/use-dify/build/workflow-collaboration",
Comment thread docs.json
Comment on lines +2596 to 2599
"ja/self-host/use-dify/build/snippet",
"ja/self-host/use-dify/build/shortcut-key",
"ja/self-host/use-dify/build/version-control",
"ja/self-host/use-dify/build/workflow-collaboration",
Comment on lines +230 to +232
Role **names are not localized**. The member UI renders `role.name` raw from RBAC/backend data (`web/app/components/header/account-setting/members-page/member-row.tsx`); the `common.members.<role>` name keys were removed, leaving only the `common.members.<role>Tip` descriptions. Built-in roles display as English identifiers in every language, and custom RBAC roles show their own names. **In docs, use the English role names in all languages** (zh/ja included) to match the UI.

Built-in roles: Owner, Admin, Editor, Builder, Knowledge Admin (code: `datasetOperator`), Normal. The UI renders them lowercase (`owner`, `admin`, …); docs capitalize them for readability.
Comment on lines +1 to +5
---
title: Snippets
---

> 本文档由 AI 自动翻译。如有任何不准确之处,请参考 [英文原版](/en/self-host/use-dify/build/snippet)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants