@ikenga/pkg-mail
v0.3.0
Published
Mail — Inbox, Triage, All, Drafts over the production mail schema. No-build iframe pkg; deterministic CSS vendoring build.
Readme
@ikenga/pkg-mail
Mail domain pkg for the Ikenga desktop workspace. Surfaces Inbox / Triage / All / Drafts
views over the local ikenga.db mail schema.
Architecture
No-build srcdoc iframe pkg following the 08-pkg-retrofit-recipe.
- CSS vendored deterministically via
scripts/build.mjs(tokens → app-kit → mail residue) - Appearance mirrored from shell
<html>attrs (setupTheme verbatim from tasks) - Data via
host.dbQuery/host.dbExeconemail_messages,email_replies,email_drafts,contacts,mail_thread_state - Side-menu published via
setMenu(Inbox withis-hoton unread > 0)
Thread-state table
Migration 0042_mail_domain.sql creates mail_thread_state (STRICT, soft TEXT links to
email_messages.id). Fields: message_id, is_read, snoozed_until, tags, preview.
Performance note
fetchThreadList (list rendering) does not select body_text — full message bodies
never cross the IPC bridge for list rows. The preview column is computed SQL-side as
COALESCE(mts.preview, substr(em.body_text, 1, 160)). fetchMessage (reader path)
selects em.* and delivers the full body only when a thread is opened.
Build
pnpm install
node scripts/build.mjsDesign reference
plans/atelier-design-system/parts/screens/mail.md and fixture threads M-01..M-09.
