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.
TypeScript budget-trackercollaborativedockeritinerarymcp-serveroffline-firstopen-sourceopenstreetmappacking-listpwareal-timeself-hostedselfhostedtraveltravel-apptravel-journaltravel-plannertripitwanderlog
fix(collab): the expand button on a note showed its own translation key
Maurice1f0144709379
diff --git a/client/src/components/Collab/CollabNotes.test.tsx b/client/src/components/Collab/CollabNotes.test.tsxindex 3b5e57d84..4d707c296 100644--- a/client/src/components/Collab/CollabNotes.test.tsx+++ b/client/src/components/Collab/CollabNotes.test.tsx@@ -498,8 +498,7 @@ describe('CollabNotes', () => {render(<CollabNotes {...defaultProps} />);await screen.findByText('Expandable Note');// Expand button (Maximize2 icon) appears when note has content- // The translation key 'collab.notes.expand' falls back to the raw key since it's not in en.ts- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));// View modal shows the note titleawait waitFor(() => {const titles = screen.getAllByText('Expandable Note');@@ -522,7 +521,7 @@ describe('CollabNotes', () => {);render(<CollabNotes {...defaultProps} />);await screen.findByText('View Modal Note');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));// Modal is open — there are multiple instances of the titleawait waitFor(() => expect(screen.getAllByText('View Modal Note').length).toBeGreaterThan(1));// The view modal renders a pencil button to switch to edit mode@@ -927,7 +926,7 @@ describe('CollabNotes', () => {);render(<CollabNotes {...defaultProps} />);await screen.findByText('Full Content Note');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));// View modal shows the full contentawait waitFor(() => {const titles = screen.getAllByText('Full Content Note');@@ -952,7 +951,7 @@ describe('CollabNotes', () => {);render(<CollabNotes {...defaultProps} />);await screen.findByText('Tagged Note');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));// View modal header shows the category nameawait waitFor(() => {const foodEls = screen.getAllByText('Food');@@ -1108,7 +1107,7 @@ describe('CollabNotes', () => {await screen.findByText('Attached View Note');// PDF badge is present in NoteCardexpect(screen.getByText('PDF')).toBeInTheDocument();- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));// View modal opens — title appears multiple timesawait waitFor(() => expect(screen.getAllByText('Attached View Note').length).toBeGreaterThan(1));// PDF badge appears in both card and view modal@@ -1132,7 +1131,7 @@ describe('CollabNotes', () => {);render(<CollabNotes {...defaultProps} />);await screen.findByText('Image View Note');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));// View modal opensawait waitFor(() => expect(screen.getAllByText('Image View Note').length).toBeGreaterThan(1));// The view modal code for image attachments executed (AuthedImg renders initially null, then img after async)@@ -1154,7 +1153,7 @@ describe('CollabNotes', () => {);render(<CollabNotes {...defaultProps} />);await screen.findByText('Transition Note');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));await waitFor(() => expect(screen.getAllByText('Transition Note').length).toBeGreaterThan(1));// Click the Pencil button in the view modal (second-to-last button)const allButtons = screen.getAllByRole('button');@@ -1713,7 +1712,7 @@ describe('CollabNotes details', () => {serveNotes({ notes: [buildNote({ id: 5, title: 'Long note', content: 'Full body', category: 'Food', color: '#ef4444' })] });render(<CollabNotes {...defaultProps} />);await screen.findByText('Long note');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));const modal = await waitFor(() => {const md = document.querySelector('.collab-note-md-full')if (!md) throw new Error('view modal not open yet')@@ -1751,7 +1750,7 @@ describe('CollabNotes details', () => {});render(<CollabNotes {...defaultProps} />);await screen.findByText('Trip docs');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));const modal = await waitFor(() => {const md = document.querySelector('.collab-note-md-full')if (!md) throw new Error('view modal not open yet')@@ -1928,7 +1927,7 @@ describe('CollabNotes details', () => {serveNotes({ notes: [buildNote({ id: 7, title: 'Hotel', content: 'Zimmernummer <TBD> bestaetigen' })] });render(<CollabNotes {...defaultProps} />);await screen.findByText('Hotel');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));const full = await openedNoteBody();// Notes written before markdown rendering existed keep reading the way they// were typed (#2177).@@ -1940,7 +1939,7 @@ describe('CollabNotes details', () => {serveNotes({ notes: [buildNote({ id: 8, title: 'Booking', content: 'Hotel gebucht[^1]\n\n[^1]: Bestaetigung ABC123' })] });render(<CollabNotes {...defaultProps} />);await screen.findByText('Booking');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));const full = await openedNoteBody();const ref = within(full).getByRole('link', { name: '1' });@@ -1956,7 +1955,7 @@ describe('CollabNotes details', () => {server.use(http.get('/api/trips/1/collab/link-preview', () => HttpResponse.json({ title: 'Hotel', image: null })));render(<CollabNotes {...defaultProps} />);await screen.findByText('Hotel');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));const full = await openedNoteBody();// A member without collab_edit never opens the edit modal, so this is the@@ -1972,7 +1971,7 @@ describe('CollabNotes details', () => {serveNotes({ notes: [buildNote({ id: 10, title: 'Hotel', website: 'javascript:alert(1)' })] });render(<CollabNotes {...defaultProps} />);await screen.findByText('Hotel');- await user.click(screen.getByTitle('collab.notes.expand'));+ await user.click(screen.getByRole('button', { name: 'Expand' }));const full = await openedNoteBody();expect(within(full).queryAllByRole('link')).toHaveLength(0);diff --git a/client/src/components/Collab/CollabNotesCard.tsx b/client/src/components/Collab/CollabNotesCard.tsxindex 4da68ee0e..95e474697 100644--- a/client/src/components/Collab/CollabNotesCard.tsx+++ b/client/src/components/Collab/CollabNotesCard.tsx@@ -81,7 +81,7 @@ export function NoteCard({ note, currentUser, canEdit, onUpdate, onDelete, onEdidisplay: 'flex', gap: 2,}}>{note.content && (- <button type="button" onClick={() => onView?.(note)} title={t('collab.notes.expand') || 'Expand'}+ <button type="button" onClick={() => onView?.(note)} title={t('common.expand')} aria-label={t('common.expand')}style={{ padding: 3, background: 'none', border: 'none', cursor: 'pointer', color: 'var(--text-faint)', display: 'flex' }}onMouseEnter={e => e.currentTarget.style.color = 'var(--text-primary)'}onMouseLeave={e => e.currentTarget.style.color = 'var(--text-faint)'}>