5743 Commits

Author SHA1 Message Date
github-actions[bot] 13910464e5 chore: bump version to 5.2.1 [skip ci] v5.2.1 2026-11-25 13:18:29 +00:00
Maurice 903868c08c feat(release): show the iOS and Android apps in the 5.2.1 notice, the account settings and the user menu
The release notice moves to 5.2.1 and gets a tile across the release column
with the App Store and Google Play cards, each with a QR code that opens the
store page. The headliner, intro, footnote and note texts are shorter so the
tile fits, in every locale.

Settings > Account shows the same store cards in its right column, except
inside the native app itself. The user menu footer adds round links to
Patreon, Ko-fi and Buy Me a Coffee beside Discord, left out on managed
installs and in the native apps like every donation link.
2026-11-25 13:32:18 +01:00
Maurice 434baaf6fd fix(native-auth): send the app's SSO sign-in through the identity provider every time
The app signs in through a browser sheet that shares the system browser's
cookies. When that browser still held a TREK session from an earlier
sign-in, the hand-off page skipped the identity provider and offered to
continue at once, so a provider set to demand re-authentication (Pocket ID's
"requires re-authentication") was never asked, and signing out of the app
and in again with SSO asked for nothing.

The SSO button now always goes through the identity provider. It decides as
before: a provider with a running session lets the user through, one that
demands re-authentication asks for it. A sign-in with a password or passkey
still continues with the browser's session after the explicit tap.

Refs #3014
2026-11-25 10:52:34 +01:00
Maurice d9d901e52d fix(ci): lower the client non-null baseline and arm the wait before PMEDIA-006 advances
Client lint was red because the day plan change took 13 non-null assertions
out of DayPlanSidebar: the count is 354 now, so the baseline goes down to it.

Server tests 6/10 timed out in PMEDIA-006. The test advanced the fake clock
right after asking for the rendition, but the wait it meant to run out is only
armed once the copy has started; on a slow runner the clock moved past a timer
that did not exist yet and the test hung for 15 seconds. It now waits for the
copy to start first, as PMEDIA-006b already does.
2026-11-25 10:37:46 +01:00
Maurice 50cb9364f6 fix(atlas): count the cities the address parser used to miss
The Atlas reads a place's city from its address text, and several common
address shapes lost it:

- The TREK index writes "street, postcode, locality" with no country, and the
  parser always dropped the last part as the country, so a place picked from
  TREK's own search counted no city.
- A city that is its own region (Berlin, Wien, Malé) was skipped as the region
  even where it stands beside its postcode, which is how such an address names
  its city.
- An atoll or a state written with its generic word ("Kaafu Atoll" for the
  region Kaafu) was not recognised as the region and counted as the city of
  every island in it.
- Country names came from a short English and German list, so "Maldives",
  "Österreich" or "Italia" could be counted as a city.

The locality of a postcode-and-locality tail now counts, a region-named part
with a postcode counts when no part before it names a city, a region matches
with its generic word, and countries are recognised by their name in every
language TREK speaks. A region named without a postcode (a mountain in
"Bayern", a resort in "Kaafu") still counts no city, and the lines the parser
already read right read the same.

Closes #3200
2026-11-25 10:29:09 +01:00
Maurice b6c50eb146 fix(wallet): date a booking's pass by its stay or linked day when it has no time of its own
The Wallet pass took its date only from the booking's own time or, for a
journey, its departure stop. A hotel whose check-in and check-out live on its
stay, and a booking linked to a day that carries only a clock, have neither,
so Wallet answered "Give the booking a date first" for a booking the app
shows with its dates. A TestFlight tester hit it with a hotel booked from
8 to 11 January.

The pass context now reads the dates of the days a booking is linked to and,
for a hotel, the first and last day of its stay with its check-in and
check-out times. The pass falls back to them in the order the app uses
(bookingDates): the booking's own time first, then the stay or the linked
day, with the booking's or the stay's clock. A booking with no date anywhere
is still refused.
2026-11-25 10:25:10 +01:00
Maurice c1c77d89b5 fix(day-plan): make the legs from a booking or the hotel tappable on the phone
On the phone timeline only a leg that leaves a stop opened the travel mode
menu. The leg from the morning hotel to the first stop, the leg from the last
stop back to the hotel and the leg from a booking's arrival to the next stop
stayed inert, although the desktop day plan already changes them through the
stop at their other end. A TestFlight tester could not tap the walk from their
train's arrival to the hotel.

