Skip to content

fix: resolve routing, i18n, user management, UI, and OpenAPI/frontend configuration issues#21

Open
WangDaBenShi wants to merge 104 commits intoLazyAGI:mainfrom
WangDaBenShi:main
Open

fix: resolve routing, i18n, user management, UI, and OpenAPI/frontend configuration issues#21
WangDaBenShi wants to merge 104 commits intoLazyAGI:mainfrom
WangDaBenShi:main

Conversation

@WangDaBenShi
Copy link
Copy Markdown
Contributor

Summary

This PR fixes multiple issues across routing, i18n, user management, UI behavior, and OpenAPI/frontend configuration. It also includes several follow-up fixes after review.

Changes

Configuration & Infrastructure

  • Fix OpenAPI generation issues
  • Update frontend Docker Compose configuration

Routing & Knowledge Base

  • Fix knowledge base routing stack issues
  • Improve routing behavior consistency

User Management

  • Fix no response issue when confirming user information updates
  • Fix admin user actions behavior
  • Disable selection of inactive members

UI & Interaction

  • Fix inconsistent layouts between user management and user group pages
  • Fix modal behavior issues
  • Fix pagination issues in multiple modules
  • Make history toolbar responsive

i18n

  • Fix incomplete/incorrect language switching for "Knowledge" / "Knowledge Base"
  • Fix i18n issues in Ant Design modal and pagination components

sunjinghua.vendor and others added 30 commits March 10, 2026 16:09
fix: 创建prompt接口参数错误
\n- Integrate JuiceFS S3 gateway and MinIO backend into compose\n- Add user guide and initialization/testing helpers\n

Made-with: Cursor
feat(juicefs): add juicefs s3 gateway integration
refactor(docs): update references from LazyRAG
style(utils): standardize string quotes in generate_bucket_name function
style(utils): standardize string quotes in generate_bucket_name function
fix: 创建prompt接口参数错误
- Updated the OpenAPI cache with a new core hash.
- Removed deprecated endpoints from core.yaml, including tasks:callback and allDefaultDatasets.
- Cleaned up generated API client code by removing unused methods related to the removed endpoints.
- Enhanced the KnowledgeBaseServiceApi with new dataset management methods and JSON request handling.
- Removed the industry selection field from the UpdateModal component for a streamlined user experience.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive set of updates to the frontend, including improvements to the OpenAPI client generation workflow with stale-check mechanisms, a transition from HashRouter to BrowserRouter, and enhanced internationalization (i18n) support across UI components. Administrative features have been expanded with user enable/disable functionality and a refactored group member management modal. Additionally, the knowledge base module now supports folder uploads via relative paths, and navigation logic has been updated to use React Router hooks consistently. Feedback focuses on scalability issues related to hardcoded page sizes for prompt fetching and performance bottlenecks in the sequential file upload logic for folders.

function fetchPromptList() {
PromptServiceApi()
.promptServiceListPrompts({ pageSize: 2 })
.promptServiceListPrompts({ pageSize: 9999 })
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using a hardcoded pageSize of 9999 is a scalability anti-pattern. While it ensures all prompts are fetched for now, it can lead to performance issues and large payload sizes as the number of prompts grows. Consider implementing proper pagination or at least using a more reasonable limit with a constant.

Comment on lines +163 to +195
for (const item of fileItems) {
if (item.originFile.size > LARGE_FILE_THRESHOLD) {
// Large file: multi-step upload with relative_path
const uploadFileId = await uploadLargeFileToDataset(
data.dataset_id,
item.originFile,
{ documentPid: data.p_id, relativePath: item.path },
);
uploadedItems.push({
upload_file_id: uploadFileId,
relative_path: item.path,
});
} else {
// Small file: single upload with relative_path in form data
const formData = new FormData();
formData.append("files", item.originFile);
formData.append("relative_path", item.path);
if (data.p_id) formData.append("document_pid", data.p_id);

const uploadRes = await TaskServiceApi().uploadFiles(
data.dataset_id,
formData,
);
const uploaded = uploadRes.data.files || [];
if (!uploaded.length) {
throw new Error(t("knowledge.uploadResultMissing"));
}
uploadedFiles.forEach((f) => allUploadFileIds.push(f.upload_file_id));
}

for (const file of largeFiles) {
const uploadFileId = await uploadLargeFileToDataset(data.dataset_id, file, {
documentPid: data.p_id,
uploadedItems.push({
upload_file_id: uploaded[0].upload_file_id!,
relative_path: item.path,
});
allUploadFileIds.push(uploadFileId);
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In submitFolderMode, files are uploaded sequentially one by one. For folders containing many small files, this will result in a significant performance bottleneck due to the overhead of multiple HTTP requests. Consider batching small files or using Promise.all with a concurrency limit to parallelize the uploads.

…ed members from selection and updating user list structure to include disabled status.
…oints, enhance API client, and update localization for success messages.
… update logo handling and improve layout responsiveness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants