Skip to content

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

fix(web): move artifact delete button into the toolbar row (#19381)

chanx5c0326885b38
diff --git a/web/src/pages/chunk/representation/index.tsx b/web/src/pages/chunk/representation/index.tsx
index 2e60e2816b..84549d2758 100644
--- a/web/src/pages/chunk/representation/index.tsx
+++ b/web/src/pages/chunk/representation/index.tsx
@@ -48,13 +48,13 @@ function Representation({ onNodeClick }: RepresentationProps) {
return (
<section className="p-5 rounded-2xl h-full flex flex-col">
- <div className="flex items-center justify-between">
+ <div className="flex items-center gap-2">
<RepresentationSelect
templates={templates}
value={selectedTemplateId}
onChange={handleTemplateChange}
/>
- <div className="relative flex items-center gap-2">
+ <div className="min-w-0">
{isGraphKind ? (
<SelectWithSearch
options={entityOptions}
@@ -72,21 +72,21 @@ function Representation({ onNodeClick }: RepresentationProps) {
placeholder={t('common.search')}
/>
)}
- {templates.length > 0 && (
- <ConfirmDeleteDialog onOk={handleDelete}>
- <Button
- variant="ghost"
- size="icon"
- type="button"
- disabled={deleting}
- aria-label={t('common.delete', 'Delete')}
- className="absolute top-9 right-0"
- >
- <Trash2 className="h-5 w-5" />
- </Button>
- </ConfirmDeleteDialog>
- )}
</div>
+ {templates.length > 0 && (
+ <ConfirmDeleteDialog onOk={handleDelete}>
+ <Button
+ variant="ghost"
+ size="icon"
+ type="button"
+ disabled={deleting}
+ aria-label={t('common.delete', 'Delete')}
+ className="ml-auto shrink-0"
+ >
+ <Trash2 className="h-5 w-5" />
+ </Button>
+ </ConfirmDeleteDialog>
+ )}
</div>
{loading && !data && <SkeletonCard className="mt-6" />}
{!(loading && !data) && templates.length === 0 && (