Project-level "our side" field — predefine Determinator perspective from Akte #24

Open
opened 2026-05-08 19:44:06 +00:00 by mAi · 0 comments
Collaborator

m's verbatim 2026-05-08 21:42, dogfooding the Fristenrechner Determinator: "This is not ideal. We chose a case of ours where our side should predefined - yet I can make a selection for which side we are. That can be improved."

What's missing

The Determinator's perspective chip (Slice 3c, commit 6fcf34a) lets the user pick Kläger / Beklagter / Beide. m expects that when a known Akte is selected, the chip should already be locked to the firm's known side.

Problem: paliad doesn't currently track which side the firm represents on any given project. paliad.parties.role records what role each party has (claimant / defendant / etc.) but nothing flags "this is the party we represent". The example project (C-UPC-0002 / EP9876543) has zero parties on file at all — no data to even derive from.

Proposed shape

Schema (migration 072): add paliad.projects.our_side text with check constraint IN ('claimant', 'defendant', 'court', 'both', NULL). NULL = unknown / not set, default. Idempotent (ADD COLUMN IF NOT EXISTS).

Project edit form (frontend/src/components/ProjectFormFields.tsx + client/projects-detail.ts if needed): new "Wir vertreten" select with the four options + "unbekannt / nicht gesetzt". DE+EN i18n.

Determinator integration (frontend/src/client/fristenrechner.ts): when a project is selected and our_side is set, predefine the perspective chip to that value AND show a small vorgegeben durch Akte hint above the chip strip. The user can still override (chip click), but the override is explicit. When our_side is NULL, fall back to the existing free-pick behaviour.

Project model (internal/models/models.go + internal/services/project_service.go): add OurSide *string to the Project struct + thread through Update / SELECT projections.

Hard requirements

  • Migration 072 idempotent (live tracker is at v71 — paliad has been bitten by collisions twice this week, see m/paliad#15 commits and dirac's mig 070).
  • No hour estimates anywhere.
  • Build clean (go build ./... + bun run build.ts) on every commit.
  • The free-pick UX stays available as override even when our_side is set — the hint communicates "this is the default, click to change".
  • DE+EN i18n on every new label.

Out of scope

  • Party-level "this is the party we represent" flag — separate workstream if/when the firm needs to track multiple represented parties per project (rare).
  • Auto-deriving our_side from existing party records — m might want that later, but this PR keeps the user in control.
  • Backfill for existing projects — they stay NULL until edited.

Linked

Dogfood thread on the Determinator perspective chip (Slice 3c). Filed by paliad/head from m's 2026-05-08 21:42 instruction.

m's verbatim 2026-05-08 21:42, dogfooding the Fristenrechner Determinator: "This is not ideal. We chose a case of ours where our side should predefined - yet I can make a selection for which side we are. That can be improved." ## What's missing The Determinator's perspective chip (Slice 3c, commit `6fcf34a`) lets the user pick Kläger / Beklagter / Beide. m expects that when a known Akte is selected, the chip should already be locked to the firm's known side. Problem: paliad doesn't currently track which side the firm represents on any given project. `paliad.parties.role` records what role each party has (claimant / defendant / etc.) but nothing flags "this is the party we represent". The example project (C-UPC-0002 / EP9876543) has zero parties on file at all — no data to even derive from. ## Proposed shape **Schema (migration 072)**: add `paliad.projects.our_side text` with check constraint `IN ('claimant', 'defendant', 'court', 'both', NULL)`. NULL = unknown / not set, default. Idempotent (`ADD COLUMN IF NOT EXISTS`). **Project edit form** (`frontend/src/components/ProjectFormFields.tsx` + `client/projects-detail.ts` if needed): new "Wir vertreten" select with the four options + "unbekannt / nicht gesetzt". DE+EN i18n. **Determinator integration** (`frontend/src/client/fristenrechner.ts`): when a project is selected and `our_side` is set, predefine the perspective chip to that value AND show a small `vorgegeben durch Akte` hint above the chip strip. The user can still override (chip click), but the override is explicit. When `our_side` is NULL, fall back to the existing free-pick behaviour. **Project model** (`internal/models/models.go` + `internal/services/project_service.go`): add `OurSide *string` to the Project struct + thread through Update / SELECT projections. ## Hard requirements - Migration 072 idempotent (live tracker is at v71 — paliad has been bitten by collisions twice this week, see m/paliad#15 commits and dirac's mig 070). - No hour estimates anywhere. - Build clean (`go build ./...` + `bun run build.ts`) on every commit. - The free-pick UX stays available as override even when `our_side` is set — the hint communicates "this is the default, click to change". - DE+EN i18n on every new label. ## Out of scope - Party-level "this is the party we represent" flag — separate workstream if/when the firm needs to track multiple represented parties per project (rare). - Auto-deriving `our_side` from existing party records — m might want that later, but this PR keeps the user in control. - Backfill for existing projects — they stay NULL until edited. ## Linked Dogfood thread on the Determinator perspective chip (Slice 3c). Filed by paliad/head from m's 2026-05-08 21:42 instruction.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: m/paliad#24
No description provided.