Skip to content

chore(case-email-integration): re-point to email leaf per ADR-022#608

Merged
rubenvdlinde merged 1 commit into
developmentfrom
chore/intercept-case-email-to-leaf
May 25, 2026
Merged

chore(case-email-integration): re-point to email leaf per ADR-022#608
rubenvdlinde merged 1 commit into
developmentfrom
chore/intercept-case-email-to-leaf

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

Summary

Intercepts the not-yet-implemented case-email-integration OpenSpec change so it consumes the OpenRegister email integration leaf (NC Mail; id email, group comms, storage link-table) for all email display, compose, link, and unlink — instead of building a bespoke IMAP poller / SMTP composer / threading UI. Artifacts only; no code.

Per hydra ADR-022 ("integrate, don't build") + ADR-019 (integration registry) + ADR-024 (app manifest). The email leaf is link-only (NC Mail owns compose/send) and ships a sidebar tab + CnEmailCard widget surfaced on the case detail page.

Re-pointed to the leaf (removed from the change)

  • emailMessage / emailThread schemas (linked emails live in the leaf link-table)
  • CaseEmailService send/transport, SMTP send config, test-smtp
  • EmailComposer.vue, EmailThread.vue, EmailTab.vue, UnlinkedQueue.vue
  • POST/GET /api/cases/{caseId}/emails, /api/emails/unlinked, .../link, .../discard

Display = leaf tab + CnEmailCard; compose = NC Mail; link = leaf POST /api/objects/{register}/{schema}/{id}/email.

Kept in-app as leaf extensions (no leaf equivalent)

  • emailTemplate schema + EmailTemplateService versioning + Dutch defaults — per-zaaktype templating that prefills an NC Mail draft (no procest send path).
  • Email → PDF → caseDocument archival + retry job — Archiefwet / ZGW informatieobject compliance; the leaf does not archive.

Documented ADR-022 exception

InboundEmailJob polls a shared/functional mailbox (zaken@gemeente.nl) that has no per-user NC Mail account owner — the link-only leaf cannot ingest it unattended (requiresPermission() → null; per-user access only). The poller is scoped strictly to ingest + case-number subject auto-link, recording every link through the leaf endpoint. Justified in new openspec/architecture/adr-002-shared-mailbox-poller-exception.md (references ADR-022 § Exceptions clause 1, with a sunset/migration clause).

Validation

openspec validate case-email-integration --strictvalid.

🤖 Generated with Claude Code

Intercept the not-yet-implemented case-email-integration change so it
consumes the OpenRegister `email` integration leaf (NC Mail; id `email`,
group `comms`, storage `link-table`) for all email display, compose, link
and unlink — rather than building a bespoke mail client.

Re-pointed to the leaf (display + compose + link):
- emailMessage/emailThread schemas, CaseEmailService send/transport,
  EmailComposer.vue, EmailThread.vue, EmailTab.vue, UnlinkedQueue.vue,
  SMTP send config and send/list/link/unlink endpoints — all removed.
  Display/widget via the leaf tab + CnEmailCard on the `case` detail page
  (ADR-019/ADR-024); compose in NC Mail; link via the leaf's
  POST /api/objects/{register}/{schema}/{id}/email.

Kept in-app as leaf extensions (no leaf equivalent):
- emailTemplate schema + EmailTemplateService versioning + Dutch defaults
  (per-zaaktype templating; prefills an NC Mail draft).
- Email -> PDF -> caseDocument archival + retry (Archiefwet/ZGW).

Documented ADR-022 exception:
- InboundEmailJob polls a shared/functional mailbox (owner-less, so the
  link-only leaf cannot ingest it) and auto-links by case-number subject
  regex, recording links through the leaf endpoint. Justified in new
  openspec/architecture/adr-002-shared-mailbox-poller-exception.md.

openspec validate case-email-integration --strict: valid.
@rubenvdlinde rubenvdlinde requested a review from Rem-Dam as a code owner May 25, 2026 21:51
@github-actions
Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ 05e6041

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer
npm ✅ 326/326
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-05-25 21:52 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde rubenvdlinde merged commit 490592c into development May 25, 2026
15 of 24 checks passed
@rubenvdlinde rubenvdlinde deleted the chore/intercept-case-email-to-leaf branch May 25, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant