Skip to content

Fix: Change route name - #14639

Merged
yingfeng merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/route-0507
May 7, 2026
Merged

yingfeng merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/route-0507

Conversation

@dcc123456

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Fix: Change route name

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 7, 2026
@coderabbitai

coderabbitai Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Routes enum is updated to add Files and fix Dataset composition to use ${Routes.DatasetBase}/${Routes.Files}. Three route paths are renamed: DatasetTesting to '/retrieval', DataSetOverview to '/logs', and DataSetSetting to '/configuration'. The navigation hook navigateToDataFile is corrected to use the fixed route composition instead of duplicating DatasetBase.

Changes

Route Structure and Navigation Fix

Layer / File(s) Summary
Route Enum Definition
web/src/routes.tsx
Routes enum adds Files = '/files' and rebuilds Dataset using ${Routes.DatasetBase}/${Routes.Files}. Path names updated: DatasetTesting from '/testing' to '/retrieval', DataSetOverview from '/dataset-overview' to '/logs', DataSetSetting from '/dataset-setting' to '/configuration'.
Navigation Hook
web/src/hooks/logic-hooks/navigate-hooks.ts
navigateToDataFile corrected to construct route using Routes.DatasetBase + Routes.Files + /${id}, fixing previous duplicate DatasetBase reference.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Routes were tangled, files were lost,
Now DatasetBase won't pay the cost!
Files join the path, the way is clear,
And tests shall flow to /retrieval here. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete; it only restates the title and marks the change type but provides no explanation of what problem the route changes solve or context for the fixes. Add a detailed explanation of the route issues being fixed, why the changes are necessary, and how they improve the navigation or file access functionality.
Title check ❓ Inconclusive The title 'Fix: Change route name' is vague and generic, failing to clearly describe which routes were changed or what the actual fix accomplishes. Revise the title to be more specific about the route changes, such as 'Fix: Correct route paths for dataset navigation and file access' to clearly convey the changeset.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

@dcc123456 dcc123456 added 🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration labels May 7, 2026
@dcc123456
dcc123456 marked this pull request as draft May 7, 2026 11:12
@dcc123456
dcc123456 marked this pull request as ready for review May 7, 2026 11:12

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/src/routes.tsx`:
- Around line 19-20: Routes.Dataset is built with an extra slash causing
`/dataset//files`; fix it by removing the injected "/" in the template so the
composition uses `${Routes.DatasetBase}${Routes.Files}` (referencing
Routes.Dataset, Routes.Files, Routes.DatasetBase) instead of
`${Routes.DatasetBase}/${Routes.Files}` so the final route becomes
`/dataset/files`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 217a4872-bf5f-44b7-a976-a23de59317cf

📥 Commits

Reviewing files that changed from the base of the PR and between bb10b83 and a2e8232.

📒 Files selected for processing (2)
  • web/src/hooks/logic-hooks/navigate-hooks.ts
  • web/src/routes.tsx

Comment thread web/src/routes.tsx
Comment on lines +19 to +20
Files = '/files',
Dataset = `${Routes.DatasetBase}/${Routes.Files}`,

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix double-slash route composition in Routes.Dataset.

At Line 20, Routes.Dataset becomes /dataset//files because Routes.Files already includes a leading slash. This can break matching for path: \${Routes.Dataset}/:id`and conflict with navigations that build/dataset/files/:id`.

Proposed fix
 export enum Routes {
   DatasetBase = '/dataset',
   Files = '/files',
-  Dataset = `${Routes.DatasetBase}/${Routes.Files}`,
+  Dataset = `${Routes.DatasetBase}${Routes.Files}`,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Files = '/files',
Dataset = `${Routes.DatasetBase}/${Routes.Files}`,
Files = '/files',
Dataset = `${Routes.DatasetBase}${Routes.Files}`,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/routes.tsx` around lines 19 - 20, Routes.Dataset is built with an
extra slash causing `/dataset//files`; fix it by removing the injected "/" in
the template so the composition uses `${Routes.DatasetBase}${Routes.Files}`
(referencing Routes.Dataset, Routes.Files, Routes.DatasetBase) instead of
`${Routes.DatasetBase}/${Routes.Files}` so the final route becomes
`/dataset/files`.

@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.16%. Comparing base (94324af) to head (a2e8232).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14639   +/-   ##
=======================================
  Coverage   94.16%   94.16%           
=======================================
  Files          10       10           
  Lines         703      703           
  Branches      112      112           
=======================================
  Hits          662      662           
  Misses         25       25           
  Partials       16       16           

☔ 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.

@yingfeng
yingfeng merged commit 805a2da into infiniflow:main May 7, 2026
1 check passed
pekar9781 pushed a commit to pekar9781/ragflow that referenced this pull request May 8, 2026
### What problem does this PR solve?

Fix: Change route name

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
@coderabbitai coderabbitai Bot mentioned this pull request May 8, 2026
1 task done
Ricardo-M-L pushed a commit to Ricardo-M-L/ragflow that referenced this pull request Aug 17, 2026
### What problem does this PR solve?

Fix: Change route name

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants