fix(fristenrechner): m/paliad#57 — cleanup (Custom labels, forward-workflow root, same-context-twice, Add prefill) #66

Open
mAi wants to merge 1 commits from mai/darwin/fristenrechner-cleanup into main
Collaborator

Closes m/paliad#57. Follow-up issue m/paliad#65 filed for the future forward-workflow tool.

Summary (4 parts)

  1. Pre-fill project on 'Add' — Pathway A Save modal + Pathway B card-calc 'Add' picker now default to the Step 1 Akte.
  2. 'Custom' prefix dropped from the four ad-hoc proceeding-type chips (UPC/DE/EPA/DPMA), both languages.
  3. 'Ich möchte etwas einreichen' hidden from the 'Was ist passiert?' picker via a HIDDEN_CASCADE_ROOTS filter in loadEventCategoryTree(). DB rows preserved for the future forward-workflow tool (m/paliad#65).
  4. Same-context-asked-twice on SoD picker — clicking a specific pill expands the calc panel with a locked Kontext: <proc — rule> caption (with ändern); clicking the card body shows the picker as primary, with the card's rule-pill list hidden via CSS while expanded. Cross-cutting trigger pills stay visible (different concept tier).

Test plan

  • go build ./... clean.
  • go test ./internal/... — all packages pass (cached).
  • bun run build clean. i18n codegen picks up two new keys (pill_picker.locked_label, pill_picker.change).
  • bun test — 73 pass, 0 fail.
  • Browser smoke — not run in CI sandbox (server needs Supabase auth env). Please verify on staging: (a) pick an Akte → Save/Add picks the Akte by default; (b) ad-hoc chips read 'UPC proceeding' etc., not 'Custom UPC proceeding'; (c) 'Was ist passiert?' picker has no Ich möchte etwas einreichen row; (d) search 'Klageerwiderung', click any single pill on the card — calc panel shows locked context, no Which context? fieldset; (e) search 'Klageerwiderung', click card body — calc panel shows picker, card's rule pills section is hidden while expanded.

Acceptance (from #57 + comment)

  • Pre-selected project stays selected through 'Add' (1).
  • No 'Custom' prefix on UPC/DE/EPA/DPMA proceeding-type labels (2).
  • 'Was ist passiert?' picker no longer offers 'Ich möchte etwas einreichen' (3).
  • Follow-up note filed for the future forward-workflow tool (m/paliad#65).
  • SoD with proceeding context already set → no second picker (4a — pill-click branch).
  • SoD without proceeding context → single picker, no preceding info block (4b — card-body-click branch, rule pills hidden via CSS).
  • Same fix applies to any other event type with multiple proceeding contexts (R.29, R.46, R.49 etc.) — the fix is structural in the card-expand flow, not SoD-specific.
Closes m/paliad#57. Follow-up issue m/paliad#65 filed for the future forward-workflow tool. ## Summary (4 parts) 1. **Pre-fill project on 'Add'** — Pathway A Save modal + Pathway B card-calc 'Add' picker now default to the Step 1 Akte. 2. **'Custom' prefix dropped** from the four ad-hoc proceeding-type chips (UPC/DE/EPA/DPMA), both languages. 3. **'Ich möchte etwas einreichen' hidden** from the 'Was ist passiert?' picker via a `HIDDEN_CASCADE_ROOTS` filter in `loadEventCategoryTree()`. DB rows preserved for the future forward-workflow tool (m/paliad#65). 4. **Same-context-asked-twice on SoD picker** — clicking a specific pill expands the calc panel with a locked `Kontext: <proc — rule>` caption (with `ändern`); clicking the card body shows the picker as primary, with the card's rule-pill list hidden via CSS while expanded. Cross-cutting trigger pills stay visible (different concept tier). ## Test plan - [x] `go build ./...` clean. - [x] `go test ./internal/...` — all packages pass (cached). - [x] `bun run build` clean. i18n codegen picks up two new keys (`pill_picker.locked_label`, `pill_picker.change`). - [x] `bun test` — 73 pass, 0 fail. - [ ] **Browser smoke** — not run in CI sandbox (server needs Supabase auth env). Please verify on staging: (a) pick an Akte → Save/Add picks the Akte by default; (b) ad-hoc chips read 'UPC proceeding' etc., not 'Custom UPC proceeding'; (c) 'Was ist passiert?' picker has no `Ich möchte etwas einreichen` row; (d) search 'Klageerwiderung', click any single pill on the card — calc panel shows locked context, no `Which context?` fieldset; (e) search 'Klageerwiderung', click card body — calc panel shows picker, card's rule pills section is hidden while expanded. ## Acceptance (from #57 + comment) - [x] Pre-selected project stays selected through 'Add' (1). - [x] No 'Custom' prefix on UPC/DE/EPA/DPMA proceeding-type labels (2). - [x] 'Was ist passiert?' picker no longer offers 'Ich möchte etwas einreichen' (3). - [x] Follow-up note filed for the future forward-workflow tool (m/paliad#65). - [x] SoD with proceeding context already set → no second picker (4a — pill-click branch). - [x] SoD without proceeding context → single picker, no preceding info block (4b — card-body-click branch, rule pills hidden via CSS). - [x] Same fix applies to any other event type with multiple proceeding contexts (R.29, R.46, R.49 etc.) — the fix is structural in the card-expand flow, not SoD-specific.
mAi added 1 commit 2026-05-20 12:41:31 +00:00
Four UX cleanups on /tools/fristenrechner per m's 2026-05-20 14:02–14:04
report:

1. **Pre-fill project on 'Add'** — when Step 1 binds an Akte, both the
   Pathway A "Save to Project" modal and the Pathway B card-calc inline
   'Add' picker now default their <select> to that project. Override
   still allowed; the picker lists all projects. New helper
   `preselectedProjectId()` reads `currentStep1Context` once so both
   surfaces stay in sync.

2. **Drop 'Custom' prefix from UPC/DE/EPA/DPMA adhoc chips** — the
   chip context already reads "oder ad-hoc, ohne Akte"; 'Custom' was
   redundant signaling. Labels become "UPC-Verfahren" /
   "UPC proceeding" (and the three sister jurisdictions).

3. **Remove 'Ich möchte etwas einreichen' from 'Was ist passiert?'** —
   the Fristenrechner is a backward-looking calc ("event happened, what
   spawns?"); the forward-workflow framing ("I want to file X") needs a
   different tool. Filter the `ich-moechte-einreichen` root subtree out
   in `loadEventCategoryTree()` (HIDDEN_CASCADE_ROOTS set) so the picker
   never offers it. DB rows preserved for the future forward-workflow
   tool, tracked in m/paliad#65.

4. **Same-context-asked-twice on Statement-of-Defence picker** —
   when the user clicks a specific rule pill on a concept card, the
   calc panel now renders a locked "Kontext: <proceeding — rule>"
   caption with an "ändern" affordance instead of re-showing the same
   five proceedings as a radio fieldset. When the user clicks the card
   body (no specific pill), the picker is still the primary surface, but
   the card's rule-pill section hides via CSS while expanded
   (`fristen-card-pills-section--rules`) so the same options aren't
   listed twice. Cross-cutting trigger pills (Wiedereinsetzung,
   Weiterbehandlung etc.) stay visible — they're conceptually
   different siblings, not the same proceeding context.
This pull request has changes conflicting with the target branch.
  • frontend/src/client/fristenrechner.ts
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin mai/darwin/fristenrechner-cleanup:mai/darwin/fristenrechner-cleanup
git checkout mai/darwin/fristenrechner-cleanup
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: m/paliad#66
No description provided.