Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions frontend/app/knowledge/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ function SearchPage() {
}

if (status === "failed") {
return (
const button = (
<button
type="button"
className={cn(
Expand All @@ -776,7 +776,11 @@ function SearchPage() {
? "text-destructive hover:opacity-80"
: "w-full text-red-500 hover:text-red-400",
)}
aria-label="View ingestion error"
aria-label={
data?.error
? `View ingestion error: ${data.error}`
: "View ingestion error"
}
data-testid="failed-status-cell-trigger"
onClick={() => {
selectTask(getTaskIdForRow(data));
Expand All @@ -787,6 +791,23 @@ function SearchPage() {
<StatusBadge status={status} className="pointer-events-none" />
</button>
);

if (!data?.error) {
return button;
}

return (
<Tooltip>
<TooltipTrigger asChild>{button}</TooltipTrigger>
<TooltipContent
side="top"
align="end"
className="max-w-80 whitespace-pre-wrap break-words"
>
{data.error}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Medium Issue
Resolve task errors before rendering the tooltip —

When a legacy/provider failure supplies wrapped JSON in fileInfo.error, TaskContext copies that raw value into data.error, whereas the Task dialog passes it through resolveTaskFileError and formatProviderErrorMessage. Rendering data.error directly therefore shows raw backend payloads instead of the resolved user-facing message promised by this change; apply the same resolution used by the dialog.

</TooltipContent>
</Tooltip>
);
}

return <StatusBadge status={status} />;
Expand Down
Loading