Submission generator: form revision — drop 'Frist' block from output, group sections, add multi-party picker with Add Party + DB selection #119

Open
opened 2026-05-26 07:23:48 +00:00 by mAi · 0 comments
Collaborator

m's report (2026-05-26 09:23)

[a sample Frist block showing inside a submission preview]
Frist
Frist-Bezeichnung: [KEIN WERT: deadline.title]
Fälligkeit: [KEIN WERT: deadline.due_date_long_de] ([KEIN WERT: deadline.due_date])
Ursprüngliche Frist: asaa
Berechnet aus: [KEIN WERT: deadline.computed_from] · Quelle: [KEIN WERT: deadline.source]

This "Frist area" does not need to be part of any submission - it is only for us (if even)... usually we dont need it at all.

Generally I want to revise the form area so it is well grouped and we have clear sections. The "Parties" section needs to be revised - we should be able to add more parties and define their roles from a selection; of course pre-filled where we do this for a specific project. But a Add Party option for both sides would be good. And then enter manual or select from our db.

Scope — three connected concerns

A. Drop the 'Frist' block from rendered submission output

The {{deadline.*}} block (title, due_date, computed_from, source) currently renders inside the merged template body. It's internal/admin context — never belongs in a submission to court.

Fix: either

  1. Remove the Frist block from the universal _skeleton.docx and _hl-skeleton.docx (the templates knuth + brunel authored last session) — variables stay resolvable in the bag but no template renders them by default.
  2. OR: keep the block but render it ONLY in the editor preview (visible to the lawyer), STRIP it from the .docx export.

(R) = 1 — simplest. The variables stay in the bag for any future template that wants them; the default skeletons don't include them in the body.

B. Group the form into clear sections

Reorganise the variable-editor sidebar with clear section headers. Suggested grouping (coder refines):

  • Mandant / Verfahrenfirm.name, project.case_number, project.court, project.patent_number, procedural_event.name, procedural_event.legal_source
  • Parteien (see (C))
  • Frist (collapsed by default, only-for-us; resolved bag values shown) — deadline.* block
  • Sonstigestoday, user.*, anything not in the above groups

C. Improved Parties section — multi-party + Add Party + DB lookup

