Submission generator preview still shows raw HL Patents Style .dotm — diagnose + author at least one universal placeholder template #90
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
m's report (2026-05-25 14:37)
Context
5df87f4) fixed the/generateone-click button —handleGenerateProjectSubmissionnow runsSubmissionDraftService.RenderProjectSubmission(vars.Build + renderer.Render) and respects the per-firmsubmissionTemplateRegistry.de.inf.lg.erwidg.docx) with the full 48-variable placeholder set.HL Patents Style.dotm(letterhead only, NO placeholders). So picking any non-de.inf.lg.erwidgcode still shows a bare letterhead in the preview.m's report could mean any of three things — diagnose in order:
Candidate A — deploy lag
brunel's fix landed at 12:55 local; subsequent merges (#85 #82 #83 #87 #88) may have queued Dokploy redeploys. paliad.de's container might not yet be on the fix's binary. Check:
If deploy lag, wait + re-test; no code action.
Candidate B — preview code path differs from /generate
The editor's preview pane (HTML rendered in the sidebar/main pane of the Schriftsätze draft editor) might use a different endpoint or render path than
/generate. Search:If the preview hits a different handler (e.g.
GET /api/projects/{id}/submissions/{code}/preview) that wasn't updated by t-paliad-253, fix it the same way: route it throughRenderProjectSubmission(orSubmissionDraftService.Resolve+ render-to-HTML).Candidate C — m is testing a non-
de.inf.lg.erwidgsubmissionMost likely. The fix works only where a per-submission template is wired. For ANY other code, the universal
.dotmfallback (no placeholders) is hit and the preview shows the bare letterhead — exactly what m describes.Fix: Author at least ONE more template that's universally useful as a fallback. Pick whichever of these is cleanest:
_skeleton.docx— a universal skeleton template per the existing fallback chain slot 3 (templates/_base/_skeleton.docx). Contains the firm header + every standard{{...}}placeholder block (case caption, parties, today, firm.name, project.case_number, etc.) plus a generic placeholder body ({{submission.body}}or similar). Lawyers can copy + adapt. Recommended (R) — kills the universal-no-variables case for every code without a per-submission template.HL Patents Style.dotmitself with placeholders. Risk: that file is firm-wide letterhead m's people may rely on independently. Don't do this.Default to (1) —
_skeleton.docx. Reuses brunel'sscripts/gen-demo-submission-templatescript structure to generate the bytes; commit tom/mWorkRepoat6 - material/Templates/Word/Paliad/HLC/_skeleton.docx. Verify the fallback chain ininternal/services/submission_templates.go(or wherever) actually consults this path before falling back to the universal.dotm.What to do
RenderProjectSubmissionor its sibling._skeleton.docxper (R) above so the universal-no-variables case is killed for every code. Wire it in the fallback chain.Hard rules
HL Patents Style.dotm— firm-wide letterhead._skeleton.docxexercises every variableSubmissionVarsServiceresolves (same 48-key contract brunel established).go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/preview-skeleton-template.Out of scope
Reporting
mai report completedwith branch + SHAs + which of A/B/C turned out to be the actual root cause (often multiple) + verification path on paliad.de: open any submission code that previously showed only letterhead → confirm preview now renders the skeleton with variables substituted (or the per-submission template if one exists).