#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

+7 -4
View File
@@ -8,10 +8,13 @@ export type Locale = (typeof LOCALES)[number];
export const DEFAULT_LOCALE: Locale = "en";
export const LOCALE_COOKIE = "lm_locale";
export const LOCALE_LABELS: Record<Locale, string> = {
en: "English",
"pt-BR": "Português (Brasil)",
es: "Español",
// The display name of each language lives in the message bundles: PLAN.md R9
// keeps non-ASCII out of the source, and a switcher should name each language
// the way that language does.
export const LOCALE_LABEL_KEYS: Record<Locale, string> = {
en: "settings.langEn",
"pt-BR": "settings.langPtBR",
es: "settings.langEs",
};
// Bundled at build time rather than fetched: these are small, needed on first