#21: put real mail on the webmail screens

The mail list rendered two hardcoded messages and the reader showed their
canned HTML; compose ran a countdown and then navigated away without ever
submitting anything. Both now use the API, including search, the unread
badges in the sidebar (which were the literals "3" and "1", so an empty
inbox still advertised unread mail), and marking a message read on open.

The undo window now means what it says: the message is held in the browser
and only submitted when the countdown elapses, so cancelling it means
nothing was ever queued rather than trying to recall it afterwards.

Message bodies render in an iframe with an empty sandbox - no scripts, no
same-origin - and remote references are stripped until the reader asks for
images, so a tracking pixel cannot fire on open. The previous sandbox
allowed popups.

The admin page titles and the language switcher labels now come from the
bundles. The labels live there rather than in the source because PLAN.md
R9 keeps non-ASCII out of code, and each language should be named the way
that language names it.

ADR-001 assigned the mail API to the TypeScript storage service; the
reasoning for putting it in Go instead is recorded in PLAN.md, which
.gitignore deliberately keeps out of the repository, so that revision
lives only in the working copy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5 committed 2026-08-02 10:04:05 -03:00
1 parent 48fe3c68f3
commit 3e60852551
15 files changed
+299 -166

No files matched your search

@@ -1,6 +1,7 @@
"use client";
import React, { useState } from "react";
import { useTranslations } from "../../../../i18n/provider";
interface QueueJob {
id: string;
@@ -18,6 +19,7 @@ const INITIAL_JOBS: QueueJob[] = [
];
export default function AdminQueuePage() {
const t = useTranslations();
const [jobs, setJobs] = useState<QueueJob[]>(INITIAL_JOBS);
const [message, setMessage] = useState<string | null>(null);
@@ -34,7 +36,7 @@ export default function AdminQueuePage() {
return (
<div className="p-8 space-y-8">
<div>
<h1 className="text-2xl font-bold text-white mb-1">Outbound Delivery Queue Control</h1>
<h1 className="text-2xl font-bold text-white mb-1">{t("admin.queueTitle")}</h1>
<p className="text-xs text-slate-400">Inspect outbound queue, retry retriable jobs, or freeze problematic destinations.</p>
</div>