feat(journey): keep the route recorded on a journey day from Dawarich, previewed first, with its gaps

A day header in the journey timeline now carries the Dawarich mark for an
editor whose Dawarich answers (dimmed with the reason while offline). It opens
a dialog that names the journey and the day and reads that one local day from
the caller's own connection: a sketch of the route, distance, first and last
time, pieces, gaps without recording, modes and whether tracks or thinned
points answered. The day is cut in the zone Dawarich records in where its
answer shows one, else in this device's, and a picker cuts it in any other.
Nothing is kept before "Keep route". On a phone the same sheet opens from the
journey's More options for the day of the card shown.

What is kept is the preview that was seen: the save reads the day again and
refuses with recording_changed when its hash moved, and the dialog shows the
new version. The same day taken over twice keeps one version and announces
nothing; a different version is replaced only on "Replace", never touching an
entry or text. A failed read throws before any write, so the kept version
stays. Gaps stay gaps: points are split where silence ends elsewhere, and no
day is joined to the one before. The dialog says how many other people will
see the route; editors may keep their own recording.

Kept days show in the day header (distance, whose recording, since when,
still running) and on the desktop and phone journey maps in the colour of
their day's pins, winning over the live trail of their date, and stay drawn
without Dawarich. A trip's GPX track is now drawn dashed as the plan, recorded
routes solid. Shared links do not show recorded days. Remove route asks first
and works without a connection.

Server: migration 046160 adds journey_recorded_days (one row per journey,
local day and source, segments as JSON, zone, window, fetch time, hash,
importer kept past their account). The journey domain owns the rows through
JourneyRecordedDaysService; the new journey-recordings domain takes a day
over through DawarichTracksService.fetchDay, which reads past the cache, asks
a window wide enough for every zone and refuses with DomainErrors. REST under
/api/journeys/:id/recordings (list, preview, PUT and DELETE /:date) with
@trek/shared contracts, and MCP list_journey_recorded_days,
preview_journey_recorded_day, save_journey_recorded_day and
delete_journey_recorded_day on the same service and access. A new user event
journey:recording:updated keeps every open map current. JourneyTrack gains an
optional kind. All 27 locales carry the strings; the Journey and Dawarich wiki
pages and the MCP tool list say what it does.
This commit is contained in:
Maurice
2026-10-21 15:05:21 +02:00
parent cbca3b2851
commit 65bb2d95eb
99 changed files with 6359 additions and 51 deletions
+65
View File
@@ -712,5 +712,70 @@ const journey: TranslationStrings = {
'journey.settings.showWeather': 'Počasí',
'journey.entry.suggestion': 'Návrh',
'journey.editor.addDetails': '+ Podrobnosti',
'journey.recording.mapLine': 'Zaznamenáno {date}',
'journey.recording.keptBy': 'Zaznamenaná trasa uložena: {distance}, převzal(a) {name} dne {date}.',
'journey.recording.keptOn': 'Zaznamenaná trasa uložena: {distance}, převzato dne {date}.',
'journey.recording.keptRunning': 'Den tehdy ještě neskončil.',
'journey.recording.takeOver': 'Převzít záznam',
'journey.recording.takeOverDay': 'Záznam z {date}',
'journey.recording.sub': 'Jen tento den, z tvého Dawariche. Nic se neuloží, dokud nepotvrdíš.',
'journey.recording.zone': 'Časové pásmo dne',
'journey.recording.zoneHint': 'Den trvá v tomto pásmu od půlnoci do půlnoci. Vyber to, ve kterém jsi cestoval(a).',
'journey.recording.zoneSource': 'Z Dawariche',
'journey.recording.zoneDevice': 'Toto zařízení',
'journey.recording.scope': 'Záznam',
'journey.recording.loading': 'Načítá se den z Dawariche…',
'journey.recording.keptStays': 'Trasa, kterou tato cesta uchovává, zůstává beze změny.',
'journey.recording.retry': 'Zkusit znovu',
'journey.recording.empty': 'Dawarich v tento den v tomto časovém pásmu nic nezaznamenal.',
'journey.recording.span': '{from} až {to}',
'journey.recording.pieces': '{count} úseků',
'journey.recording.pieces.one': '{count} úsek',
'journey.recording.pieces.few': '{count} úseky',
'journey.recording.gaps': '{count} mezer',
'journey.recording.gaps.one': '{count} mezera',
'journey.recording.gaps.few': '{count} mezery',
'journey.recording.gapsHint': 'Kde záznam končí, končí i čára. Nekreslí se žádná cesta, která nebyla zaznamenána.',
'journey.recording.sourceHint':
'Stopy jsou trasy, které Dawarich už rozdělil podle způsobu dopravy. Body jsou jeho surové polohy, prořídlé na 600 za den.',
'journey.recording.sourceTracks': 'Stopy',
'journey.recording.sourcePoints': 'Body',
'journey.recording.changedSincePreview':
'Záznam se v Dawarichi změnil, zatímco jsi ho prohlížel(a). Zkontroluj ho ještě jednou a pak ho ulož.',
'journey.recording.truncated': 'Dawarich poslal jen část tohoto dne, trasa je neúplná.',
'journey.recording.provisional': 'Tento den v tomto pásmu ještě neskončil. Trasu můžeš později nahradit celým dnem.',
'journey.recording.same': 'Tato cesta už uchovává přesně tento záznam.',
'journey.recording.differs':
'Tato cesta uchovává jinou verzi z {date} ({distance}). Nahrazení nezmění žádné záznamy ani texty.',
'journey.recording.audience':
'Dalších {count} lidí na této cestě uvidí trasu na mapě. Sdílené odkazy ji nezobrazují.',
'journey.recording.audience.one':
'Další {count} člověk na této cestě uvidí trasu na mapě. Sdílené odkazy ji nezobrazují.',
'journey.recording.audience.few':
'Další {count} lidé na této cestě uvidí trasu na mapě. Sdílené odkazy ji nezobrazují.',
'journey.recording.replace': 'Nahradit',
'journey.recording.alreadyKept': 'Už uloženo',
'journey.recording.keep': 'Uložit trasu',
'journey.recording.remove': 'Odebrat trasu',
'journey.recording.removeTitle': 'Odebrat uloženou trasu?',
'journey.recording.removeMessage':
'Trasa tohoto dne zmizí z mapy cesty. Záznamy a texty zůstanou a Dawarich si ponechá vlastní záznam.',
'journey.recording.keptToast': 'Trasa uložena do cesty',
'journey.recording.replacedToast': 'Trasa nahrazena',
'journey.recording.removedToast': 'Trasa odebrána z cesty',
'journey.recording.error.recording_exists': 'Tato cesta už pro ten den uchovává jiný záznam.',
'journey.recording.error.recording_changed': 'Záznam se od náhledu změnil.',
'journey.recording.error.recording_empty': 'Dawarich v ten den nic nezaznamenal.',
'journey.recording.mode.walking': 'Pěšky',
'journey.recording.mode.running': 'Běh',
'journey.recording.mode.cycling': 'Kolo',
'journey.recording.mode.driving': 'Auto',
'journey.recording.mode.motorcycle': 'Motorka',
'journey.recording.mode.bus': 'Autobus',
'journey.recording.mode.train': 'Vlak',
'journey.recording.mode.flying': 'Let',
'journey.recording.mode.boat': 'Loď',
'journey.recording.mode.stationary': 'Na místě',
'journey.recording.mode.unknown': 'Neznámý způsob',
};
export default journey;