Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(compilation): show update/log entry on Go backend for running and failed compiles (#20037)

chanx0d456caab918
diff --git a/web/src/pages/dataset/compilation/dataset-structure-view.tsx b/web/src/pages/dataset/compilation/dataset-structure-view.tsx
index 4bd28d2b44..0c71026475 100644
--- a/web/src/pages/dataset/compilation/dataset-structure-view.tsx
+++ b/web/src/pages/dataset/compilation/dataset-structure-view.tsx
@@ -169,8 +169,8 @@ export function DatasetStructureView({ kind }: DatasetStructureViewProps) {
return (
<Card className="flex-1 min-h-0 overflow-hidden flex border-border-button rounded-xl flex-col">
<div className="flex justify-between gap-4 px-4 pt-4">
- {!isGo && (
- <div className="flex items-center gap-2">
+ <div className="flex items-center gap-2">
+ {!isGo && (
<ConfirmDeleteDialog
title={t('knowledgeCompilation.deleteStructureConfirm', {
name: t(ViewModeLabelKeyMap[kind]),
@@ -181,23 +181,23 @@ export function DatasetStructureView({ kind }: DatasetStructureViewProps) {
<Trash2 />
</Button>
</ConfirmDeleteDialog>
- <CompilationUpdateButton
- traceData={structureRunData}
- generateType={generateType}
- hasChanges={hasChanges}
- newlyUploaded={newlyUploaded}
- removed={removed}
- retryPageCount={retryPageCount}
- loading={alterationLoading || runLoading}
- tooltip={t('knowledgeCompilation.updateStructureTooltip', {
- newlyUploaded,
- removed,
- name: t(ViewModeLabelKeyMap[kind]),
- })}
- onClick={handleUpdateClick}
- />
- </div>
- )}
+ )}
+ <CompilationUpdateButton
+ traceData={structureRunData}
+ generateType={generateType}
+ hasChanges={hasChanges}
+ newlyUploaded={newlyUploaded}
+ removed={removed}
+ retryPageCount={retryPageCount}
+ loading={alterationLoading || runLoading}
+ tooltip={t('knowledgeCompilation.updateStructureTooltip', {
+ newlyUploaded,
+ removed,
+ name: t(ViewModeLabelKeyMap[kind]),
+ })}
+ onClick={handleUpdateClick}
+ />
+ </div>
{kind === ViewMode.Graph && (
<SelectWithSearch
options={entityOptions}
diff --git a/web/src/pages/dataset/compilation/update-button.tsx b/web/src/pages/dataset/compilation/update-button.tsx
index d59f6068dd..d89f67b4af 100644
--- a/web/src/pages/dataset/compilation/update-button.tsx
+++ b/web/src/pages/dataset/compilation/update-button.tsx
@@ -11,6 +11,7 @@ import {
} from '@/components/ui/tooltip';
import { GenerateStatus, GenerateType } from '@/constants/knowledge';
import { ITraceInfo, useGenerateStatus } from '@/hooks/use-dataset-generate';
+import { useIsGoBackend } from '@/utils/backend-variant';
import { UpdateRunProgress } from './update-run-progress';
@@ -40,14 +41,17 @@ export function CompilationUpdateButton({
onClick,
}: CompilationUpdateButtonProps) {
const { t } = useTranslation();
+ const isGo = useIsGoBackend();
const { status } = useGenerateStatus(traceData);
const isRunning = status === GenerateStatus.Running;
- const isGenerating = isRunning || status === GenerateStatus.Failed;
+ const isFailed = status === GenerateStatus.Failed;
+ const isGenerating = isRunning || isFailed;
- // A failed trace persists (progress stays < 0) until the next run, so it
- // must not keep the button visible on its own — only real changes or a
- // live run should.
- if (!hasChanges && !isRunning) {
+ // A failed trace persists (progress stays < 0) until the next run, so on
+ // Python it must not keep the button visible on its own — only real changes
+ // or a live run should. On Go a failed batch is surfaced until retry drains
+ // it, so failure keeps the button visible there.
+ if (!hasChanges && !isRunning && !(isGo && isFailed)) {
return null;
}