feat(fristenrechner): Slice S5 — flip overhaul default; legacy under ?legacy=1 (m/paliad#146)
Some checks failed
Paliad CI gate / build (push) Has been cancelled
Paliad CI gate / test-go (push) Has been cancelled
Paliad CI gate / deploy (push) Has been cancelled

`isOverhaulMode()` now returns true unless the URL carries
`?legacy=1`. The overhaul UI from S2-S4 (mode tabs + Mode A
search + Mode B wizard + shared result view) becomes the default
landing for /tools/fristenrechner; the legacy three-step wizard +
Pathway A/B + cascade is reachable only via the explicit
`?legacy=1` opt-out for the two-week deprecation window before
S6 drops the legacy code paths entirely.

The pre-existing `?overhaul=1` deep links from S2-S4 still
resolve — the detector treats *absence* of `?legacy=1` as
overhaul, so bookmarks stay valid. No sidebar / header / outbound
link change needed: those all point at the bare
`/tools/fristenrechner` URL, which now boots overhaul.

Verified — bun build clean (2971 i18n keys unchanged), 256
frontend tests pass, go build + vet clean.
This commit is contained in:
mAi
2026-05-27 10:16:07 +02:00
parent 70985d88b0
commit 4571bd4980
2 changed files with 17 additions and 13 deletions

View File

@@ -80,11 +80,14 @@ let currentProjectId: string | null = null;
// Public API ----------------------------------------------------------
// isOverhaulMode reports whether the page is in overhaul mode (S2+).
// True when `?overhaul=1` is present. Once S5 flips the flag, the
// reverse check (?legacy=1) replaces this.
// isOverhaulMode reports whether the page is in overhaul mode.
// After Slice S5 (t-paliad-323), overhaul is the default; the legacy
// wizard / row-stack / cascade is only reachable via `?legacy=1` for
// a two-week deprecation window. The `?overhaul=1` deep links from
// S2-S4 still work — they're now redundant with the default but kept
// alive so bookmarks don't 302 / lose state.
export function isOverhaulMode(): boolean {
return new URLSearchParams(window.location.search).get("overhaul") === "1";
return new URLSearchParams(window.location.search).get("legacy") !== "1";
}
// resolveProjectId reads the active Akte from the URL query string.

View File

@@ -701,15 +701,16 @@ document.addEventListener("DOMContentLoaded", () => {
initI18n();
initSidebar();
// t-paliad-323 Slice S2 — Fristenrechner overhaul boot.
// When ?overhaul=1 is set, hide the legacy three-step wizard /
// Pathway A+B shells and mount the new result view in their place.
// Deep-linkable via ?overhaul=1&event=<code>&trigger_date=…&project=…
// (the trigger date defaults to today when omitted). S3 (Mode A
// search) and S4 (Mode B wizard) will land users here once they
// identify a trigger event — for now the surface is reached only
// via deep link, but ?overhaul=1 alone shows the empty shell so
// the path is exercisable end-to-end.
// t-paliad-323 Slice S5 — Fristenrechner overhaul is the default
// boot path. The legacy three-step wizard / Pathway A+B shells are
// reachable only via `?legacy=1` for a two-week deprecation window
// after this commit lands. Deep-linkable via
// /tools/fristenrechner?event=<code>&trigger_date=…&project=…
// for the result view, or via
// /tools/fristenrechner → Mode A (search) tab
// /tools/fristenrechner?mode=wizard → Mode B wizard tab
// The `?overhaul=1` deep links from S2-S4 still resolve (the
// detector treats absence of `?legacy=1` as "overhaul").
if (isOverhaulMode()) {
bootOverhaulMode();
return;