feat(fp): WP-24 — letter canvas (edit on the letter)
CI / frontend (push) Failing after 59s
CI / storybook-a11y (push) Successful in 4m22s
CI / backend (push) Successful in 1m18s
CI / codeql (csharp) (push) Failing after 1m47s
CI / codeql (javascript-typescript) (push) Failing after 1m20s
CI / api-client-drift (push) Successful in 1m42s
CI / e2e (push) Failing after 3h8m54s

One letter surface for every role: LetterCanvasComponent renders the
org template's letterhead/signature/footer around the case-type
sections, with editableRegions content|template|none. public/letter.css
is the FE⇄BE rendering contract (WP-25 inlines it verbatim).
letter-preview deleted — its read-only rendering absorbed into 'none'
mode. brief.machine.ts byte-identical; orgTemplate parses at the
adapter boundary and lives beside the machine in BriefStore.

Also fixes passage-picker multi-select (checkboxes all shared
id="undefined", so labels only toggled the first box) and keeps the
±page-break marks from drawing through canvas content.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
eho
2026-07-05 11:47:51 +02:00
co-authored by Claude Fable 5
parent 5a610c10f0
commit c07a33ee3e
19 changed files with 3270 additions and 2126 deletions
+31
View File
@@ -0,0 +1,31 @@
/**
* The organization template (Brief v2 PRD §3, WP-23/24): the SECOND template axis —
* appearance/identity per sub-organization (letterhead, footer, signature, margins).
* Orthogonal to the case-type template (sections + placeholders); the two only meet
* at render time, on the letter canvas. Server-owned: the FE renders it verbatim,
* never edits it here (the admin editor is WP-26).
*/
export interface Margins {
readonly topMm: number;
readonly rightMm: number;
readonly bottomMm: number;
readonly leftMm: number;
}
export interface OrgTemplate {
readonly subOrgId: string;
readonly orgName: string;
/** Multiline; rendered above the envelope window. */
readonly returnAddress: string;
readonly logoDocumentId?: string;
/** Multiline contact block in the footer. */
readonly footerContact: string;
readonly footerLegal: string;
readonly signatureName: string;
readonly signatureRole: string;
readonly signatureClosing: string;
readonly margins: Margins;
/** 0 = draft; n>0 = the published snapshot this letter renders with. */
readonly version: number;
}