Skip to content

fix: knowledge hit-testing render failed.#36106

Merged
FFXN merged 37 commits into
mainfrom
fix/issue-36090
May 13, 2026
Merged

fix: knowledge hit-testing render failed.#36106
FFXN merged 37 commits into
mainfrom
fix/issue-36090

Conversation

@FFXN
Copy link
Copy Markdown
Contributor

@FFXN FFXN commented May 13, 2026

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 #36090

When hit-testing, an empty document dict is returned due to DocumentSegment type modification.
Then the frontend render failed.

Screenshots

Before After
... ...

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

FFXN and others added 30 commits March 3, 2026 14:31
…m service including remote template service and database, return responding error message.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…m service including remote template service and database, return responding error message.
# Conflicts:
#	api/services/rag_pipeline/pipeline_template/remote/remote_retrieval.py
# Conflicts:
#	api/providers/vdb/vdb-weaviate/src/dify_vdb_weaviate/weaviate_vector.py
# Conflicts:
#	api/tests/unit_tests/controllers/service_api/dataset/test_hit_testing.py
…e image preview to fail on the chunks details page of the knowledge base.
…e image preview to fail on the chunks details page of the knowledge base.
… is generated for external preview or download only.
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 0.00% 43.66% +43.66%
Strict coverage 0.00% 43.18% +43.18%
Typed symbols 0 22,044 +22,044
Untyped symbols 0 28,761 +28,761
Modules 0 2552 +2,552

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.87%. Comparing base (03861bc) to head (b8a594d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/services/hit_testing_service.py 96.42% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #36106   +/-   ##
=======================================
  Coverage   85.87%   85.87%           
=======================================
  Files        4456     4456           
  Lines      210959   210985   +26     
  Branches    39449    39454    +5     
=======================================
+ Hits       181162   181191   +29     
+ Misses      26573    26572    -1     
+ Partials     3224     3222    -2     
Flag Coverage Δ
api 85.32% <96.87%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

hjlarry
hjlarry previously approved these changes May 13, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 13, 2026
@FFXN FFXN added this pull request to the merge queue May 13, 2026
Merged via the queue into main with commit 2afa39c May 13, 2026
32 checks passed
@FFXN FFXN deleted the fix/issue-36090 branch May 13, 2026 07:41
FFXN added a commit that referenced this pull request May 13, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
zhangtaodemama added a commit to zhangtaodemama/langgenius-dify-bfaadcb0c706 that referenced this pull request May 13, 2026
BeautyyuYanli pushed a commit that referenced this pull request May 13, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
FFXN added a commit that referenced this pull request May 14, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An unexpected error occurred while rendering this component during knowledge base recall.

2 participants