RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix: File-level pipeline aliases appear too long (#21682)
balibabua625ac1e33b7
diff --git a/web/src/components/parser-tree-select/index.test.tsx b/web/src/components/parser-tree-select/index.test.tsxindex 02ae7aa96c..2d7304b8db 100644--- a/web/src/components/parser-tree-select/index.test.tsx+++ b/web/src/components/parser-tree-select/index.test.tsx@@ -93,7 +93,7 @@ describe('ParserTreeSelect', () => {expect(container.textContent).toContain('jin');});- it('caps the alias at 30% only in the trigger display, not in the row', () => {+ it('caps the alias in both the trigger display and the row', () => {render(<ParserTreeSelect value="pipeline:pipe-1:v1" onChange={jest.fn()} />,);@@ -113,7 +113,7 @@ describe('ParserTreeSelect', () => {expect(findAliasSpan(trigger)?.className).toContain('max-w-[30%]');const { container: row } = render(<>{leaf.label}</>);- expect(findAliasSpan(row)?.className).not.toContain('max-w-');+ expect(findAliasSpan(row)?.className).toContain('max-w-60');});it('auto-expands the branch holding the selection', () => {diff --git a/web/src/components/parser-tree-select/use-parser-tree-data.tsx b/web/src/components/parser-tree-select/use-parser-tree-data.tsxindex c6a45b3467..74396475dc 100644--- a/web/src/components/parser-tree-select/use-parser-tree-data.tsx+++ b/web/src/components/parser-tree-select/use-parser-tree-data.tsx@@ -154,8 +154,9 @@ export function useParserTreeData({ value }: { value?: string }) {: version.title,searchKeywords: version.alias ? [version.alias] : undefined,// The trigger display needs the alias and the unpolluted title- // (title above has the alias joined in for search); the dropdown- // row renders the full alias from `label` uncapped.+ // (title above has the alias joined in for search). The dropdown+ // row caps the alias at a fixed width — the popover is w-auto, so+ // an uncapped alias would blow it wide instead of truncating.data: version.alias? { title: version.title, alias: version.alias }: undefined,@@ -163,6 +164,7 @@ export function useParserTreeData({ value }: { value?: string }) {<PipelineVersionLabeltitle={version.title}alias={version.alias}+ aliasClassName="max-w-60"/>),}));diff --git a/web/src/components/pipeline-version-label.tsx b/web/src/components/pipeline-version-label.tsxindex d641b7815c..2a510c84b2 100644--- a/web/src/components/pipeline-version-label.tsx+++ b/web/src/components/pipeline-version-label.tsx@@ -10,8 +10,10 @@ interface PipelineVersionLabelProps {// The "version title + alias" line used everywhere a published pipeline// version is displayed: the parser tree select's dropdown rows and closed// trigger, and the dataset table's parse column. The title truncates first;-// the alias stays visible as secondary text, optionally width-capped via-// aliasClassName (the closed trigger caps it at 30% of the trigger width).+// the alias stays visible as secondary text, width-capped via aliasClassName+// so an over-long alias ends in an ellipsis instead of overflowing (the+// closed trigger caps it at 30% of the trigger width; the dropdown row and+// the parse column cap it at fixed widths).export function PipelineVersionLabel({title,alias,diff --git a/web/src/pages/agent/version-dialog/index.test.tsx b/web/src/pages/agent/version-dialog/index.test.tsxindex 0faa143c18..7b5cd51501 100644--- a/web/src/pages/agent/version-dialog/index.test.tsx+++ b/web/src/pages/agent/version-dialog/index.test.tsx@@ -49,7 +49,8 @@ jest.mock('@xyflow/react', () => ({const mockUpdateVersion = jest.fn();-// Both versions are released: the dialog only lists published versions.+// One released version and one unpublished legacy snapshot: the dialog lists+// every row and marks only the released one with a Dot.// `let` so pagination tests can swap in a larger list before rendering.let mockVersions = [{@@ -63,7 +64,6 @@ let mockVersions = [id: 'v-old',title: 'Old Snapshot',created_at: '2024-01-01',- release: true,alias: 'old',},];@@ -97,6 +97,26 @@ const renderDialog = () =>const getRow = (title: string) => screen.getByText(title).closest('li')!;+describe('VersionDialog release marker', () => {+ it('lists unpublished legacy versions alongside released ones', () => {+ renderDialog();++ expect(screen.getByText('Latest')).toBeInTheDocument();+ expect(screen.getByText('Old Snapshot')).toBeInTheDocument();+ });++ it('marks only released rows with the accent dot', () => {+ renderDialog();++ expect(+ getRow('Latest').querySelector('.bg-accent-primary'),+ ).toBeInTheDocument();+ expect(+ getRow('Old Snapshot').querySelector('.bg-accent-primary'),+ ).not.toBeInTheDocument();+ });+});+describe('VersionDialog alias edit entry (G2/section 4.4, T35)', () => {it('renders an edit-alias button for every version', () => {renderDialog();diff --git a/web/src/pages/agent/version-dialog/index.tsx b/web/src/pages/agent/version-dialog/index.tsxindex 0cdcee6a28..b9e9290392 100644--- a/web/src/pages/agent/version-dialog/index.tsx+++ b/web/src/pages/agent/version-dialog/index.tsx@@ -59,6 +59,12 @@ import { AliasFormDialog } from '../components/alias-form-dialog';import { CanvasSnapshot, CanvasSnapshotContext } from '../context';import { downloadDsl } from '../utils/download-dsl';+function Dot() {+ return (+ <span className="w-2 h-2 inline-block rounded-full bg-accent-primary flex-shrink-0" />+ );+}+type PendingAction =| { kind: 'delete'; versionId: string; title: string }| { kind: 'restore'; versionId: string; title: string }@@ -87,17 +93,15 @@ export function VersionDialog({const { applyVersion, loading: applyRestoring } = useApplyVersion();const { updateVersion } = useUpdateVersion();- // Only published versions are listed: draft saves (manual Save and- // auto-save) no longer write user_canvas_version rows, so this dialog shows- // what was published. Rows predating that change are filtered out here.- const released = useMemo(() => data.filter((x) => x.release), [data]);-+ // Every version row is listed, including unpublished snapshots saved before+ // draft saves stopped writing user_canvas_version; published rows carry a+ // Dot marker next to the title.// A2/F1: alias filtering is a pure front-end filter over the returned set.const filtered = useMemo(() => {const q = aliasFilter.trim().toLowerCase();- if (!q) return released;- return released.filter((x) => (x.alias ?? '').toLowerCase().includes(q));- }, [released, aliasFilter]);+ if (!q) return data;+ return data.filter((x) => (x.alias ?? '').toLowerCase().includes(q));+ }, [data, aliasFilter]);const { page, pageSize, setPage, onPaginationChange, pagedList } =useClientPagination(filtered);@@ -105,8 +109,8 @@ export function VersionDialog({// The version detail (IFlow) has no alias field, so the preview header// reads the alias from the list row for the selected version.const selectedAlias = useMemo(- () => released.find((x) => x.id === selectedId)?.alias,- [released, selectedId],+ () => data.find((x) => x.id === selectedId)?.alias,+ [data, selectedId],);// Snapshot handed to the preview so variable labels inside node components@@ -219,10 +223,10 @@ export function VersionDialog({// Keep the current selection across list refreshes; only fall back to the// newest version when the selected one was pruned server-side.useEffect(() => {- if (released.length > 0 && !released.some((x) => x.id === selectedId)) {- setSelectedId(released[0].id);+ if (data.length > 0 && !data.some((x) => x.id === selectedId)) {+ setSelectedId(data[0].id);}- }, [released, selectedId]);+ }, [data, selectedId]);return (<Dialog open onOpenChange={hideModal}>@@ -255,6 +259,7 @@ export function VersionDialog({><div className="flex items-center gap-2"><span className="truncate min-w-0">{x.title}</span>+ {x.release && <Dot></Dot>}{x.alias && (<span className="shrink-0 max-w-[20%] truncate text-accent-primary text-xs">{x.alias}@@ -306,12 +311,11 @@ export function VersionDialog({<div className="flex min-w-0 items-center"><span className="pb-1 truncate">{agent?.title}</span>{selectedAlias && (- <span- className="ml-2 max-w-[30%] truncate text-accent-primary text-sm"- title={selectedAlias}- >- {selectedAlias}- </span>+ <RAGFlowTooltip asChild tooltip={selectedAlias}>+ <span className="ml-2 max-w-[30%] truncate text-accent-primary text-sm">+ {selectedAlias}+ </span>+ </RAGFlowTooltip>)}</div><p className="text-text-secondary text-xs">diff --git a/web/src/pages/dataset/dataset/parsing-status-cell.tsx b/web/src/pages/dataset/dataset/parsing-status-cell.tsxindex cfcdb3f6d3..0b50735588 100644--- a/web/src/pages/dataset/dataset/parsing-status-cell.tsx+++ b/web/src/pages/dataset/dataset/parsing-status-cell.tsx@@ -102,6 +102,7 @@ export function ParseDropdownButton({title={versionTitle}alias={version?.alias}className="max-w-72"+ aliasClassName="max-w-[50%]"/>) : (parserLabel