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.

Merge remote-tracking branch 'origin/dev' into dev-maurice

Maurice189b2572548f
diff --cc client/src/components/Todo/TodoListPanel.tsx
index 569979312,2e7155ced..58983ecac
--- a/client/src/components/Todo/TodoListPanel.tsx
+++ b/client/src/components/Todo/TodoListPanel.tsx
@@@ -399,28 -407,19 +399,28 @@@ export default function TodoListPanel(
</div>
</div>
)}
- {isAddingNew && !selectedItem && !isMobile && (
- <NewTaskPane
- tripId={tripId}
- categories={categories}
- members={members}
- defaultCategory={typeof filter === 'string' && categories.includes(filter) ? filter : null}
- onCreated={(id) => { setIsAddingNew(false); setSelectedId(id) }}
- onClose={() => setIsAddingNew(false)}
- />
+ {isAddingNew && !selectedItem && !isMobile && ReactDOM.createPortal(
+ <div onClick={e => { if (e.target === e.currentTarget) setIsAddingNew(false) }}
+ className="modal-backdrop"
- style={{ position: 'fixed', inset: 0, zIndex: 300, background: 'rgba(15,23,42,0.5)', display: 'flex', justifyContent: 'center', alignItems: 'flex-start', paddingTop: 'calc(var(--nav-h) + 60px)', paddingBottom: 40 }}>
++ style={{ position: 'fixed', inset: 0, zIndex: 1000, background: 'rgba(15,23,42,0.5)', display: 'flex', justifyContent: 'center', alignItems: 'flex-start', paddingTop: 'calc(var(--nav-h) + 60px)', paddingBottom: 40 }}>
+ <div style={{ width: 'min(520px, 92vw)', maxHeight: 'calc(100vh - var(--nav-h) - 120px)', overflow: 'auto', borderRadius: 16, boxShadow: '0 20px 60px rgba(0,0,0,0.25)' }}
+ ref={el => { if (el) { const child = el.firstElementChild as HTMLElement; if (child) { child.style.width = '100%'; child.style.borderLeft = 'none'; child.style.borderRadius = '16px' } } }}>
+ <NewTaskPane
+ tripId={tripId}
+ categories={categories}
+ members={members}
+ defaultCategory={typeof filter === 'string' && categories.includes(filter) ? filter : null}
+ onCreated={(id) => { setIsAddingNew(false); setSelectedId(id) }}
+ onClose={() => setIsAddingNew(false)}
+ />
+ </div>
+ </div>,
+ document.body
)}
- {isAddingNew && !selectedItem && isMobile && (
+ {isAddingNew && !selectedItem && isMobile && ReactDOM.createPortal(
<div onClick={e => { if (e.target === e.currentTarget) setIsAddingNew(false) }}
+ className="modal-backdrop"
- style={{ position: 'fixed', inset: 0, zIndex: 300, background: 'rgba(0,0,0,0.4)', display: 'flex', justifyContent: 'center', alignItems: 'flex-end' }}>
+ style={{ position: 'fixed', inset: 0, zIndex: 1000, background: 'rgba(0,0,0,0.4)', display: 'flex', justifyContent: 'center', alignItems: 'flex-end', paddingBottom: 'var(--bottom-nav-h)' }}>
<div style={{ width: '100%', maxHeight: '85vh', borderRadius: '16px 16px 0 0', overflow: 'auto' }}
ref={el => { if (el) { const child = el.firstElementChild as HTMLElement; if (child) { child.style.width = '100%'; child.style.borderLeft = 'none'; child.style.borderRadius = '16px 16px 0 0' } } }}>
<NewTaskPane
diff --cc server/src/db/migrations.ts
index b836fad0b,a59b5f061..292669e1e
--- a/server/src/db/migrations.ts
+++ b/server/src/db/migrations.ts
@@@ -1634,27 -1634,54 +1634,75 @@@ function runMigrations(db: Database.Dat
try { db.exec('ALTER TABLE trip_album_links ADD COLUMN passphrase TEXT DEFAULT NULL'); } catch (err: any) { if (!err.message?.includes('duplicate column name')) throw err; }
try { db.exec('ALTER TABLE trek_photos ADD COLUMN passphrase TEXT DEFAULT NULL'); } catch (err: any) { if (!err.message?.includes('duplicate column name')) throw err; }
},
- // Migration 105: Reservation endpoints (from/to points for flights, trains, ferries, car rentals) — #384 + #587
+ // Migration 105: Persistent Google place photo disk cache registry
+ () => {
+ db.exec(`
+ CREATE TABLE IF NOT EXISTS google_place_photo_meta (
+ place_id TEXT PRIMARY KEY,
+ attribution TEXT,
+ fetched_at INTEGER NOT NULL,
+ error_at INTEGER
+ )
+ `);
+ },
+ // Migration 106: Persistent Place Details row cache
+ () => {
+ db.exec(`
+ CREATE TABLE IF NOT EXISTS place_details_cache (
+ place_id TEXT NOT NULL,
+ lang TEXT NOT NULL DEFAULT '',
+ expanded INTEGER NOT NULL DEFAULT 0,
+ payload_json TEXT NOT NULL,
+ fetched_at INTEGER NOT NULL,
+ PRIMARY KEY (place_id, lang, expanded)
+ )
+ `);
+ },
+ // Migration 107: Backfill expired signed Google photo URLs to stable proxy URLs
+ { raw: () => {
+ db.exec(`
+ UPDATE places
+ SET image_url = '/api/maps/place-photo/' || google_place_id || '/bytes',
+ updated_at = CURRENT_TIMESTAMP
+ WHERE google_place_id IS NOT NULL
+ AND image_url IS NOT NULL
+ AND image_url != ''
+ AND (
+ (image_url LIKE '%googleusercontent.com%' AND image_url LIKE '%/places/%/photos/%')
+ OR (image_url LIKE '%places.googleapis.com%' AND image_url LIKE '%/places/%/photos/%')
+ )
+ `);
+ }},
+ // Migration 108: Disk cache metadata for remote-provider photo thumbnails (Immich / Synology)
+ () => db.exec(`
+ CREATE TABLE IF NOT EXISTS trek_photo_cache_meta (
+ cache_key TEXT PRIMARY KEY,
+ content_type TEXT NOT NULL DEFAULT 'image/jpeg',
+ fetched_at INTEGER NOT NULL
+ );
+ CREATE INDEX IF NOT EXISTS idx_trek_photo_cache_meta_fetched_at ON trek_photo_cache_meta (fetched_at);
+ `),
++ // Migration 109: Reservation endpoints (from/to points for flights, trains, ferries, car rentals) — #384 + #587
+ () => {
+ db.exec(`
+ CREATE TABLE IF NOT EXISTS reservation_endpoints (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ reservation_id INTEGER NOT NULL REFERENCES reservations(id) ON DELETE CASCADE,
+ role TEXT NOT NULL,
+ sequence INTEGER NOT NULL DEFAULT 0,
+ name TEXT NOT NULL,
+ code TEXT,
+ lat REAL NOT NULL,
+ lng REAL NOT NULL,
+ timezone TEXT,
+ local_time TEXT,
+ local_date TEXT,
+ created_at DATETIME DEFAULT CURRENT_TIMESTAMP
+ )
+ `);
+ db.exec('CREATE INDEX IF NOT EXISTS idx_reservation_endpoints_reservation_id ON reservation_endpoints(reservation_id)');
+ try { db.exec('ALTER TABLE reservations ADD COLUMN needs_review INTEGER NOT NULL DEFAULT 0'); } catch (err: any) { if (!err.message?.includes('duplicate column name')) throw err; }
+ },
];
if (currentVersion < migrations.length) {