The timeline now knows which stop owns each of these legs: the first stop's
incoming mode for the morning hotel leg and for a leg out of a booking, the
last stop's outgoing mode for the evening hotel leg. Tapping them in edit mode
opens the same menu as on the desktop, and the phone sets the incoming mode
the way the desktop does.

A leg no stop owns, such as a booking's arrival to the hotel, has no mode to
store. It follows the day default, and on both the phone and the desktop it
now offers the public transit search where a trip has dates, instead of
reacting to nothing.
2026-11-25 10:21:43 +01:00
Maurice 70af8132ef fix(booking-import): let the model choose when a document names several booking types
The keyword table that picks the extraction schema took the first pattern
that matched, with transport tested first since #2076. A hotel confirmation
that mentioned the airport bus, the train station or the cruise port was
therefore extracted with the bus, train or ferry schema. Those schemas have
no hotel name, address or check-in and check-out, so the model returned a
transport booking without the stay's data and the import dropped it.

The keywords now only decide alone when a document names one type. When it
names several, the model gets the union schema narrowed to exactly those
types, with each type's field meanings, and picks. The flight gate is
unchanged: flight numbers still take the flight path only when no other
transport is named. Event words decide only when nothing else is named,
since "ticket" is printed on every transport ticket, and the lodging
pattern also knows motel, accommodation, apartment, guest house, Unterkunft
and Ferienwohnung.
2026-11-25 10:09:24 +01:00
Maurice 85182d2f52 chore(deps): group MikroORM and NestJS updates, hold NestJS majors
Each family releases in lockstep and now arrives as one PR. NestJS majors wait until nestjs-zod supports NestJS 12.
2026-11-25 00:10:14 +01:00
Maurice c65e9bf76e fix(auth): move passkeys to SimpleWebAuthn 14, which no longer fetches a CRL a client names
@simplewebauthn/server 13.3.3 fetched the CRL address in an android-key
attestation certificate before it checked the chain or the signature, with
no timeout or size cap, so anyone signed in could make the server request
any URL by registering a passkey. 14.1.0 only checks revocation for a chain
it validated against Google's pinned roots.

14.x refuses an expected origin with a path, a trailing slash or an
uppercase host and an RP ID that is not lower case, where 13.x only failed
to match them. The configured origins are now reduced to the origin the
browser reports and the RP ID is lower-cased, so such settings keep
working; an origins list in which nothing parses leaves passkeys
unconfigured instead of falling back to APP_URL. Verification gets the
algorithm list the options offer, and stored transports are read as plain
strings.

Stored credentials keep their format. typescript-eslint moves to 8.73.0.
2026-11-25 00:10:14 +01:00
Maurice 3754518d37 fix(ai): say why ChatGPT refused a sign-in, and start a fresh one after any refusal
Every refusal of the code by OpenAI's token endpoint came back as "The
sign-in took too long", and the endpoint's own error was dropped without a
log line. Only invalid_grant means the code ran out or was used already; any
other refusal (invalid_client, a redirect or resource mismatch) now names
its OAuth error in the answer and in a warning with the endpoint's
description, so an admin can see what went wrong.

The server takes a sign-in once whatever it answers, but the panel only
started a fresh one after "expired", so the next try after any other
refusal used a spent sign-in. It now starts a fresh one after every refusal
the server sent; offline and a wrong address keep the one in progress, as
neither reached it.

The address the sign-in window ends on is also taken without http://, the
way the hint under the field and the address bar show it.

