From 035ea7c7489d84772874329ed3fd83505607b7b3 Mon Sep 17 00:00:00 2001 From: Julien Gautier Date: Fri, 15 May 2026 18:47:14 +0200 Subject: [PATCH] fix(portal-admin): adr refs point at gitea, not the madr template repo (#152) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Two ADR references in `portal-admin` page intros (`/audit`, `/users`) linked to `https://github.com/adr/madr` — the **MADR template repository**, not our ADRs. Copy-paste artefact from the original authoring of those pages. Both anchors now resolve to the actual ADR file on Gitea, so a reviewer who clicks lands on the right document. | Page | Anchor | Was | Now | | --- | --- | --- | --- | | [audit.html](apps/portal-admin/src/app/pages/audit/audit.html) | ADR-0013 | `github.com/adr/madr` | [Gitea `0013-audit-trail-…`](https://git.unespace.com/julien/apf_portal/src/branch/main/docs/decisions/0013-audit-trail-separated-postgres-append-only.md) | | [users.html](apps/portal-admin/src/app/pages/users/users.html) | ADR-0020 | `github.com/adr/madr` | [Gitea `0020-portal-admin-app`](https://git.unespace.com/julien/apf_portal/src/branch/main/docs/decisions/0020-portal-admin-app.md) | ## Why no in-app ADR viewer A natural follow-up question — "could we render the ADRs inside portal-admin?" — was considered and **rejected** for v1: - **Audience mismatch.** ADR-0020 §"Audience is disjoint" frames portal-admin around APF internal staff doing CMS / audit / user-directory work. ADRs are dev / architecture artefacts mentioning Prisma, Redis, MSAL Node, OBO trade-offs — content that doesn't help an operator and blurs the line between "ops tool" and "internal tech doc". - **Architecture cost.** A live viewer would require a Markdown-rendering pipeline on the SPA, BFF↔filesystem coupling (or a build-time embedding that breaks the auto-update intent), inter-ADR link rewriting, and English-only fallback in an otherwise i18n-capable app. - **Better alternative exists.** If discoverability of `docs/**/*.md` becomes a real need, a separate static-site (MkDocs Material / Docusaurus / VitePress) deployed on `docs.portal.apf.fr` with a CI hook on `docs/` changes is the battle-tested path. That's the chantier slot — a separate ADR + setup, not bolt-on inside portal-admin. ## Test plan - [x] `pnpm nx run-many -t lint test build --projects=portal-admin` — clean, 50 specs pass, lazy chunks unchanged. - [ ] Visual smoke: open `/audit` and `/users` in portal-admin, click the inline ADR badge, confirm the Gitea ADR page loads in a new tab. --------- Co-authored-by: Julien Gautier Reviewed-on: https://git.unespace.com/julien/apf_portal/pulls/152 --- apps/portal-admin/src/app/pages/audit/audit.html | 10 +++++++--- apps/portal-admin/src/app/pages/users/users.html | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/portal-admin/src/app/pages/audit/audit.html b/apps/portal-admin/src/app/pages/audit/audit.html index 261f4e0..ed398b8 100644 --- a/apps/portal-admin/src/app/pages/audit/audit.html +++ b/apps/portal-admin/src/app/pages/audit/audit.html @@ -3,9 +3,13 @@

Audit log

Read-only view of audit.events per - ADR-0013. Every query - run on this page emits its own admin.audit.query row — read access is itself - auditable. + ADR-0013. Every query run on this page emits its own admin.audit.query row — read access + is itself auditable.

diff --git a/apps/portal-admin/src/app/pages/users/users.html b/apps/portal-admin/src/app/pages/users/users.html index da662ac..36ff170 100644 --- a/apps/portal-admin/src/app/pages/users/users.html +++ b/apps/portal-admin/src/app/pages/users/users.html @@ -3,9 +3,13 @@

Users

Read-only directory of every identity that has signed in to portal-shell or portal-admin per - ADR-0020. Every query - run on this page emits an admin.users.query audit row — directory access is - itself auditable. + ADR-0020. Every query run on this page emits an admin.users.query audit row — directory + access is itself auditable.