Submissions demo template: variables missing — investigate t-paliad-241 + extend #84
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 13:12)
Context — what should already be there
t-paliad-241 (commit
1f7de99, completed via ritchie 2026-05-22) was supposed to ship a demode.inf.lg.erwidg.docxtemplate with the full{{...}}placeholder set covering every variableSubmissionVarsServiceresolves. m is reporting that on paliad.de, opening the Submissions editor still shows no variables.Four possible causes — investigate in order:
m/mWorkRepoat the expected path, OR the paliad.de container hasn't picked up a fresh fileRegistry binary, OR the Gitea proxy auth is failing for the per-firm template path.internal/handlers/files.goregistry key may not match the submission_code the editor passes in.What to do (fixer)
Phase 1 — Diagnose
1f7de99to see exactly what ritchie shipped. Check the .docx bytes in m/mWorkRepo (likely path:6 - material/Templates/Word/Paliad/HLC/de.inf.lg.erwidg.docx— verify from the commit).de.inf.lg.erwidg. Inspect the editor sidebar (DOM). Variables present? None?word/document.xml, search for{{. Are the placeholders there as contiguous text or split across<w:r>runs?lukasjarosch/go-docxhandles it; the current code may not.Phase 2 — Fix
The fix depends on which cause root applies:
lukasjarosch/go-docxis already a dep (per the original design proposal), use it for enumeration. If not, add it (this is a meaningful dependency — flag for m via head before adding) OR write a minimal run-stitching pass before regex scan.Phase 3 — Extend
After the demo template is verifiably showing variables in the editor:
SubmissionVarsServiceto confirm the FULL variable list (every key it produces). m's ask: "Add all the variables so we can try it out".Files most likely touched
internal/handlers/files.go— fileRegistry / template lookupinternal/services/submission_render.goorsubmission_vars.go— variable extractioninternal/services/submission_templates.go— template fallback chainfrontend/src/submission-draft.tsx+ client — sidebar render of variable list (if frontend is the bug surface)Hard rules
de.inf.lg.erwidg.docx.lukasjarosch/go-docx), STOP and ask the head before adding it. Head will escalate to m.go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/demo-template-variables-debug.Out of scope
de.inf.lg.erwidg— one is enough to demonstrate the system.Reporting
mai report completedwith branch + SHAs + the diagnosed root cause (Phases 1+2 findings) + the final variable inventory exercised by the template + verification path on paliad.de (open project → Schriftsätze → Bearbeiten onde.inf.lg.erwidg→ sidebar lists every variable + preview shows them substituted with project data).