Mail relay: state block without an import-map entry, e2e on the reference site, sharper failure reports

- the state block is rendered by IntegrationStatusBanner (no new admin component: generate:importmap gives no diff)
- reference site: e2e/mail-relay.spec.ts with a fixture and setup script; e2e:built runs it with both bundlers
- a failed enrolment is reported as what it was; the service's own refusal after a fresh enrolment
- a message keeps its key after any failure that is not final
- a local site is shown as refused in the panel before any e-mail

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-25 21:14:47 +01:00
co-authored by Claude Fable 5.2
parent dd3792cbc7
commit 2cceceffd0
29 changed files with 1461 additions and 65 deletions
+2 -2
View File
@@ -1262,8 +1262,8 @@ export default buildConfig({
})
```
Then `pnpm generate:importmap` (the e-mail tab has a new component, `@intecion/ipal-kit/admin#MailRelayStatus`).
No env variable, no key, no field to fill in. **Do not** add `nodemailer`, `resend`, an `api/send` route or a
No env variable, no key, no field to fill in, no import-map change (the tab's state block rides on the status
banner that is already in every import map). **Do not** add `nodemailer`, `resend`, an `api/send` route or a
`GRAPH_*` variable to a project.
**How a send is routed** (`resolveMailTransport`, type `MailTransport`): Microsoft Graph when the panel says so and
-1
View File
@@ -114,7 +114,6 @@ through this procedure. Ask only when you are missing something you cannot get y
| replies to the site's mail are lost | "Sender address" is empty: the service's own address has no mailbox | fill it in (doctor: `mail-reply-address`) |
| the site enrols again and again (`reverify` in the log) | requests leave from many changing addresses (serverless, a pool of egress addresses) | Intecion raises the site's limit of server addresses, or SMTP |
| start log: "Microsoft Graph as the e-mail transport is deprecated" | `GRAPH_*` is set | email.md "Moving off Microsoft Graph"; silence only: `mail: { graphDeprecationWarning: false }` |
| the e-mail tab shows a blank where "How e-mails are sent" should be | stale import map | `pnpm payload generate:importmap`, commit, redeploy |
| old email sender | mail client cache | check the raw headers |
| form: `unknown_fields` | field outside the definition (honeypot not removed) | `iapl-form` → actions.ts |
| an account logs in to `/admin` and sees "Unauthorized" (its API calls still work) | `accounts.panelRole`: the panel opens for `editor` and above; the account has only `user`, or no role | give it `editor` (an admin edits the account), or `accounts: { panelRole: 'user' }`; nobody can get in: a script with the Local API sets `roles: ['admin']`, or `accounts: { panelRole: false }` + redeploy |
+5 -6
View File
@@ -535,8 +535,8 @@ Every name from before keeps working: `ipalKit()` and the other old exports, the
`ipal-doctor.json`, `ipal-audit-skip`, the old pointer block. The package is still `@intecion/ipal-kit`; routes
`/api/ipal/*`, `--ipal-*` tokens, `data-ipal` hooks and the cookie `ipal_vid` are unchanged (AGENT.md "Names: IAPL and
ipal-kit"). **Do not rename anything in the project unless the owner asks.**
1. Update the package, `pnpm install`. The rename itself changes no option, schema, migration or import map; the mail
service of the same release adds one admin component — see the next block.
1. Update the package, `pnpm install`. No option, schema, migration or import-map change (`pnpm payload generate:importmap`
gives no diff).
2. Refresh the skills: `pnpm exec iapl-skills` (the project's `ipal:skills` script, where it has one, runs the same program). It
installs `iapl-*`, removes the 16 old `ipal-*` folders by name (a skill of the project's own named `ipal-…` stays),
and rewrites the pointer block in `AGENTS.md` in place. Commit the result. Old skill names written by hand in
@@ -553,10 +553,9 @@ ipal-kit"). **Do not rename anything in the project unless the owner asks.**
builds; the panel opens; the old commands (`pnpm exec ipal-doctor`) still run.
**→ 1.17.0, e-mail (the Intecion mail service is the default transport; Microsoft Graph deprecated; CHANGELOG 1.17.0;
PROGRAMISTA §6, item 73; email.md; AGENT.md §7.2) — one command for every site, then read which case the site is:**
1. **Every site:** `pnpm payload generate:importmap` and commit — the e-mail tab has a new component
(`@intecion/ipal-kit/admin#MailRelayStatus`); with a stale map the block "How e-mails are sent" is blank. No schema
change, no migration.
PROGRAMISTA §6, item 73; email.md; AGENT.md §7.2) — nothing to run; read which case the site is:**
1. **Every site:** no schema change, no migration, no import-map change. The e-mail tab gains the block "How e-mails
are sent" and new wording ("Automatic", "Own SMTP server").
2. **Which case** — Site integrations → E-mail sending, and the Coolify env:
- **SMTP filled in** (server, user name, password): nothing changes, the site contacts nobody. Done.
- **`GRAPH_*` set:** mail as before; one deprecation warning per start, doctor warning `mail-graph-deprecated`.