Closes #3196
2026-11-24 23:59:33 +01:00
Maurice eed5f75487 docs(readme): space Data sources like the other sections 2026-11-24 23:56:08 +01:00
Maurice f29112698e docs(readme): show See all features as a plain heading
The graphic card goes again; the toggle now reads as a third-level heading.
2026-11-24 23:54:54 +01:00
Maurice d556d706b7 docs(readme): drop the feature tile grid, make See all features a card
The Plan, track, share tile grid goes. The See all features toggle is now a card in the style of the app cards, light and dark, with the feature areas as small chips and a chevron, so the full list is easier to spot.
2026-11-24 23:53:58 +01:00
Maurice 71673085bb docs(readme): make the app store cards flatter
A smaller QR code, and the store's mark beside the first line instead of in a box of its own, so each card is about a quarter less tall.
2026-11-24 23:51:05 +01:00
Maurice 19a01d493b docs(readme): set the sponsor line in normal text size 2026-11-24 23:49:59 +01:00
Maurice 462f08727c docs(readme): shorten the sponsor and AI notes, drop the PWA section
The sponsor line at the top goes; the dataforest cloud block further down is now its logo under a small POWERED BY and one line. The AI usage section is one sentence with its link. The PWA install steps and their link in the quick navigation go, since the store apps now sit at the top.
2026-11-24 23:49:20 +01:00
Maurice 58298703e1 docs(readme): drop the line under the app cards 2026-11-24 23:48:23 +01:00
Maurice 17e75947f0 docs(readme): drop the Docker badge 2026-11-24 23:47:36 +01:00
Maurice 4f1e29b02c docs(readme): drop the Sonar and CI status badges 2026-11-24 23:46:48 +01:00
Maurice d1ee3ceccb docs(readme): show the app stores as cards with their QR code
Two cards, one per store, in a light and a dark version that follow GitHub's theme: the QR code on white on the left, the store's mark and name on the right. They replace the bordered table and the two shield badges, and each card links to its store.
2026-11-24 23:45:47 +01:00
Maurice 69a976e942 docs(readme): put the iOS and Android apps near the top, shorten the sponsor section
A QR code and a store button for the App Store and Google Play sit right
under the introduction, with a line that the app connects to your own TREK
server and a link to the Native Apps page. The QR codes are SVGs on a white
ground, so they scan in GitHub's light and dark theme alike.

The dataforest cloud section keeps its logo and every sponsor link but says
the same in one paragraph instead of four.
2026-11-24 23:41:22 +01:00
Maurice f928f4b1ca fix(postgres): connect over a Unix socket
TREK_DB_URL could not name a Unix socket. MikroORM builds the pool from the
URL's own host and drops a host parameter, so
postgresql://trek@localhost/trek?host=/var/run/postgresql connected to
localhost over TCP. A percent-encoded socket path as the host reached the
pool, but the client tools got it undecoded in PGHOST, so backups, restores
and the safety copy before a migration failed.

The server address is now read once, the way libpq reads a connection URL:
a host or port parameter takes the place of the URL's own, and a host
written into the URL is percent-decoded. The pool and the client tools both
get that address. The wiki and .env.example show the socket form.
2026-11-24 23:15:34 +01:00
Maurice aa79d6286a fix(paddle): read the Geofabrik region list again
The admin's paddle region picker failed with "The list of regions cannot be
fetched right now". Geofabrik's index now writes a continent's parent as
null instead of leaving the key out, and the schema took only a string or
nothing, so the whole list was refused over nine entries.

The optional fields now take null as well, and the entries are read one by
one: an entry in a shape TREK does not know costs only that region and is
counted in a warning. A list of which nothing can be read is still refused.

Closes #3195
2026-11-24 22:32:17 +01:00
Maurice eeff0398a7 fix(mail-import): retry a busy AI provider and never drop a booking mail in silence
A forwarded booking mail whose AI read failed in passing (a 503 "high
demand", a rate limit, a timeout) was settled at once with an inbox entry
nobody read again, and a manual import printed "no reservations found"
under the AI error as if the file held none.

Both LLM clients now send a failed request again up to twice, honouring
Retry-After within the request timeout. The mail pipeline puts such a mail
back in the queue and keeps the inbox entry only after its last try, and
these attempts no longer count toward the daily AI limit.

The mail prompt now names the answer's shape, { "bookings": [...] }, for
providers that get no tool. An answer in another shape used to read as
"not a booking" and the mail was discarded without a trace; it now ends
as a failed read the person sees in the inbox.

The import warnings lose their dashes, and the image sets LANG=C.UTF-8 so
KItinerary stops warning about the C locale on every run.
2026-11-24 13:30:22 +01:00
Maurice 7fe4fbb683 fix(plugins): mark a plugin that waits for re-consent as failed at boot
A plugin whose files now declare permissions it was never granted is
refused before its process starts, so the supervisor's status hook never
ran and the row kept the 'active' it had from the last run. The plugin
list and the navigation kept offering it while its page answered
"Plugin not available". The boot now stores the refusal as the plugin's
error, so Admin > Plugins says why and the navigation drops it.
2026-11-24 13:20:36 +01:00
Maurice afbeef64c2 style(notices): format the release notice strings with Prettier
The 5.2.0 release modal copy kept short strings on their own line, which
lint:format rejects for files outside its baseline.
2026-11-24 12:23:59 +01:00
Maurice 293ec89db4 fix(map): pin mapbox-gl to 3.32.0 so vector tiles load beside maplibre-gl
mapbox-gl 3.33 and later read the worker class registry key before they
handle Set and Error. maplibre-gl, which ships in the same bundle, stamps
that key on both built-ins, so mapbox-gl looks up a registry entry it never
made and every vector tile fails with "Cannot read properties of undefined
(reading 'omit')". The Mapbox basemap stays blank while raster layers such
as satellite still load. 5.2.0 shipped mapbox-gl 3.35.2; 3.36.0-rc.1 still
has the same order.

Pin the last release that handles the built-ins first, keep Dependabot off
3.33 and later, and add a test that reads the shipped serializer and fails
on a version with the registry read first.
2026-11-24 00:04:19 +01:00
github-actions[bot] 8809654a43 chore: bump version to 5.2.0 [skip ci] v5.2.0 2026-11-23 21:40:14 +00:00
Maurice f1d8995d66 chore(deps): hold typescript-eslint at 8.72, lower the knip baseline
typescript-eslint 8.74 reports more no-unused-vars and lifts the client
warning count past its baseline; it gets its own round. knip 6.48 finds
two fewer unused exports and types, so their entries go down with it.
plugin-sdk-v1.10.0
2026-11-23 21:57:06 +01:00
Maurice aab09afc53 fix(notices): pass the Patreon handler in the modal test, logical sides in the card drawings, no non-null assertions 2026-11-23 21:25:39 +01:00
Maurice 34e28d082d chore(deps): bump the npm minor and patch group, MikroORM held
Takes Dependabot's group update except MikroORM, which stays on 7.2.8:
7.2.9 broke the Postgres probe on OauthTokens.insertToken and
OauthConsents.upsertGrant, and 7.2.11 gets its own round. The rollup
musl pins stay with the rollup version the lockfile resolves. The
Playwright container moves to v1.65.1-noble with its digest, as the
lockfile now pins @playwright/test 1.65.1.
2026-11-23 21:19:18 +01:00
Maurice e6d682b99e chore(plugin-sdk): bump the plugin-sdk minor and patch group 2026-11-23 21:19:17 +01:00
Maurice cb1d400251 ci: bump docker/scout-action from 1.29.0 to 1.30.0 2026-11-23 21:19:17 +01:00
Maurice bcdcd69a64 feat(notices): 5.2.0 release modal and Patreon for monthly support
The release modal now shows 5.2.0: booking mails that land in the trip,
live flight status and the new trip PDF, each with its own drawn card,
and links the 5.2.0 release notes. The maintainer note and the support
block are rewritten, shorter and without the sponsor wording.

Patreon joins Buy Me a Coffee and Ko-fi as the monthly way to support
TREK: a full-width button in the release and thank-you notices (a new
optional tertiaryCta on the notice contract), a tile in About and in the
admin GitHub panel on desktop and phone, the README badges and
FUNDING.yml. Like the other donation links it stays hidden inside the
native apps.
2026-11-23 21:15:54 +01:00
Maurice d18a4b2180 fix(flight-live): keep a late inbound aircraft holding near the origin from reading as departed
After the scheduled time an aircraft near the origin that neither climbs nor descends is taken for the leg only when it was on the ground at the origin before or flies away from it.
2026-11-23 20:02:10 +01:00
Maurice 4519430610 fix(plugins): bind the single-array args form on Postgres as on SQLite
A plugin that passed its values as one array had the whole array bound to $1 on Postgres. The array is now spread when it fills the statement's placeholders, unless a placeholder takes an array itself.
2026-11-23 19:59:41 +01:00
Maurice b3845dbdfc fix(memories): wait for a public media copy just under the proxy timeout
No public page retries a 503 by itself, so a first view of a large video that took over 10 s showed a dead player. The request now waits up to 50 s before answering come back later.
2026-11-23 19:57:47 +01:00
Maurice e6a5ba095d docs(postgres): a backup restores into the same or a newer major only
The restore now refuses a dump from a newer PostgreSQL major, so the guide and the compose file no longer promise restores across every major.
2026-11-23 19:57:21 +01:00
Maurice 7a643d5f75 feat(plugin-sdk): let the mock host switch Documents off like the real host
With documentsAddonEnabled: false, files.* works only on attached files and files.create needs a link target, so a plugin's tests see what the host does on a trip with Documents off. The plugin guide says the same.
2026-11-23 19:57:20 +01:00
Maurice 4498f68cc9 fix(mcp): end live sessions again when documents is switched off
The doc-sync tools still gate on documents through instanceAddonGate, which the parity scan did not see, so documents is back on the list and the scan now reads that gate too.
2026-11-23 19:56:08 +01:00
Maurice 429a2fb017 fix(help): leave the guides a managed install cannot follow out of its help
A managed install offers no connection to a server the reader runs (photo libraries, AirTrail, Dawarich, wanderer) and no assistant or AI setup of its own, so the help no longer shows their guides there.
2026-11-23 19:55:53 +01:00
Maurice 07eeae8486 fix(dashboard): name Etc/GMT world clocks by their real offset
An Etc/GMT zone counts westward as positive, so Etc/GMT-4 is four hours ahead of UTC. The clock's title and the zone picker printed the id's own sign, and someone who picked GMT+4 got a clock four hours behind UTC; both now read the real offset, on the desktop and the phone.

Closes #3175
2026-11-23 19:42:40 +01:00
Maurice c8adf6e1da ci(client): give the client typecheck the heap the strict check already has
The whole program outgrew Node's default heap and the typecheck ran out of memory.
2026-11-23 19:40:15 +01:00
Maurice 44c7026e74 feat(i18n): translate the updated help center into every locale 2026-11-23 19:30:08 +01:00
Maurice b185375762 feat(help): bring every help center guide up to date and add guides for the new features
Every guide was checked against the current app, its text and script corrected where the UI had moved on, and its pictures rendered again in the library's style. New guides cover the trip assistant and setting up AI, tags on places, KML for Google My Maps, totals-only costs, split by shares, costs in another currency, receipts from trip files, per-trip addons, editing the trip in Trip settings, booking mails and their notices, live flight status, the collections map lock, album date ranges, the journey satellite layer, the folding place card, a tour's route in a map app and more.
2026-11-23 19:30:07 +01:00
Maurice ea8202948d chore(help-media): let many media runs share one built client
E2E_WEB_PREVIEW serves client/dist with vite preview instead of a dev server per run; a dozen dev servers compiling the app at once timed out the setup login. The README also notes that mocked services need page.context().route once the service worker controls the page.
2026-11-23 19:30:05 +01:00
Maurice 7065e18454 fix(memories): answer 503 while a large public copy is still being made
A request now waits at most ten seconds for the location-free copy and is otherwise told to come back with Retry-After while the copy goes on being made, so a long video no longer holds the first request past a reverse proxy's timeout. Nothing but the copy is ever sent.
2026-11-23 17:33:00 +01:00
Maurice c4326ec545 fix(backup): refuse a Postgres dump from a newer server major before restoring it
The restore reads the server version the dump was taken from in its table of contents and refuses, naming both majors, before anything is cleared, from the admin restore (400) and from RESTORE_FROM_BACKUP alike.
2026-11-23 17:33:00 +01:00
Maurice b03597957c fix(db): let the primary key index serve MikroORM find orders on Postgres
A find ordered by its entity's own primary key now renders the NULL position the btree holds, so ORDER BY id DESC LIMIT n reads the index instead of sorting every matching row. A key is never NULL, so the rows come back in the same order.
2026-11-23 17:33:00 +01:00