mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
fix: improve the notification content and improve tooltip
This commit is contained in:
parent
fc0dd8b509
commit
76c760b8dd
3 changed files with 9 additions and 8 deletions
|
|
@ -273,17 +273,18 @@ class IndexingPipelineService:
|
|||
continue
|
||||
|
||||
dup_check = await self.session.execute(
|
||||
select(Document.id).filter(
|
||||
select(Document.id, Document.title).filter(
|
||||
Document.content_hash == content_hash,
|
||||
Document.id != existing.id,
|
||||
)
|
||||
)
|
||||
if dup_check.scalars().first() is not None:
|
||||
dup_row = dup_check.first()
|
||||
if dup_row is not None:
|
||||
if not DocumentStatus.is_state(
|
||||
existing.status, DocumentStatus.READY
|
||||
):
|
||||
existing.status = DocumentStatus.failed(
|
||||
"Duplicate content — already indexed by another document"
|
||||
f"Duplicate content: matches '{dup_row.title}'"
|
||||
)
|
||||
continue
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ function StatusIndicator({ status }: { status?: DocumentStatus }) {
|
|||
<Clock className="h-5 w-5 text-muted-foreground/60" />
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top">Pending - waiting to be synced</TooltipContent>
|
||||
<TooltipContent side="top">Pending: waiting to be synced</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
case "processing":
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ export const DocumentNode = React.memo(function DocumentNode({
|
|||
<Clock className="h-3.5 w-3.5 text-muted-foreground/60" />
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top">Pending — waiting to be synced</TooltipContent>
|
||||
<TooltipContent side="top">Pending: waiting to be synced</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
|
@ -191,9 +191,9 @@ export const DocumentNode = React.memo(function DocumentNode({
|
|||
<AlertCircle className="h-3.5 w-3.5 text-destructive" />
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" className="max-w-xs">
|
||||
{doc.status?.reason || "Processing failed"}
|
||||
</TooltipContent>
|
||||
<TooltipContent side="top">
|
||||
{doc.status?.reason || "Processing failed"}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue