Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(notices): handle missing notice data gracefully

Steven Enamakel8eb05dc89e2e
diff --git a/app/src/components/notices/NoticeCenter.tsx b/app/src/components/notices/NoticeCenter.tsx
index 96bf2de1fe..cf6a0147ab 100644
--- a/app/src/components/notices/NoticeCenter.tsx
+++ b/app/src/components/notices/NoticeCenter.tsx
@@ -50,7 +50,11 @@ function NoticeRow({ notice }: { notice: AppNotice }) {
/>
<div className="min-w-0 flex-1">
<p className="text-sm font-semibold text-content">{notice.title}</p>
- <p className="mt-0.5 text-xs leading-relaxed text-content-secondary">{notice.body}</p>
+ {/* `whitespace-pre-line` so a notice carrying a source detail renders
+ it as its own paragraph rather than one run-on line. */}
+ <p className="mt-0.5 whitespace-pre-line text-xs leading-relaxed text-content-secondary">
+ {notice.body}
+ </p>
{notice.meta && <p className="mt-1 text-[11px] text-content-muted">{notice.meta}</p>}
{(notice.onAction || notice.onDismiss) && (
<div className="mt-2 flex items-center gap-1.5">
diff --git a/app/src/components/notices/useAppNotices.ts b/app/src/components/notices/useAppNotices.ts
index afbc84e89a..e5d12b993f 100644
--- a/app/src/components/notices/useAppNotices.ts
+++ b/app/src/components/notices/useAppNotices.ts
@@ -55,12 +55,16 @@ const ACTION_ROUTE: Record<Exclude<UserErrorAction, 'dismiss'>, string> = {
// this one screen, so a single CTA covers them without the user needing to
// know which one applies.
open_embeddings_settings: '/connections?tab=embeddings',
+ // Opening this screen also restarts the integration health poll, so it is
+ // both the explanation and the retry.
+ open_connections: '/connections?tab=skills',
};
const ACTION_LABEL_KEY: Record<Exclude<UserErrorAction, 'dismiss'>, string> = {
open_billing: 'userErrors.action.openBilling',
open_provider_settings: 'userErrors.action.openProviderSettings',
open_embeddings_settings: 'userErrors.action.openEmbeddingsSettings',
+ open_connections: 'userErrors.action.openConnections',
};
const SEVERITY_RANK: Record<NoticeSeverity, number> = { error: 0, warning: 1, info: 2 };
@@ -125,7 +129,9 @@ export function useAppNotices(): AppNotice[] {
id: entry.id,
severity: entry.severity,
title: t(entry.titleKey),
- body: t(entry.bodyKey),
+ // `detail` is the source's own user-facing text (see the field's docs);
+ // it says what actually failed, which the translated body cannot.
+ body: entry.detail ? `${t(entry.bodyKey)}\n\n${entry.detail}` : t(entry.bodyKey),
meta: [
t(`userErrors.scope.${entry.scope}`, entry.scope),
new Date(entry.lastSeenAt).toLocaleTimeString(),