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(assistant): no leftover from the journal's old foot, and the timeline test reads the walks where they are said

Mauricee19839206036
diff --git a/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx b/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx
index 6000490d8..05dd7935a 100644
--- a/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx
+++ b/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx
@@ -34,7 +34,6 @@ const TITLE_BUTTON =
'block w-full rounded-md text-start outline-none hover:underline focus-visible:ring-2 focus-visible:ring-accent';
/** The phone's taller target, the title still at the top of the row. */
const TITLE_BUTTON_TALL = `${TITLE_BUTTON} min-h-10`;
-const FOOTER = 'mt-1 flex items-center gap-2 border-t border-edge-faint pt-2 text-caption';
const OPEN = 'inline-flex flex-none items-center gap-1 font-medium text-accent hover:underline';
const OPEN_TALL = 'inline-flex h-10 flex-none items-center gap-1 font-medium text-accent hover:underline';
/** The size and corners of the journal's own tile, so the count stands in the row like one more entry. */
@@ -47,7 +46,7 @@ const TILE = 'flex-none snap-start';
type Open = ((entryId: number | null) => void) | null;
/** The journal's name and the way into it, under the card. */
-function JournalFooter({ journal, open }: { journal: JournalEntries; open: Open }) {
+function JournalFooter({ open }: { open: Open }) {
const { t } = useTranslation();
const { variant } = useAssistantView();
if (!open) return null;
@@ -120,7 +119,7 @@ function JournalRows({ journal, fallbackRef }: { journal: JournalEntries; fallba
{journal.entries.map((look, index) => (
<EntryRow key={look.entryId ?? `new-${index}`} look={look} divided={index > 0} open={open} hover={hover} />
))}
- <JournalFooter journal={journal} open={open} />
+ <JournalFooter open={open} />
</CardFrame>
);
}
@@ -153,7 +152,7 @@ function JournalStrip({ journal, fallbackRef }: { journal: JournalEntries; fallb
</li>
)}
</CardStrip>
- <JournalFooter journal={journal} open={open} />
+ <JournalFooter open={open} />
</div>
);
}
diff --git a/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx b/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx
index 4c326ac59..cc84ee7c6 100644
--- a/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx
+++ b/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx
@@ -174,7 +174,7 @@ describe('TourRouteCard', () => {
// One row per stop; the walks between them are hidden, read with the stop they lead to.
expect(list.querySelectorAll('li:not([aria-hidden="true"])')).toHaveLength(5);
// The place beside the way has no time: the hut measures from the start, then each stop from the last.
- expect(screen.getAllByText(/from the last stop$/)).toHaveLength(3);
+ expect(screen.getAllByRole('button', { name: /from the last stop$/ })).toHaveLength(3);
const legs = [...list.querySelectorAll('li[aria-hidden="true"]')].map((leg) => leg.textContent).filter(Boolean);
expect(legs).toHaveLength(3);
});