dify - ✅(Solved) Fix Support editable question classifier labels after the Graphon runtime split [2 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fixed

PR fix notes

PR #35430: feat: support editable class labels in question classifier

Description (problem / solution / changelog)

[!IMPORTANT]

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fixes #35429

Refs langgenius/dify#33806
Supersedes langgenius/dify#34075
Companion Graphon branch: langgenius/graphon:blackoutta/question-classifier-labels-graphon
Companion Graphon PR URL: https://github.com/langgenius/graphon/pull/new/blackoutta/question-classifier-labels-graphon

This recreates the Dify-side portion of editable Question Classifier labels after the workflow runtime moved into graphon.

The UI now treats Question Classifier branch data as three separate concepts:

  • id: stable branch identifier for routing/handles
  • name: classifier-facing category description used for prompt logic and preserved as class_name
  • label: user-facing branch title shown in the editor, canvas, and preview

Included changes:

  • adds inline editing for Question Classifier branch labels
  • preserves existing class_name semantics for downstream descriptive output
  • exposes class_label in Question Classifier output configuration
  • updates node and preview rendering to display label with sensible CLASS N fallbacks
  • adds frontend tests covering editing, rendering, and output behavior
  • includes panel-specific regression fixes required by the Question Classifier editing flow

This branch was validated locally against an editable Graphon checkout wired through uv.

From Codex

Screenshots

BeforeAfter
Branch titles were fixed to CLASS N in the UI.Branch titles can be edited independently from the classifier description text.
<img width="1497" height="831" alt="568930390-9e754181-e731-4700-aca8-c5399a02b7e7" src="https://github.com/user-attachments/assets/280609d9-31f8-4a4b-8cd0-5bb50c3ae2eb" />

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

Changed files

  • eslint-suppressions.json (modified, +1/-32)
  • web/app/components/base/prompt-editor/__tests__/index.spec.tsx (modified, +8/-0)
  • web/app/components/base/prompt-editor/index.tsx (modified, +10/-6)
  • web/app/components/workflow/constants.ts (modified, +4/-0)
  • web/app/components/workflow/nodes/question-classifier/__tests__/integration.spec.tsx (modified, +6/-0)
  • web/app/components/workflow/nodes/question-classifier/__tests__/node.spec.tsx (modified, +12/-11)
  • web/app/components/workflow/nodes/question-classifier/__tests__/panel.spec.tsx (modified, +1/-0)
  • web/app/components/workflow/nodes/question-classifier/components/__tests__/class-item.spec.tsx (modified, +28/-8)
  • web/app/components/workflow/nodes/question-classifier/components/class-item.tsx (modified, +93/-6)
  • web/app/components/workflow/nodes/question-classifier/components/class-label-utils.ts (added, +66/-0)
  • web/app/components/workflow/nodes/question-classifier/components/class-list.tsx (modified, +47/-23)
  • web/app/components/workflow/nodes/question-classifier/default.ts (modified, +4/-1)
  • web/app/components/workflow/nodes/question-classifier/node.tsx (modified, +12/-11)
  • web/app/components/workflow/nodes/question-classifier/panel.tsx (modified, +5/-0)
  • web/app/components/workflow/nodes/question-classifier/types.ts (modified, +1/-0)
  • web/app/components/workflow/nodes/question-classifier/use-config.ts (modified, +69/-23)
  • web/app/components/workflow/workflow-preview/components/nodes/question-classifier/__tests__/node.spec.tsx (modified, +3/-2)
  • web/app/components/workflow/workflow-preview/components/nodes/question-classifier/node.tsx (modified, +2/-3)
  • web/i18n/en-US/workflow.json (modified, +4/-0)
  • web/i18n/ja-JP/workflow.json (modified, +4/-0)
  • web/i18n/zh-Hans/workflow.json (modified, +4/-0)
  • web/i18n/zh-Hant/workflow.json (modified, +4/-0)

PR #62: feat: question classifier labels graphon

Description (problem / solution / changelog)

Important

  1. Make sure you have read our contribution guidelines
  2. Search existing issues and pull requests to confirm this change is not a duplicate
  3. Open or identify the issue this pull request resolves or advances
  4. Use a Conventional Commits title for this pull request, and mark breaking changes with !
  5. Remember that the pull request title will become the squash merge commit message
  6. If CLA Assistant prompts you, sign CLA.md in the pull request conversation

Related Issue

Closes #63

Refs langgenius/dify#33806
Refs langgenius/dify#35429
Supersedes runtime portion of langgenius/dify#34075
Companion issue: langgenius/dify#35429
Companion PR: langgenius/dify#35430

Summary

<img width="1497" height="831" alt="568930390-9e754181-e731-4700-aca8-c5399a02b7e7" src="https://github.com/user-attachments/assets/47112ceb-de96-48c5-a353-e42b4b861294" />

This adds runtime support for editable Question Classifier labels after the workflow engine moved from Dify into Graphon.

The change makes the field semantics explicit:

  • id: stable branch identifier used for routing and handles
  • name: classifier-facing category description used in prompt construction and returned as class_name
  • label: user-facing branch title returned as class_label

Included changes:

  • adds optional label to ClassConfig
  • documents the distinction between id, name, and label
  • emits class_label from the Question Classifier node result
  • falls back to canonical CLASS N labels when none is provided
  • adds runtime tests covering custom labels and fallback behavior

Checklist

  • This pull request links the issue it resolves or advances
  • This pull request title follows Conventional Commits, and any breaking change is marked with !
  • If CLA Assistant prompted me, I signed CLA.md in the pull request conversation

Changed files

  • src/graphon/nodes/question_classifier/entities.py (modified, +17/-2)
  • src/graphon/nodes/question_classifier/question_classifier_node.py (modified, +26/-6)
  • tests/nodes/question_classifier/__init__.py (added, +0/-0)
  • tests/nodes/question_classifier/test_question_classifier_node.py (added, +225/-0)
RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I previously implemented editable Question Classifier branch labels in langgenius/dify#34075 to address langgenius/dify#33806. Since then, the workflow runtime has been split out of dify into the standalone graphon repository, so the original single-repo change can no longer be merged as-is.

The remaining Dify-side need is still valid: users should be able to assign a short, user-facing label to each Question Classifier branch, separate from the existing classifier-facing name text. The name field is effectively the category description used for prompt construction and downstream class_name, while the new label is the concise display title shown in the workflow editor and preview.

Without recreating the feature for the new two-repo architecture, the original request stays blocked even though the UI/editor behavior is already understood and implemented.

2. Additional context or comments

Proposed split:

  • graphon: add optional label support to Question Classifier classes and emit a new class_label runtime output
  • dify: expose inline editing for branch labels, preserve class_name semantics for the descriptive text, and surface class_label in node outputs and preview

Historical context:

Validation completed locally against an editable Graphon checkout wired into Dify via uv to confirm the split works end-to-end before publication.

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

extent analysis

TL;DR

To unblock the feature, update the graphon repository to add optional label support to Question Classifier classes and emit a new class_label runtime output, then modify dify to expose inline editing for branch labels and surface class_label in node outputs and preview.

Guidance

  • Review the proposed split and ensure that the graphon repository is updated to include the new label field and class_label output.
  • Modify the dify repository to expose inline editing for branch labels, preserving the existing class_name semantics for descriptive text.
  • Verify that the updated graphon and dify repositories work together end-to-end, using a local setup with an editable Graphon checkout wired into Dify via uv.
  • Confirm that the UI/editor behavior is as expected, with the new label field displayed as a concise title in the workflow editor and preview.

Notes

The solution requires updates to both the graphon and dify repositories, and validation of the end-to-end workflow.

Recommendation

Apply the proposed split and updates to both repositories, as this will allow the feature to be completed and unblock the original request.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING