feat(fristenrechner): Slice S5 — flip overhaul default; legacy under ?legacy=1 (m/paliad#146)
`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:
@@ -80,11 +80,14 @@ let currentProjectId: string | null = null;
|
|||||||
|
|
||||||
// Public API ----------------------------------------------------------
|
// Public API ----------------------------------------------------------
|
||||||
|
|
||||||
// isOverhaulMode reports whether the page is in overhaul mode (S2+).
|
// isOverhaulMode reports whether the page is in overhaul mode.
|
||||||
// True when `?overhaul=1` is present. Once S5 flips the flag, the
|
// After Slice S5 (t-paliad-323), overhaul is the default; the legacy
|
||||||
// reverse check (?legacy=1) replaces this.
|
// 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 {
|
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.
|
// resolveProjectId reads the active Akte from the URL query string.
|
||||||
|
|||||||
@@ -701,15 +701,16 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
initI18n();
|
initI18n();
|
||||||
initSidebar();
|
initSidebar();
|
||||||
|
|
||||||
// t-paliad-323 Slice S2 — Fristenrechner overhaul boot.
|
// t-paliad-323 Slice S5 — Fristenrechner overhaul is the default
|
||||||
// When ?overhaul=1 is set, hide the legacy three-step wizard /
|
// boot path. The legacy three-step wizard / Pathway A+B shells are
|
||||||
// Pathway A+B shells and mount the new result view in their place.
|
// reachable only via `?legacy=1` for a two-week deprecation window
|
||||||
// Deep-linkable via ?overhaul=1&event=<code>&trigger_date=…&project=…
|
// after this commit lands. Deep-linkable via
|
||||||
// (the trigger date defaults to today when omitted). S3 (Mode A
|
// /tools/fristenrechner?event=<code>&trigger_date=…&project=…
|
||||||
// search) and S4 (Mode B wizard) will land users here once they
|
// for the result view, or via
|
||||||
// identify a trigger event — for now the surface is reached only
|
// /tools/fristenrechner → Mode A (search) tab
|
||||||
// via deep link, but ?overhaul=1 alone shows the empty shell so
|
// /tools/fristenrechner?mode=wizard → Mode B wizard tab
|
||||||
// the path is exercisable end-to-end.
|
// The `?overhaul=1` deep links from S2-S4 still resolve (the
|
||||||
|
// detector treats absence of `?legacy=1` as "overhaul").
|
||||||
if (isOverhaulMode()) {
|
if (isOverhaulMode()) {
|
||||||
bootOverhaulMode();
|
bootOverhaulMode();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user