From 4571bd49807af8ddcb864f6e01a719c00864a1b0 Mon Sep 17 00:00:00 2001 From: mAi Date: Wed, 27 May 2026 10:16:07 +0200 Subject: [PATCH] =?UTF-8?q?feat(fristenrechner):=20Slice=20S5=20=E2=80=94?= =?UTF-8?q?=20flip=20overhaul=20default;=20legacy=20under=20=3Flegacy=3D1?= =?UTF-8?q?=20(m/paliad#146)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. --- frontend/src/client/fristenrechner-result.ts | 11 +++++++---- frontend/src/client/fristenrechner.ts | 19 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/frontend/src/client/fristenrechner-result.ts b/frontend/src/client/fristenrechner-result.ts index 06d18ff..d11e4a5 100644 --- a/frontend/src/client/fristenrechner-result.ts +++ b/frontend/src/client/fristenrechner-result.ts @@ -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. diff --git a/frontend/src/client/fristenrechner.ts b/frontend/src/client/fristenrechner.ts index de669fb..0481f32 100644 --- a/frontend/src/client/fristenrechner.ts +++ b/frontend/src/client/fristenrechner.ts @@ -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=&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=&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;