Event-type modal filter: cross-cutting jurisdiction sub-entries don't narrow when court system is selected #97
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 15:17)
In the event-type selection modal (artemis's t-paliad-251 / m/paliad#82 Part 1), with the UPC court-system filter active, picking "Re-establishment of Rights" still surfaces all 5 cross-cutting jurisdictions:
The TOP-LEVEL filter narrows which events show in the list, but once an event is rendered, its cross-cutting jurisdiction sub-rows ignore the active filter. They should be filtered too.
What to do
frontend/src/client/event-types.tsor a similar event-type modal component — same file artemis touched for #82 Part 1).legal_sourcematches UPC RoP / UPC Agreement (e.g.UPC R.320).PatG §123(DPMA national).EPC Art.122/EPÜ Art.122.ZPO §233.UPC→ UPC, containsEPC/EPÜ→ EPO,PatG→ DPMA,ZPO→ DE-national). Pick the cleanest rule.Files most likely touched
frontend/src/client/event-types.ts— event-type modal render + filter logicfrontend/src/client/deadlines-new.ts(if the modal lives here)Hard rules
go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/eventtype-filter-cross-cutting.Out of scope
paliad.deadline_rulesif the inference rule (legal_source → court_system) suffices.Reporting
mai report completedwith branch + SHAs + UX path: open event-type modal → enable UPC filter → open Re-establishment of Rights → confirm only UPC R.320 sub-row is visible. Repeat for DPMA / EPO / DE filters.t-paliad-266 — cross-cutting trigger pills narrow by forum chip ✅
Shipped on
mai/hermes/gitster-event-type-modal@ 24f3baf.What changed
Backend —
DeadlineSearchServiceForumToLegalSourcePrefixesmap (10 forum buckets → structured legal-source prefixes), paralleling the existingForumToProceedingCodes. Rule pills still narrow byproceeding_code; trigger pills now narrow bylegal_source LIKE prefix.Searchplumbs a parallelforumLegalPrefixesslice throughbrowseRanks/rankConcepts/loadPills. The SQL forum-filter clause splits ons.kind:rule→proceeding_code = ANY($forum_codes)(unchanged contract).trigger→EXISTS(unnest($legal_prefixes) lp WHERE s.legal_source LIKE lp || '%'), or unfiltered when no prefix mapping for the active forums.forum_codesshort-circuits the clause to TRUE for both pill kinds, so all cross-cutting pills stay visible.Inference rule (per m's hint on the issue)
upc_cfi,upc_coaUPC.de_lg,de_olg,de_bghDE.ZPO.de_bpatgDE.PatG.dpmaDE.PatG.epa_grant,epa_opp,epa_appealEU.EPC,EU.EPÜMulti-chip selection unions the prefix allow-list (e.g.
upc_cfi + de_lg→ triggers under eitherUPC.*orDE.ZPO.*). Matches the brief's hard rule (no-filter = all; multi-filter = union).Migration 123 (
123_cross_cutting_filter_legal_source.up.sql)deadline_rulesrow for trigger 207 (UPC R.320 Wiedereinsetzung). Mig 063 added thetrigger_eventbut never seeded itsevent_deadlinescounterpart; mig 092 then droppedevent_deadlinesafter copying the four sibling Wiedereinsetzungen (200..203) intodeadline_rules, leaving 207 orphaned with noduration/legal_source. Backfill values mirror the four siblings (2 months,party='both',legal_source='UPC.RoP.320',lifecycle_state='published').paliad.deadline_searchrecreated with aLEFT JOIN paliad.deadline_rules dr_trig ON dr_trig.trigger_event_id = te.id AND dr_trig.proceeding_type_id IS NULLso trigger rows now surfacedr_trig.legal_sourceinstead of NULL. All indexes from mig 098 reproduced verbatim.RefreshSearchViewruns on the next server boot percmd/server/main.go, so the new column populates as soon as the deploy restarts.Verified against the youpc Supabase
Simulated the post-mig-123 state via
mcp__supabase__execute_sql— hypothetical-data query confirms:Matches m's spec on the issue exactly.
Test coverage
Live-DB golden table (
deadline_search_service_test.go) gains:forum filter narrows Wiedereinsetzung trigger pills by court system— 10-case matrix covering every forum chip × expectedtrigger_event_idset.multiple forum chips union the legal_source allow-list for triggers—upc_cfi + de_lg→ {201, 207}.empty forum filter leaves cross-cutting pills untouched— regression guard for the no-filter contract.The existing 4-pill assertion bumped to 5 (the {200..203} set inherits trigger 207 from mig 063, irrespective of this PR).
Build status
go build ./...cleango vet ./...cleango test ./internal/...clean (live-DB tests skip withoutTEST_DATABASE_URL)cd frontend && bun run buildclean (2801 i18n keys unchanged)No frontend changes — the chip cluster already lives in
fristenrechner.ts(#fristen-forum-chips) and the API contract is unchanged; the backend filter now does the work.UX path after deploy
/tools/fristenrechner.Wiedereinsetzung→ concept card shows onlyRemoval of obstacle (UPC R.320) — both sides.Hard rules honoured
cardinality = 0short-circuit).translateForumsToLegalSourcePrefixes).qparameter).mai/<worker>/eventtype-filter-cross-cuttingpattern (named for hermes' worker session).Out of scope / follow-ups
court_systemcolumn added topaliad.deadline_rules— thelegal_sourceinference rule sufficed.EventDeadlineService.Calculatebecause trigger 207 has adeadline_rulesrow. Until now it was a search-only stub.Commit:
24f3baf61fProd impact (precise) — what each forum chip lost, m/paliad#97
Before mig 182, in the Fristensuche, selecting any court-system chip made every Wiedereinsetzung trigger pill carry
legal_source = NULL, so thelegal_source LIKE prefix||'%'forum filter dropped them:de_lg/de_olg/de_bgh(ZPO §233 → te 201)de_bpatg(PatG §123 → te 200, 203)dpma(PatG §123 → te 200, 203)epa_grant/epa_opp/epa_appeal(EPC → te 202)upc_cfi/upc_coa(UPC → te 207)So: every court-system filter in the Fristensuche silently lost the cross-cutting Wiedereinsetzung card (UPC chips saw a misleading single-jurisdiction remnant). A lawyer narrowing by court system lost the Wiedereinsetzung/Re-establishment guidance entirely.
After mig 182 all 5 trigger pills carry their citation (
DE.PatG.123.2,DE.ZPO.234.1,EU.EPC-R.136.1,DE.PatG.123.2,UPC.RoP.320) and each chip narrows to exactly the expected trigger(s); the stray rule pill is gone. Fix is data+matview only — no Go/frontend change. Verified on a freshmake db-test-upseed via the migration runner, plus a down/up round-trip.Branch
mai/brunel/live-bug-m-paliad-97· commit 8b4dc21. Head merges. Only the separate §82 search-miss (t-paliad-fristensuche-82-search) keepsTestDeadlineSearchred.