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(mobile): the map frames the day beside the pane, atlas search as a centred panel
Maurice36ed0e0d23f2
diff --git a/client/src/mobile/screens/atlas/MAtlasSearch.tsx b/client/src/mobile/screens/atlas/MAtlasSearch.tsxindex 5518f62fa..24e3e5c82 100644--- a/client/src/mobile/screens/atlas/MAtlasSearch.tsx+++ b/client/src/mobile/screens/atlas/MAtlasSearch.tsx@@ -50,7 +50,7 @@ export default function MAtlasSearch({const q = query.trim().toLowerCase()const rows = q ? options.filter((o) => o.label.toLowerCase().includes(q)).slice(0, 6) : suggestions- const scrimCls = 'm-fade-in fixed inset-0 z-[70] flex flex-col bg-[rgba(16,16,19,.28)] px-[18px] pt-[calc(var(--m-safe-top,12px)+12px)] backdrop-blur-[22px] backdrop-saturate-[1.6]' // theme-lint-disable — fixed scrim value from the design+ const scrimCls = 'm-fade-in fixed inset-0 z-[70] flex flex-col bg-[rgba(16,16,19,.28)] px-[18px] pt-[calc(var(--m-safe-top,12px)+12px)] backdrop-blur-[22px] backdrop-saturate-[1.6] wide:pt-[calc(var(--m-safe-top,12px)+72px)] wide:[&>*]:mx-auto wide:[&>*]:w-full wide:[&>*]:max-w-[640px]' // theme-lint-disable — fixed scrim value from the designreturn (<divdiff --git a/client/src/mobile/screens/trip/MTripShell.tsx b/client/src/mobile/screens/trip/MTripShell.tsxindex 17297dc17..fbdb00942 100644--- a/client/src/mobile/screens/trip/MTripShell.tsx+++ b/client/src/mobile/screens/trip/MTripShell.tsx@@ -433,14 +433,36 @@ export default function MTripShell({// With the plan beside the map, the map shows the day the plan shows: its// places framed, its route drawn, the other days' pins put away, exactly as// a phone does when it switches over to the map.- const followDayId = split && trTab === 'plan' && view === 'plan' && mode !== 'browse' ? planner.selectedDayId : null+ // Not before the splash has gone: the map is not there to frame until then.+ const mapReady = !planner.isLoading && planner.splashDone+ const followDayId = mapReady && split && trTab === 'plan' && view === 'plan' && mode !== 'browse' ? planner.selectedDayId : nullconst { autoShowRoute, setExpandedDayIds } = planner+ const selectDayRef = useRef(planner.handleSelectDay)+ useEffect(() => {+ selectDayRef.current = planner.handleSelectDay+ })useEffect(() => {if (followDayId == null) returnautoShowRoute()setExpandedDayIds(new Set([followDayId]))+ // Framed as the map toggle frames it, without touching the plan's scroll.+ selectDayRef.current(followDayId, false)}, [followDayId, autoShowRoute, setExpandedDayIds])+ // The map's box changes with the pane (opening, hiding, a rotation or a fold+ // crossing the split size), and a frame fitted to the old box leaves the day+ // half outside the new one. Once the box has settled, frame the day again.+ const frameDayId = MAP_TABS.has(trTab) ? planner.selectedDayId : null+ const boxKey = `${split}:${paneOpen}`+ const lastBoxRef = useRef(boxKey)+ useEffect(() => {+ if (lastBoxRef.current === boxKey) return+ lastBoxRef.current = boxKey+ if (frameDayId == null) return+ const timer = setTimeout(() => selectDayRef.current(frameDayId, false), 340)+ return () => clearTimeout(timer)+ }, [boxKey, frameDayId])+const openSheet = (id: string, payload?: unknown) => setSheet({ id, payload })const closeSheet = () => setSheet(null)diff --git a/client/tests/unit/mobile/trip/MTripShell.wide.test.tsx b/client/tests/unit/mobile/trip/MTripShell.wide.test.tsxindex 0d27e48a8..0af092d9f 100644--- a/client/tests/unit/mobile/trip/MTripShell.wide.test.tsx+++ b/client/tests/unit/mobile/trip/MTripShell.wide.test.tsx@@ -9,7 +9,7 @@ import { useDocSyncOfferStore } from '../../../../src/store/docSyncOfferStore';import type { Day } from '../../../../src/types';import { buildPlanner } from '../../../helpers/mobileTrip';import { server } from '../../../helpers/msw/server';-import { fireEvent, render, screen, within } from '../../../helpers/render';+import { fireEvent, render, screen, waitFor, within } from '../../../helpers/render';import { setSizeClass } from '../../../helpers/sizeClass';import { seedStore } from '../../../helpers/store';@@ -142,6 +142,18 @@ describe('MTripShell on a wide window', () => {expect(screen.getByTestId('plan-timeline')).toBeInTheDocument();});+ it('FE-MOB-SHELLW-007: the map frames the day beside the pane, and again once its box has changed', async () => {+ setSizeClass('split');+ renderShell();+ // On arrival, as the map toggle frames it: the day, without the list flag.+ expect(mocks.planner.handleSelectDay).toHaveBeenCalledWith(12, false);+ vi.mocked(mocks.planner.handleSelectDay).mockClear();++ fireEvent.click(screen.getByRole('button', { name: 'mobileTrip.hidePane' }));+ vi.mocked(mocks.planner.handleSelectDay).mockClear();+ await waitFor(() => expect(mocks.planner.handleSelectDay).toHaveBeenCalledWith(12, false), { timeout: 1500 });+ });+it('FE-MOB-SHELLW-004: folding to compact mid-plan keeps the map and the day, and brings the dock back', () => {setSizeClass('split');renderShell();