Skip to content

Commit bbd3ae7

Browse files
committed
feat(emails): the wake banner is the watch email's headline
'Watch update — all clear / needs your attention', toned by kind; the identity moves to the details line and the subject follows suit.
1 parent 86689d3 commit bbd3ae7

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

internal-packages/emails/emails/alert-dashboard-agent-watch.tsx

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,10 @@ const GOOD_NEWS_KINDS = new Set([
7777
"run_finished",
7878
]);
7979

80-
function outcomeLine(kind: string): { text: string; color: string } {
81-
if (GOOD_NEWS_KINDS.has(kind)) return { text: "Watch update — all clear", color: "#A8FF53" };
82-
if (kind === "error_recurrence") {
83-
return { text: "Watch update — needs your attention", color: "#F87171" };
84-
}
85-
return { text: "Watch update — condition met", color: "#D7D9DD" };
80+
function outcomeLine(kind: string): { accent: string; color: string } {
81+
if (GOOD_NEWS_KINDS.has(kind)) return { accent: "all clear", color: "#A8FF53" };
82+
if (kind === "error_recurrence") return { accent: "needs your attention", color: "#F87171" };
83+
return { accent: "condition met", color: "#D7D9DD" };
8684
}
8785

8886
export default function Email(props: AlertDashboardAgentWatchEmailProps) {
@@ -119,14 +117,10 @@ export default function Email(props: AlertDashboardAgentWatchEmailProps) {
119117
/>
120118
</Section>
121119
<Section>
122-
<Text
123-
className="text-[13px] font-semibold uppercase tracking-wide mb-0 mt-[30px]"
124-
style={{ color: outcome.color }}
125-
>
126-
{outcome.text}
127-
</Text>
128-
<Heading className="text-[#D7D9DD] text-[30px] font-normal leading-[35px] p-0 mt-[8px] mb-[30px] mx-0">
129-
Your watch fired: <strong className="text-[#A8FF53]">{kind}</strong>
120+
{/* The chat's wake banner IS the headline: the outcome first,
121+
toned — the details line below carries the watch identity. */}
122+
<Heading className="text-[#D7D9DD] text-[30px] font-normal leading-[35px] p-0 my-[30px] mx-0">
123+
Watch update — <strong style={{ color: outcome.color }}>{outcome.accent}</strong>
130124
</Heading>
131125
<Text className="text-[#D7D9DD] text-[16px] leading-[24px]">
132126
I was keeping an eye on {project} ({environment}) for you, and this just fired at{" "}

internal-packages/emails/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class EmailClient {
135135
}
136136
case "alert-dashboard-agent-watch": {
137137
return {
138-
subject: `[${data.organization}] Your watch fired: ${data.identity}`,
138+
subject: `[${data.organization}] Watch update: ${data.identity}`,
139139
component: <AlertDashboardAgentWatchEmail {...data} />,
140140
};
141141
}

0 commit comments

Comments
 (0)