Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

fix(notifications): drop the raw error box from board rows; name the status in http_error copy and keep the raw reason as a hover tooltip

Khuram Niazba52e9741330
diff --git a/__tests__/notificationDisplay.spec.ts b/__tests__/notificationDisplay.spec.ts
index 3bfa357..ea60d44 100644
--- a/__tests__/notificationDisplay.spec.ts
+++ b/__tests__/notificationDisplay.spec.ts
@@ -35,7 +35,7 @@ describe("describeNotification", () => {
title: "“Remote Frontend” finished",
lead: "12 jobs saved",
detail: " · 38 scanned · 26 below match threshold",
- code: null,
+ hint: null,
link: { label: "Review 12 new jobs", href: "/dashboard/automations/a-1?tab=jobs" },
});
});
@@ -63,7 +63,7 @@ describe("describeNotification", () => {
expect(d.detail).toBe(" · 38 scanned · 1 board failed · AI unavailable, rest saved without analysis");
});
- it("board row: 404 copy, raw reason as code, repeat count, edit link", () => {
+ it("board row: 404 copy, raw reason as hint, repeat count, edit link", () => {
const d = describeNotification(
item({
kind: "board",
@@ -77,11 +77,21 @@ describe("describeNotification", () => {
title: "Job board unreachable",
lead: "Greenhouse · Northwind",
detail: " returned 404 — the company may have moved ATS. Failed on 3 runs since Sep 20.",
- code: "Board 'northwind' returned 404",
+ hint: "Board 'northwind' returned 404",
link: { label: "Edit watchlist", href: "/dashboard/automations/a-1?edit=1" },
});
});
+ it("board row: http_error names the status instead of the generic copy", () => {
+ const d = describeNotification(
+ item({
+ kind: "board",
+ payload: { provider: "Lever", token: "acme", companyName: "Acme", code: "http_error", reason: "Board 'acme' returned 503" },
+ }),
+ );
+ expect(d.detail).toBe(" returned 503.");
+ });
+
it("error row lists boards when every board failed", () => {
const d = describeNotification(
item({
diff --git a/src/components/notifications/NotificationRow.tsx b/src/components/notifications/NotificationRow.tsx
index d60694b..b9c15a7 100644
--- a/src/components/notifications/NotificationRow.tsx
+++ b/src/components/notifications/NotificationRow.tsx
@@ -84,7 +84,7 @@ export function NotificationRow({ item, variant, onRemove, onOpenLink }: Notific
{item.automation.name} · {formatClock(item.occurredAt)}
</span>
)}
- <span className="text-[13px] text-muted-foreground">
+ <span className="text-[13px] text-muted-foreground" title={d.hint ?? undefined}>
<b
className={cn(
"font-semibold",
@@ -99,11 +99,6 @@ export function NotificationRow({ item, variant, onRemove, onOpenLink }: Notific
</b>
{d.detail}
</span>
- {d.code && (
- <code className="self-start rounded border border-red-200 bg-background px-1.5 py-1 font-mono text-[11.5px] text-red-700 dark:border-red-900 dark:text-red-300">
- {d.code}
- </code>
- )}
{d.link && (
<Link
href={d.link.href}
diff --git a/src/components/notifications/notificationDisplay.ts b/src/components/notifications/notificationDisplay.ts
index b349fda..e12bb6c 100644
--- a/src/components/notifications/notificationDisplay.ts
+++ b/src/components/notifications/notificationDisplay.ts
@@ -33,12 +33,14 @@ export function describeNotification(n: NotificationItem) {
n.occurrences > 1
? ` Failed on ${n.occurrences} runs since ${monthDay(new Date(n.createdAt))}.`
: "";
+ // The status is the one detail the generic http_error copy would lose.
+ const status = p.code === "http_error" ? p.reason.match(/returned (\d{3})/)?.[1] : undefined;
return {
icon: "warn" as const,
title: "Job board unreachable",
lead: `${p.provider} · ${p.companyName}`,
- detail: ` ${BOARD_COPY[p.code]}${repeat}`,
- code: p.reason,
+ detail: ` ${status ? `returned ${status}.` : BOARD_COPY[p.code]}${repeat}`,
+ hint: p.reason,
link: { label: "Edit watchlist", href: `${base}?edit=1` },
};
}
@@ -54,7 +56,7 @@ export function describeNotification(n: NotificationItem) {
lead: plural(p.jobsSaved, "job") + " saved",
// Reasons may already end in a period ("…no longer exists.").
detail: ` · ${name} stopped: ${p.reason.replace(/\.$/, "")}${boards}.`,
- code: null,
+ hint: null,
link: { label: "Open automation", href: `${base}?tab=history` },
};
}
@@ -69,7 +71,7 @@ export function describeNotification(n: NotificationItem) {
title: `${name} finished`,
lead: p.jobsSaved > 0 ? `${plural(p.jobsSaved, "job")} saved` : "No new jobs",
detail: parts.join(" · "),
- code: null,
+ hint: null,
link:
p.jobsSaved > 0
? { label: `Review ${plural(p.jobsSaved, "new job")}`, href: `${base}?tab=jobs` }