Skip to content

fix(dataset): preserve disabled RAPTOR and GraphRAG settings - #17665

Merged
JinHai-CN merged 1 commit into
infiniflow:mainfrom
lntutor:fix/dataset-settings-preserve-rag-flags
Aug 20, 2026
Merged

JinHai-CN merged 1 commit into
infiniflow:mainfrom
lntutor:fix/dataset-settings-preserve-rag-flags

Conversation

@lntutor

@lntutor lntutor commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserve explicitly saved false values for RAPTOR and GraphRAG when hydrating the dataset Configuration form. The existing form defaults still apply when either enable flag is absent.

Adds hook-level regression coverage for both explicit disablement and default fallback behavior.

Fixes #17654

Verification

  • npx jest --runInBand --runTestsByPath src/pages/dataset/dataset-setting/hooks.test.tsx src/hooks/tests/parser-config-utils.test.ts
  • npx oxfmt --check src/pages/dataset/dataset-setting/hooks.ts src/pages/dataset/dataset-setting/hooks.test.tsx
  • npx oxlint src/pages/dataset/dataset-setting/hooks.ts src/pages/dataset/dataset-setting/hooks.test.tsx
  • npm run build
  • git diff HEAD^ --check

Repository-wide npm run type-check, npm run lint, and npm run format:check remain red on pre-existing files outside this change; the touched files pass their focused checks.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 73065091-71ca-40da-b2bd-b2d2af990a8d

📥 Commits

Reviewing files that changed from the base of the PR and between 776b937 and 4ee051f.

📒 Files selected for processing (2)
  • web/src/pages/dataset/dataset-setting/hooks.test.tsx
  • web/src/pages/dataset/dataset-setting/hooks.ts
💤 Files with no reviewable changes (1)
  • web/src/pages/dataset/dataset-setting/hooks.ts

📝 Walkthrough

Walkthrough

The dataset configuration hook now preserves saved RAPTOR and GraphRAG enablement values. Tests cover explicitly disabled settings and defaults used when saved enable flags are missing.

Changes

Dataset configuration flags

Layer / File(s) Summary
Preserve parser enablement flags
web/src/pages/dataset/dataset-setting/hooks.ts, web/src/pages/dataset/dataset-setting/hooks.test.tsx
The configuration merge no longer forces RAPTOR or GraphRAG to enabled. Tests verify disabled saved values and enabled form defaults when saved flags are absent.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit checks the settings with care,
No forced-on flags hide there.
RAPTOR rests when saved as false,
GraphRAG follows the same course.
Defaults remain when values are bare.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies preserving disabled RAPTOR and GraphRAG settings, which is the main change.
Description check ✅ Passed The description explains the bug, intended behavior, regression coverage, and verification steps.
Linked Issues check ✅ Passed The changes remove unconditional enablement and add tests for saved false values and default fallback, satisfying issue #17654.
Out of Scope Changes check ✅ Passed All changes are limited to the hydration fix and directly related regression tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lntutor

lntutor commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Current head 4ee051f is mergeable, with no unresolved review threads and no contributor-side follow-up remaining from my side. The visible current-head automation is the skipped sep-tests workflow plus a successful CodeRabbit pass, so this looks ready for maintainer review if that check state is expected for this path.

@JinHai-CN JinHai-CN added the ci Continue Integration label Aug 20, 2026
@JinHai-CN
JinHai-CN merged commit e8aeddc into infiniflow:main Aug 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Dataset Configuration page force-resets RAPTOR and GraphRAG to enabled on every load/save

3 participants