Rework balances around per-parent days left and deduce the partner from FK

Manual entry now takes one parent's sjukpenningnivå, lägstanivå and
dubbeldagar left (plus optional reserved days) and derives the rest in
build_snapshot, shared with the scraper. The scraper also reads the
family panel and exposes a partner deduction; with two parents it is
saved as a 'deduced' snapshot (migration 002). Parent count is the single
source of entitlement: one member gets 480 days and 96 savable at age 4,
two get 240 and 48 each. Workspaces are capped at two parents.

Also lands the in-flight squash of migrations 002–011 into the initial
schema and the removal of planning_mode.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 12:27:29 +02:00
parent 375bc64f2f
commit e4719cb9ae
71 changed files with 5705 additions and 1859 deletions
+4
View File
@@ -19,6 +19,8 @@ against Försäkringskassan before a number is written down.
**Why it matters:** the app silently halves a real user's entitlement.
**Update (2026-09-19):** Addressed. One member = sole parent (480 days, 96 savable at age 4); two members = 240 each (48 savable at age 4 per parent). Entitlement follows parent count, and onboarding asks explicitly ("Bara jag" / "Vi är två föräldrar").
## 2. Multi-child is half-built
The tips engine now runs per child. The rest does not really. `TipsContext` was single-child until
@@ -72,6 +74,8 @@ ordering still front-loads the friction.
**Suggestion:** consider letting the user reach a working calendar first and prompting for real
balances once they have a plan worth making accurate. Worth an A/B if this ever gets real users.
**Update (2026-09-19):** Step 3 now presents per-parent cards (one or two, depending on household size) with a "Klar" (Done) button that is always enabled, letting the user advance without entering data first. Skip copy was corrected.
## 7. Vacation is modelled more thinly than parental leave
Parental-leave days have tiers, reserved portions, transferability, dubbeldagar and an age-4