fix(planner): road trip mode, the dawarich trail and the route overview follow the account to another browser

The three planner view switches lived in sessionStorage only, so a new tab,
another browser or another device opened every trip on the plain view again.
They are now kept per trip in one user setting, planner_trip_views, validated
against a contract in @trek/shared. The server keeps only switches that are on
and only trips the user can still open, so a deleted trip or one the user left
drops out on the next write. The tab copy in sessionStorage stays and answers
until the settings have loaded.

Refs #2639
This commit is contained in:
Maurice
2026-10-12 17:41:56 +02:00
parent adb88142ab
commit fbba8f96b7
18 changed files with 502 additions and 51 deletions
+3
View File
@@ -6,6 +6,7 @@
// each documented against the producing service). Re-exported here so the rest
// of the client keeps importing from '../types' unchanged.
import type {
PlannerTripViews,
TrekWsEventName,
TrekWsPluginEventName,
Trip,
@@ -237,6 +238,8 @@ export interface Settings {
start_page?: 'dashboard' | 'active_trip'
/** Which planner tab 'active_trip' opens on — a TripTabId (constants/tripTabs). */
start_trip_tab?: string
/** Road trip mode, the Dawarich trail and the route overview per trip, only those that are on (#2639). */
planner_trip_views?: PlannerTripViews
// AI booking-import fallback (per-user config; used when the admin has not set
// instance-wide config on the llm_parsing addon). llm_api_key is masked on read.
llm_provider?: 'local' | 'openai' | 'anthropic'