Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(client): keep the open-at rule on the client's library target, and settle CI

Maurice14c767a6753c
diff --git a/client/scripts/eslint-baseline.json b/client/scripts/eslint-baseline.json
index 9902dada8..b572afd98 100644
--- a/client/scripts/eslint-baseline.json
+++ b/client/scripts/eslint-baseline.json
@@ -1,6 +1,6 @@
{
"src": {
- "@typescript-eslint/no-non-null-assertion": 380,
+ "@typescript-eslint/no-non-null-assertion": 377,
"@typescript-eslint/no-misused-promises": 847,
"no-console": 88,
"complexity": 218,
@@ -8,7 +8,7 @@
"trek/no-swallowed-catch": 128,
"max-params": 32,
"trek/store-without-selector": 67,
- "react-hooks/refs": 555,
+ "react-hooks/refs": 554,
"react-hooks/set-state-in-effect": 193,
"@typescript-eslint/no-floating-promises": 164,
"react-hooks/exhaustive-deps": 116,
diff --git a/client/src/components/Journey/journeyOpenAt.ts b/client/src/components/Journey/journeyOpenAt.ts
index 1eb5dfeca..7c9eb473f 100644
--- a/client/src/components/Journey/journeyOpenAt.ts
+++ b/client/src/components/Journey/journeyOpenAt.ts
@@ -26,13 +26,14 @@ export function journeyOpenAtEntryId(
{ today, newestFirst = false }: { today: string; newestFirst?: boolean }
): string | null {
const dated = [...entries].sort((a, b) => a.entry_date.localeCompare(b.entry_date));
- const first = dated.at(0);
- const last = dated.at(-1);
+ const first = dated[0];
+ const last = dated[dated.length - 1];
if (!first || !last) return null;
let day = last.entry_date;
if (!newestFirst) {
if (today < first.entry_date || today > last.entry_date) return null;
- day = dated.filter((e) => e.entry_date <= today).at(-1)?.entry_date ?? first.entry_date;
+ const reached = dated.filter((e) => e.entry_date <= today);
+ day = reached[reached.length - 1]?.entry_date ?? first.entry_date;
}
const dayStart = dated.find((e) => e.entry_date === day) ?? first;
return String(dayStart.id);
diff --git a/client/src/components/Journey/useJourneyCarouselSync.test.ts b/client/src/components/Journey/useJourneyCarouselSync.test.ts
index 0b19415b8..c8d5bb9e2 100644
--- a/client/src/components/Journey/useJourneyCarouselSync.test.ts
+++ b/client/src/components/Journey/useJourneyCarouselSync.test.ts
@@ -169,7 +169,9 @@ describe('useJourneyCarouselSync', () => {
const settleAt = (scrollLeft: number) => {
Object.defineProperty(carousel, 'scrollLeft', { value: scrollLeft, configurable: true });
carousel.dispatchEvent(new Event('scroll'));
- act(() => vi.advanceTimersByTime(150));
+ act(() => {
+ vi.advanceTimersByTime(150);
+ });
};
settleAt(300);
diff --git a/client/src/components/Packing/PackingListPanelItemRow.test.tsx b/client/src/components/Packing/PackingListPanelItemRow.test.tsx
index 43d72f287..1603443ee 100644
--- a/client/src/components/Packing/PackingListPanelItemRow.test.tsx
+++ b/client/src/components/Packing/PackingListPanelItemRow.test.tsx
@@ -419,8 +419,8 @@ describe('ArtikelZeile — sharing badges', () => {
currentUserId: 1,
})
- // The bringer's initial on an avatar, the co-bringers as a count.
- expect(screen.getByTitle('brought by Bob')).toHaveTextContent('B+1')
+ // The bringer's initial on an avatar, the co-bringers as a count; the title names everyone (#2782).
+ expect(screen.getByTitle('brought by Bob, cleo')).toHaveTextContent('B+1')
})
it('FE-W5ROW-022: a bringer without co-bringers shows no counter', () => {