diff --git a/client/scripts/eslint-baseline.json b/client/scripts/eslint-baseline.json
index 41d1c3937..2c0a692c6 100644
--- a/client/scripts/eslint-baseline.json
+++ b/client/scripts/eslint-baseline.json
@@ -4,7 +4,7 @@
"@typescript-eslint/no-misused-promises": 810,
"no-console": 85,
"complexity": 214,
- "@typescript-eslint/no-explicit-any": 114,
+ "@typescript-eslint/no-explicit-any": 113,
"trek/no-swallowed-catch": 124,
"max-params": 31,
"trek/store-without-selector": 65,
diff --git a/client/src/api/journeyRecordings.test.ts b/client/src/api/journeyRecordings.test.ts
index 83ec0e8b7..c751a57a8 100644
--- a/client/src/api/journeyRecordings.test.ts
+++ b/client/src/api/journeyRecordings.test.ts
@@ -84,17 +84,11 @@ describe('journeyRecordingsApi', () => {
});
it('FE-API-JOURNEY-RECORDINGS-004: sends a GPX file with its fields and drops the day of one source (#3085)', async () => {
- const sent: Array<{ file: string | null; date: unknown; utcOffsetMinutes: unknown }> = [];
+ const sent: Array<{ contentType: string | null; body: string }> = [];
const deleted: string[] = [];
server.use(
http.post(`${BASE}/import-gpx`, async ({ request }) => {
- const form = await request.formData();
- const file = form.get('file');
- sent.push({
- file: file instanceof Blob ? await file.text() : null,
- date: form.get('date'),
- utcOffsetMinutes: form.get('utcOffsetMinutes'),
- });
+ sent.push({ contentType: request.headers.get('content-type'), body: await request.text() });
return HttpResponse.json({ days: [], untimedPoints: 0 });
}),
http.delete(`${BASE}/2026-05-14`, ({ request }) => {
@@ -112,10 +106,15 @@ describe('journeyRecordingsApi', () => {
await journeyRecordingsApi.remove(7, '2026-05-14', 'gpx');
await journeyRecordingsApi.remove(7, '2026-05-14');
- expect(sent).toEqual([
- { file: '', date: '2026-05-14', utcOffsetMinutes: '-300' },
- { file: '', date: null, utcOffsetMinutes: null },
- ]);
+ expect(sent).toHaveLength(2);
+ for (const part of sent) {
+ expect(part.contentType).toMatch(/^multipart\/form-data;\s*boundary=/i);
+ expect(part.body).toContain('name="file"');
+ expect(part.body).toContain('');
+ }
+ expect(sent[0]?.body).toMatch(/name="date"\s+2026-05-14/);
+ expect(sent[0]?.body).toMatch(/name="utcOffsetMinutes"\s+-300/);
+ expect(sent[1]?.body).not.toMatch(/name="(?:date|utcOffsetMinutes)"/);
expect(deleted).toEqual(['?source=gpx', '']);
});
});
diff --git a/client/src/components/Assistant/cards/journey/JourneyEntriesCard.test.tsx b/client/src/components/Assistant/cards/journey/JourneyEntriesCard.test.tsx
index 73054b59b..c143416ad 100644
--- a/client/src/components/Assistant/cards/journey/JourneyEntriesCard.test.tsx
+++ b/client/src/components/Assistant/cards/journey/JourneyEntriesCard.test.tsx
@@ -98,7 +98,7 @@ describe('the journal entries card', () => {
expect(screen.getByText('4 photos')).toBeInTheDocument();
expect(screen.getByText('Opens with a video')).toBeInTheDocument();
expect(screen.getByText('Berlin 2026')).toBeInTheDocument();
- expect(container.querySelector('img')).toHaveAttribute('src', '/api/photos/7/preview');
+ expect(container.querySelector('img')).toHaveAttribute('src', '/api/photos/7/thumbnail');
});
it('FE-AI-JOURNEY-002: an entry without a photo takes the width, and a known mood and weather are named', () => {
@@ -236,7 +236,7 @@ describe('a change row of a journal entry', () => {
expect(screen.getByText('Tue, Oct 21')).toBeInTheDocument();
expect(screen.getByText('Museum Island')).toBeInTheDocument();
expect(screen.queryByText('Not a fact')).toBeNull();
- expect(document.querySelector('img')).toHaveAttribute('src', '/api/photos/7/preview');
+ expect(document.querySelector('img')).toHaveAttribute('src', '/api/photos/7/thumbnail');
first.unmount();
const second = inView(, { onOpen });
diff --git a/client/src/components/Journey/JourneyDayRecordingButton.tsx b/client/src/components/Journey/JourneyDayRecordingButton.tsx
index 792642e7a..f4da72a94 100644
--- a/client/src/components/Journey/JourneyDayRecordingButton.tsx
+++ b/client/src/components/Journey/JourneyDayRecordingButton.tsx
@@ -108,66 +108,21 @@ export default function JourneyDayRecordingButton({
}
if (gpx?.day) {
- const { distance, label } = keptLabel(gpx.day);
- const full = `${label} ${t('journey.recording.gpx.source')}`;
return (
- <>
- {fileInput}
-
-
-
-
- >
+
);
}
if (!canTakeOver && !needsConnection && !canImportGpx) return null;
- // Only a file to read: the button opens the file picker straight away.
if (canImportGpx && !canTakeOver) {
- const label = t('journey.recording.gpx.import');
- return (
- <>
- {fileInput}
-
-
-
- >
- );
+ return ;
}
const label = canTakeOver ? t('journey.recording.takeOver') : t('dawarich.error.offline');
@@ -190,11 +145,9 @@ export default function JourneyDayRecordingButton({
true
)
: onOpen
- : canImportGpx
- ? pickFile
- : undefined
+ : undefined
}
- aria-disabled={!canTakeOver && !canImportGpx}
+ aria-disabled={!canTakeOver}
aria-label={label}
aria-haspopup={canTakeOver && canImportGpx ? 'menu' : undefined}
data-testid="journey-day-recording"
@@ -208,3 +161,87 @@ export default function JourneyDayRecordingButton({
>
);
}
+
+function ImportGpxButton({
+ busy,
+ fileInput,
+ pickFile,
+}: {
+ busy: boolean;
+ fileInput: React.ReactNode;
+ pickFile: () => void;
+}) {
+ const { t } = useTranslation();
+ const label = t('journey.recording.gpx.import');
+ return (
+ <>
+ {fileInput}
+
+
+
+ >
+ );
+}
+
+function GpxRecordingPill({
+ gpx,
+ detail,
+ canImport,
+ fileInput,
+ pickFile,
+}: {
+ gpx: DayGpx;
+ detail: { distance: string; label: string };
+ canImport: boolean;
+ fileInput: React.ReactNode;
+ pickFile: () => void;
+}) {
+ const { t } = useTranslation();
+ const menu = useContextMenu();
+ const { distance, label } = detail;
+ const actionable = canImport && !gpx.busy;
+ const full = `${label} ${t('journey.recording.gpx.source')}`;
+ return (
+ <>
+ {fileInput}
+
+
+
+
+ >
+ );
+}
diff --git a/client/src/components/Journey/JourneyDetailPageEntryCard.tsx b/client/src/components/Journey/JourneyDetailPageEntryCard.tsx
index eda476015..2d11109a6 100644
--- a/client/src/components/Journey/JourneyDetailPageEntryCard.tsx
+++ b/client/src/components/Journey/JourneyDetailPageEntryCard.tsx
@@ -181,7 +181,7 @@ export function EntryCard({ entry, readOnly, onEdit, onDelete, onPhotoClick, com
)}
- {comments &&
{comments}
}
+ {comments && {comments}
}
)
diff --git a/client/src/components/Journey/JourneyEntryComments.tsx b/client/src/components/Journey/JourneyEntryComments.tsx
index ae608e1c5..d04483f80 100644
--- a/client/src/components/Journey/JourneyEntryComments.tsx
+++ b/client/src/components/Journey/JourneyEntryComments.tsx
@@ -8,10 +8,10 @@ import { Tooltip } from '../shared/Tooltip';
/** One comment as the thread draws it: in the app and on the shared page alike. */
export interface EntryCommentItem {
id: number;
- author_name: string | null;
+ author_name?: string | null;
is_guest: boolean;
body: string;
- created_at: string | null;
+ created_at?: string | null;
hidden?: boolean;
own?: boolean;
}
@@ -99,7 +99,7 @@ export default function JourneyEntryComments({
setBody('');
};
- const dateOf = (iso: string | null) =>
+ const dateOf = (iso: string | null | undefined) =>
iso ? new Date(iso).toLocaleDateString(locale || undefined, { day: 'numeric', month: 'short' }) : '';
const toggle = (
@@ -158,7 +158,7 @@ export default function JourneyEntryComments({