From 425e1ef183fed8c82fc722991cbaf299ed2ba661 Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 17 Sep 2026 14:58:30 +0200 Subject: [PATCH] fix(dawarich): the trip rail drops the duration badge A stay in the trip rail showed both when it happened and how long it lasted. The rail is narrow and the row does not wrap, and of the two it is the arrival that places a stop; how long somebody stood there is a second figure competing for the same line. Off wherever the panel is scoped to a trip, which is the planner rail and the phone's places browser, and the same test `showTrip` already uses. The journal keeps it: there a stay becomes an entry, and how long it lasted is part of what the entry says. --- .../src/components/Dawarich/DawarichSuggestionsPanel.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/src/components/Dawarich/DawarichSuggestionsPanel.tsx b/client/src/components/Dawarich/DawarichSuggestionsPanel.tsx index 622f556f5..503b699d9 100644 --- a/client/src/components/Dawarich/DawarichSuggestionsPanel.tsx +++ b/client/src/components/Dawarich/DawarichSuggestionsPanel.tsx @@ -124,6 +124,9 @@ export default function DawarichSuggestionsPanel({ allowPlace: trips.length > 0, // The trip name is noise when every row is from the same trip. showTrip: tripId === undefined, + // In the trip rail the arrival is the half that places a stop; how long somebody stood + // there is a second figure on a row that already does not wrap. + showDuration: tripId === undefined, } return ( @@ -292,6 +295,7 @@ export function SuggestionRow({ allowPlace = false, showTrip = false, showDate = false, + showDuration = true, phone = false, onAccept, onDismiss, @@ -303,6 +307,8 @@ export function SuggestionRow({ allowPlace?: boolean showTrip?: boolean showDate?: boolean + /** How long the stay lasted. Off in the trip rail, where the arrival is the useful half. */ + showDuration?: boolean /** Rendered inside the phone shell, which has its own palette and its own reach. */ phone?: boolean onAccept?: (target: DawarichSuggestionTarget) => void @@ -360,7 +366,7 @@ export function SuggestionRow({ {formatDayHeading(suggestion.localDate, locale)} )} {timeRange(suggestion.startedAt, suggestion.endedAt, is12h)} - {formatDuration(suggestion.durationMinutes, t)} + {showDuration && {formatDuration(suggestion.durationMinutes, t)}} {suggestion.state === 'accepted' && (