Skip to content

fix(web): prune stale knowledge retrieval datasets#36981

Open
yzhkali wants to merge 1 commit into
langgenius:mainfrom
yzhkali:fix/web-prune-stale-knowledge-datasets
Open

fix(web): prune stale knowledge retrieval datasets#36981
yzhkali wants to merge 1 commit into
langgenius:mainfrom
yzhkali:fix/web-prune-stale-knowledge-datasets

Conversation

@yzhkali
Copy link
Copy Markdown
Contributor

@yzhkali yzhkali commented Jun 3, 2026

Summary

  • prune deleted/stale dataset ids from Knowledge Retrieval node inputs after /datasets returns only valid dataset details
  • prune requested ids missing from the shared workflow dataset detail cache, including empty API responses
  • avoid emitting { id } placeholder datasets from SelectDataSet while preserving valid selected datasets outside the current page
  • pass valid selected dataset details through Knowledge Retrieval and app configuration selector flows

Fixes #36919

Test Plan

  • pnpm --dir web test app/components/workflow/nodes/knowledge-retrieval/hooks/__tests__/use-knowledge-dataset-selection.spec.ts app/components/workflow/datasets-detail-store/__tests__/store.spec.tsx app/components/workflow/datasets-detail-store/__tests__/provider.spec.tsx app/components/app/configuration/dataset-config/select-dataset/__tests__/index.spec.tsx app/components/workflow/nodes/knowledge-retrieval/__tests__/panel.spec.tsx app/components/workflow/nodes/knowledge-retrieval/__tests__/node.spec.tsx
  • pnpm --dir web test app/components/app/configuration/dataset-config/select-dataset/__tests__/index.spec.tsx app/components/app/configuration/__tests__/configuration-view.spec.tsx app/components/workflow/nodes/knowledge-retrieval/__tests__/panel.spec.tsx app/components/workflow/nodes/knowledge-retrieval/__tests__/node.spec.tsx
  • pnpm --dir web type-check
  • pnpm lint -- web/app/components/workflow web/app/components/app/configuration/dataset-config/select-dataset

@yzhkali yzhkali requested review from iamjoel and zxhlyh as code owners June 3, 2026 03:29
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. javascript labels Jun 3, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label Jun 3, 2026
@lyzno1 lyzno1 removed the javascript label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Knowledge Retrieval node shows ghost/blank dataset icon after dataset is removed

2 participants