artemis #109 shipped the party multi-select for parties already on the project. m wants to extend:

  1. Add Party button (one per side: Claimant / Defendant) — opens a small inline form OR modal:
    • Manual entry: name, role, address
    • OR pick from a global / firm-wide party DB (if one exists — likely paliad.parties rows on OTHER projects, browsable + filterable)
  2. When picked from DB → links to the existing paliad.parties row (no duplicate row).
  3. When entered manually → creates a fresh paliad.parties row attached to this project, immediately available.
  4. Pre-fill when the project has parties (current artemis #109 behavior).
  5. Role selector per added party (claimant/defendant/intervenor/patentee/etc.) — drives which {{party.<role>.*}} placeholder maps to that party.

Files most likely touched

  • Templates: scripts/gen-skeleton-submission-template/main.go, scripts/gen-hl-skeleton-template/main.go (regenerate without the Frist block)
  • Frontend: frontend/src/submission-draft.tsx, frontend/src/client/submission-draft.ts — section grouping + party Add/DB picker
  • Backend: internal/services/submission_vars.go (no change to the bag), internal/services/parties_service.go (or similar) — new endpoint GET /api/parties/search?q=... for the DB picker if not present
  • New: a small party-search-modal component
  • frontend/src/client/i18n.ts + frontend/src/i18n-keys.ts
  • frontend/src/styles/global.css — section header styling

Hard rules

  • Backward compat: existing drafts continue to render. The Frist block disappears from outputs because the templates no longer reference those placeholders, but the bag keeps the values.
  • Don't lose artemis #109's selected_parties array — extend it to support the new "added in this draft" parties.
  • Manual party entry creates a real paliad.parties row (not a draft-local pseudo-party) so the data integrates with project's other surfaces.
  • go build ./... && go test ./internal/... && cd frontend && bun run build clean.
  • Branch: mai/<worker>/submission-form-revise.

Out of scope

  • Party role validation rules (lawyer's call on what role each party plays).
  • Cross-firm party sharing.
  • Multi-language party names.

Reporting

mai report completed with branch + SHAs + UX path: open a draft → confirm Frist block no longer in preview/export → sections visible (Mandant, Parteien, Sonstiges) → click Add Party on Klägerseite → search the DB OR enter manually → confirm new party appears in the bag.

## m's report (2026-05-26 09:23) > [a sample Frist block showing inside a submission preview] > Frist > Frist-Bezeichnung: [KEIN WERT: deadline.title] > Fälligkeit: [KEIN WERT: deadline.due_date_long_de] ([KEIN WERT: deadline.due_date]) > Ursprüngliche Frist: asaa > Berechnet aus: [KEIN WERT: deadline.computed_from] · Quelle: [KEIN WERT: deadline.source] > > This "Frist area" does not need to be part of any submission - it is only for us (if even)... usually we dont need it at all. > > Generally I want to revise the form area so it is well grouped and we have clear sections. The "Parties" section needs to be revised - we should be able to add more parties and define their roles from a selection; of course pre-filled where we do this for a specific project. But a Add Party option for both sides would be good. And then enter manual or select from our db. ## Scope — three connected concerns ### A. Drop the 'Frist' block from rendered submission output The `{{deadline.*}}` block (title, due_date, computed_from, source) currently renders inside the merged template body. It's internal/admin context — never belongs in a submission to court. Fix: either 1. **Remove the Frist block from the universal `_skeleton.docx` and `_hl-skeleton.docx`** (the templates knuth + brunel authored last session) — variables stay resolvable in the bag but no template renders them by default. 2. **OR**: keep the block but render it ONLY in the editor preview (visible to the lawyer), STRIP it from the .docx export. **(R) = 1** — simplest. The variables stay in the bag for any future template that wants them; the default skeletons don't include them in the body. ### B. Group the form into clear sections Reorganise the variable-editor sidebar with clear section headers. Suggested grouping (coder refines): - **Mandant / Verfahren** — `firm.name`, `project.case_number`, `project.court`, `project.patent_number`, `procedural_event.name`, `procedural_event.legal_source` - **Parteien** (see (C)) - **Frist** (collapsed by default, only-for-us; resolved bag values shown) — `deadline.*` block - **Sonstiges** — `today`, `user.*`, anything not in the above groups ### C. Improved Parties section — multi-party + Add Party + DB lookup artemis #109 shipped the party multi-select for parties **already on the project**. m wants to extend: 1. **Add Party** button (one per side: Claimant / Defendant) — opens a small inline form OR modal: - Manual entry: name, role, address - OR pick from a global / firm-wide party DB (if one exists — likely `paliad.parties` rows on OTHER projects, browsable + filterable) 2. When picked from DB → links to the existing `paliad.parties` row (no duplicate row). 3. When entered manually → creates a fresh `paliad.parties` row attached to this project, immediately available. 4. Pre-fill when the project has parties (current artemis #109 behavior). 5. Role selector per added party (claimant/defendant/intervenor/patentee/etc.) — drives which `{{party.<role>.*}}` placeholder maps to that party. ## Files most likely touched - Templates: `scripts/gen-skeleton-submission-template/main.go`, `scripts/gen-hl-skeleton-template/main.go` (regenerate without the Frist block) - Frontend: `frontend/src/submission-draft.tsx`, `frontend/src/client/submission-draft.ts` — section grouping + party Add/DB picker - Backend: `internal/services/submission_vars.go` (no change to the bag), `internal/services/parties_service.go` (or similar) — new endpoint `GET /api/parties/search?q=...` for the DB picker if not present - New: a small party-search-modal component - `frontend/src/client/i18n.ts` + `frontend/src/i18n-keys.ts` - `frontend/src/styles/global.css` — section header styling ## Hard rules - **Backward compat**: existing drafts continue to render. The Frist block disappears from outputs because the templates no longer reference those placeholders, but the bag keeps the values. - **Don't lose artemis #109's selected_parties array** — extend it to support the new "added in this draft" parties. - Manual party entry creates a real `paliad.parties` row (not a draft-local pseudo-party) so the data integrates with project's other surfaces. - `go build ./... && go test ./internal/... && cd frontend && bun run build` clean. - Branch: `mai/<worker>/submission-form-revise`. ## Out of scope - Party role validation rules (lawyer's call on what role each party plays). - Cross-firm party sharing. - Multi-language party names. ## Reporting `mai report completed` with branch + SHAs + UX path: open a draft → confirm Frist block no longer in preview/export → sections visible (Mandant, Parteien, Sonstiges) → click Add Party on Klägerseite → search the DB OR enter manually → confirm new party appears in the bag.
mAi self-assigned this 2026-05-26 07:23:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: m/paliad#119
No description provided.