Deadline form overhaul: event-type modal search/filters, type→rule autofill, Auto mode, default-title button #82
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 reports (2026-05-25 12:56, 12:58, 12:59, 13:10)
Four related remarks, all touching the Create/Edit Deadline form. Bundled into one issue to avoid worker overlap.
Remark A — Event-type modal needs search + filters (12:56)
(Sample list pasted included
Application for cost decision(UPC),Application to amend the patent(UPC),Counterclaim for Infringement(UPC),Defence to revocation(UPC),Notice of Appeal (EPO)(EPA),Notice of Opposition (EPO)(EPA),Appeal (DPMA)(DPMA),Opposition (DPMA)— court-type axis is clearly DPMA / UPC / EPA / …)Remark B — Type → Rule auto-fill (12:58)
Remark C — Type/Rule clarity + "Auto" mode (12:59)
Remark D — Default-title button (13:10)
Scope
Part 1 — Event-type selection modal
Part 2 — Type → Rule auto-fill
paliad.deadline_rules WHERE event_type = ... AND is_default = true(or 1:1 by FK — verify schema). If nois_defaultcolumn exists, surface this in the design and propose a column or a convention.sequence/ordinalcolumn onpaliad.deadline_rulesper proceeding-type, OR reuse whatever the projection service already uses for column placement.Part 3 — Type/Rule contradiction copy + "Auto" option
Current state shows:
Note: type contradicts rule — you have overridden the type.Fix:
Part 4 — Default-title button
Files most likely touched
frontend/src/deadlines.tsx+ client (create/edit form components)frontend/src/client/deadlines.tsorfrontend/src/client/event-form.ts— type modalfrontend/src/client/i18n.ts— new keys for Auto, Standardtitel, filter labelsinternal/handlers/deadlines.go— only if Auto-mode serialization needs a backend hookis_defaultflag onpaliad.deadline_rulesOR document why the convention (e.g. one rule per event_type marked otherwise) sufficesHard rules
go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/deadline-form-overhaul.Out of scope
Reporting
mai report completedwith branch + SHAs + the UX path for each Part (A: open form → click Type → search/filter modal works; B: pick Type → Rule auto-fills + sort options visible; C: explicit Auto badge + clearer override copy; D: click Standardtitel → field fills with formatted default).Done — branch
mai/artemis/gitster-deadline-formAll four parts shipped in one commit:
8caaf6aNo schema migration; no new endpoint. All changes are client-side / CSS / i18n + two small TSX edits. Reuses
paliad.deadline_concept_event_types(mig 072 / 074) — the existing concept→event_type mapping is just inverted to power Type→Rule.Part A — Event-type modal: search + court filter chips
UX path. /deadlines/new → Typ field → click "Alle anzeigen" → modal opens with search input (autofocus) + chip row underneath (Alle Gerichte / UPC / EPA / DPMA / DE / Allgemein). Click a chip → list narrows. Search + chip filters intersect. Empty categories hide via the existing render path.
Touch.
frontend/src/client/event-types.ts(openBrowseEventTypesModal),frontend/src/styles/global.css(.event-type-browse-chips,.event-type-browse-chip{,--active}). Chip jurisdictions are derived from the live data; any new flavour the admin adds lands at the end of the row automatically.Part B — Type → Rule auto-fill + sort options
UX path. /deadlines/new → pick a Typ chip → Regel select auto-fills with the derived rule. Resolution: (1) exact match on project's
proceeding_type_idif known, (2) jurisdiction match (EPA→EPO canon), (3) first candidate. Sort dropdown next to the Regel label switches between by Verfahrensablauf / by Gerichtsart (default) / alphabetisch. Sort preference persisted inlocalStorageper browser.No new endpoint. Inversion is done in the client over the existing
/api/deadline-rulespayload — the rule already carriesconcept_default_event_type_id. "By Verfahrensablauf" groups by proceeding-type (sorted byproceeding_types.sort_order) and orders within byrule.sequence_order— same order the calculator emits, so the user reads it chronologically.Touch.
frontend/src/client/deadlines-new.ts(new functions:resolveAutoRuleForType,applyTypeAutoFillRule,renderRuleSelect),frontend/src/deadlines-new.tsx(sort dropdown),loadProceedingTypes()hits the existing/api/proceeding-types-db.Part C — Auto rule mode + clearer override warning
UX path. Type picked → Regel select fills with the derived rule, AND a lime-tint Auto badge appears beneath:
[Auto] — RoP.023 — Klageerwiderung. Manual rule pick → badge disappears immediately. If the manually-picked rule contradicts the type-derived one, a yellow warning surfaces that names BOTH:"Typ ergibt Regel: <X>. Gewählte Regel: <Y>. Es wird <Y> angewendet."Discriminator. Symmetric
lastAutoFilledRuleIDsticky-replace flag mirrors the existinglastAutoFilledEventTypeID(t-paliad-165) — auto-fill only replaces its own previous suggestion, never a manual pick. Edge case: when Rule is auto-derived from Type, the existing collapsed Typ view ("Klageerwiderung (vorgegeben durch Regel)") is suppressed — it reads backwards in that direction.Touch.
frontend/src/client/deadlines-new.ts(refreshRuleAutoBadgeAndWarning),frontend/src/deadlines-new.tsx(auto-hint + override-warn slots),frontend/src/styles/global.css(.form-hint--auto,.form-hint-badge).Part D — Standardtitel button
UX path. /deadlines/new → click "Standardtitel" next to the Titel label → field fills with derived default. /deadlines/{id} → enter edit mode → "Standardtitel" button appears under the title input → click to fill. No destructive confirmation because the user invoked it explicitly.
Recipe (documented here + in the commit so future templates can mirror it):
Examples:
Klageerwiderung — C-UPC-0042— type knownRoP.023 — Klageerwiderung — REF— rule known, no typeUPC — Verletzungsverfahren — REF— only proceeding typeNeue Frist — REF— fallbackTouch.
frontend/src/client/deadlines-new.ts(computeDefaultTitle),frontend/src/client/deadlines-detail.ts(edit-mode handler with show/hide on enter/exit),frontend/src/deadlines-new.tsx+frontend/src/deadlines-detail.tsx(button slots),frontend/src/styles/global.css(.btn-link-action,.form-field-label-row).Build hygiene
go build ./...cleango vet ./...cleango test ./internal/...cleancd frontend && bun run buildclean (2786 keys, +10 new DE+EN, no scan warnings)i18n keys added (DE + EN)
Out of scope (intentionally)
paliad.deadline_concept_event_typesjunction.Ready for maria's review + merge. Awaiting head merge gate.