feat(site): tighten proof, contact, and inquiry delivery

Lead with Batch on the home page, drop the product changelog, add a
domain note, and stop reporting success when SMTP fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jan Wagner
2026-08-16 11:12:40 +02:00
co-authored by Cursor
parent aa55c29dbf
commit 0482b780f4
23 changed files with 465 additions and 84 deletions
+53
View File
@@ -0,0 +1,53 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import { deliverInquiry } from "./deliver.ts";
import type { Inquiry } from "./schema.ts";
const inquiry: Inquiry = {
name: "Anna Müller",
email: "anna@example.com",
message: "Wir brauchen eine belastbare Abbildung unseres Satzprozesses.",
locale: "de",
topic: "process",
};
describe("deliverInquiry", () => {
it("saves and succeeds when mail is sent", async () => {
const saved: Inquiry[] = [];
const result = await deliverInquiry(inquiry, {
save: (item) => {
saved.push(item);
return "id-1";
},
send: async () => true,
});
assert.deepEqual(result, { ok: true });
assert.equal(saved.length, 1);
});
it("does not report success when mail fails after save", async () => {
let saved = false;
const result = await deliverInquiry(inquiry, {
save: () => {
saved = true;
return "id-2";
},
send: async () => false,
});
assert.equal(saved, true);
assert.deepEqual(result, { ok: false, code: "delivery" });
});
it("returns error when save throws", async () => {
const result = await deliverInquiry(inquiry, {
save: () => {
throw new Error("disk");
},
send: async () => true,
});
assert.deepEqual(result, { ok: false, code: "error" });
});
});