Commit Graph

5642 Commits

Author SHA1 Message Date
Maurice e7e3592d97 fix(flight-live): tell a delay only to the bookings it is late for
Bookings that share one flight state can hold different scheduled times, so the delay notice now goes only to the legs whose own departure is at least fifteen minutes late instead of telling the others it is delayed by 0 minutes.
2026-11-23 15:11:39 +01:00
Maurice 8e51410251 fix(flight-live): do not read an earlier sector's aircraft as this flight having departed
Before the scheduled departure, an aircraft in the air that is no nearer the destination than the origin is now stays unpicked, so booking only the later sector of a through flight no longer sends the departure notice hours early.
2026-11-23 15:11:39 +01:00
Maurice 22c3381044 fix(tags): keep a trip's tags when the member who created them deletes their account
The trip tags a deleted user created now pass to each trip's owner before the user row goes, so the tag and its place assignments no longer cascade away for everyone else on the trip.
2026-11-23 15:11:38 +01:00
Maurice 25ded7319a fix(ios): hand a widget launch link to the UI only once
A tap that launched the app went to the UI as a held quick action and to
Capacitor as the launch URL, which a server UI before appLinks followed
as well, pushing the page twice. Capacitor now gets the launch without it.
2026-11-23 15:11:38 +01:00
Maurice b6006c8265 fix(ios): hide the status bar beside a corner element only on an iPhone
The status bar goes for the iPhone Duo's status capsule; an iPad's window
controls give the same corner signal and no longer hide its bar. The corner
insets still reach the page on every device.
2026-11-23 15:11:38 +01:00
Maurice bd215b7ec7 fix(ios): open the offline copy when an update rechecks an unreachable server
The recheck after an update ran on every bridge, also on the one the
offline start restarts, and moved the server it had just put back out
again, so the app looped between the address screen and a restart.
2026-11-23 15:11:38 +01:00
Maurice 98a05fa1fd fix(ios): read widget and watch dates in the Gregorian calendar
The app writes its days as Gregorian yyyy-MM-dd, but the widgets and the
watch built their keys in the device's calendar, so a Buddhist or Japanese
calendar matched no trip day and dropped every dated booking.
2026-11-23 15:11:38 +01:00
Maurice 0e918820c3 fix(widgets): keep every stop of the day the snapshot was written on
The days ahead keep only their first 16 stops, and the widget read today
from that list too, so on a busy day it showed the wrong next stop. The
full day the app wrote now stays in place on its own date.
2026-11-23 15:11:38 +01:00
Maurice a701d89fb9 fix(android): keep the start page's boot scripts in the offline copy
theme-boot.js and shell-guard.js come from the public folder, which the
build manifest does not list, so an offline start waited on the unreachable
server for them before the first paint. They are now stored and refreshed
on every launch.
2026-11-23 15:11:37 +01:00
Maurice 4fead3259d fix(android): keep a sign-in proxy's page out of the offline copy
The copy now only stores answers that come from the server itself and no
HTML in place of a script or stylesheet, so a proxy's login page no longer
replaces the stored UI.
2026-11-23 15:11:37 +01:00
Maurice 4fd8f3987f fix(planner): treat the trip opened before as still loading when another one opens
The store kept the previous trip until loadTrip ran after the first render, so the desktop planner mounted with that trip under the new id for a frame.
2026-11-23 15:11:37 +01:00
Maurice 855ec37935 fix(mail-ingest): read the inbox again when it changes while a read is on its way
A reload asked for during a read was dropped and the older answer overwrote the newer count, and an entry decided meanwhile came back with it.
2026-11-23 15:11:37 +01:00
Maurice 310e5fba8f fix(mail-ingest): forget the mail import of an account on sign-out
The store kept the forwarding address, the inbox and the badge count across a logout, so the next account on the same tab saw them until its own read landed, or for good when that read failed.
2026-11-23 15:11:37 +01:00
Maurice 8f5324c901 fix(pdf): draw the cover route of a long road trip without spreading every point into one call
The bounds came from Math.min and Math.max over all routed points, which throws past the engine's argument limit and failed the whole export on Safari and the iOS app.
2026-11-23 15:11:36 +01:00
Maurice 97c0d992c8 fix(pdf): order a day's bookings in the overview by the clock in 12h too
The booking list sorted on the printed time, so for a 12h reader 1:00 PM and 10:00 AM came before 9:30 AM.
2026-11-23 15:11:36 +01:00
Maurice cd32f07bf5 fix(roadtrip): offer and save a visit's stay under the day plan right on the desktop
The rail and the inspector offered the stay to anyone who may edit places, while a saved visit's stay needs day_edit, so the dialog closed without saving and the stop popup wrote half its change before a 403. Refusals now say so before anything is written.
2026-11-23 15:11:36 +01:00
Maurice 3c00544e93 fix(native): keep the keyboard open for controls that hold the focus in their field
A tap away blurred the field on touchend, before the sign toggle or the note format bar could cancel their mousedown, so the keypad closed mid entry. The field now lets go only once the tap's pointerdown and mousedown pass uncancelled.
2026-11-23 15:11:36 +01:00
Maurice dec3058777 fix(help): show the settings help on the admin Security and Services tabs
Both tabs fell back to the admin overview without guides, and the guides for API keys, providers and file types opened the Security tab instead of Services.
2026-11-23 15:11:36 +01:00
Maurice e459ec6e60 fix(mail-ingest): ask before closing the booking mail setup with changes not saved
The setup only keeps its fields through its own Save, yet Close, the close mark, the backdrop and the phone sheet dropped them without a word. Now each way out asks, and discarding puts the saved values back.
2026-11-23 15:11:36 +01:00
Maurice ba45dbc874 fix(admin): draw no divider under an addon whose sub-rows render nothing
A switched-off booking mail import passed false as its only child, which Children.count counts, so an empty list with a top border showed under the row.
2026-11-23 15:11:35 +01:00
Maurice fa8e1b68bd fix(mail-ingest): set an inbox entry aside once its booking is saved through Fill in yourself
The entry stayed pending after the prefilled booking was saved, kept its Add action and counted in the badge, so it could be added a second time.
2026-11-23 15:11:35 +01:00
Maurice 755ca865a4 fix(mail-ingest): open the prefilled form again for an entry asked for twice in the same trip
The guard kept the last handled entry after the link left the address, so a second Fill in yourself for it in the open trip did nothing.
2026-11-23 15:11:35 +01:00
Maurice a3caa9ca1a fix(costs): count only balances read in the shown currency in the owe and owed cards
After a currency switch the cards kept summing the flows of the previous currency, offline or while the new read ran, and printed them in the new one.
2026-11-23 15:11:35 +01:00
Maurice 344580d343 fix(share): decide what a shared link is for once the trips' Collab is read
The share sheet waits for the trip list and each trip's own Collaboration before
it acts on the share sheet's trip, and reads only the addon lists it does not hold.
2026-11-23 15:11:35 +01:00
Maurice 36ea9bdb3e fix(trip-addons): keep a pushed addon list over an older sync read
The sync reads a trip's addons through the store's load, so a tripAddons:changed
push that lands during the read stays on screen and in the offline copy.
2026-11-23 15:11:34 +01:00
Maurice c3d60e1c43 fix(sync): read the open trip's addons again after the socket reconnects
A tripAddons:changed push is not replayed, so a switch made while the socket was
down now reaches the member on the reconnect refetch.
2026-11-23 15:11:34 +01:00
Maurice 769293a554 fix(trip-addons): read the trip's lists again when their addon is switched back on
The sections of an addon that was off were read as empty, so switching Lists,
Costs or Documents back on while the trip is open now reads the trip again.
2026-11-23 15:11:34 +01:00
Maurice 56ce66f666 fix(offline): park a queued delete that a switched-off addon refuses
The 404 a route answers while its addon is off keeps the entity on the server, so
the queued delete is parked as failed and offered for retry instead of dropped.
2026-11-23 15:11:34 +01:00
Maurice fd10ce2876 fix(plugins): show a trip page that replaces a core tab while that tab's addon is off
A trip-page plugin that replaces Lists, Costs, Documents or Collab is a stand-in
for the core tab, so its own tab stays on the trip whatever that addon is set to.
2026-11-23 15:11:34 +01:00
Maurice 9d4e52ddfc perf(db): let Postgres serve ORDER BY id from the primary key
A Kysely ORDER BY on the id of a table the statement reads in its FROM no longer gets SQLite's NULL position, which no primary key row needs and which kept Postgres from reading paged latest-first lists such as the audit log off the index.
2026-11-23 15:11:34 +01:00
Maurice 52a6fbbc92 fix(scripts): read the server's .env in the admin reset and the key rotation
Both scripts now load server/.env as the server does, so an install whose TREK_DB_URL lives there resets the admin and rotates the key in its Postgres database instead of in a SQLite file left behind by the move.
2026-11-23 15:11:33 +01:00
Maurice de1c3b8ea6 fix(scripts): rotate the SQLite file TREK_DB_FILE names
The key rotation now opens the database the server runs on when TREK_DB_FILE is set, writes the new key to the key file the server reads, and refuses DB_PATH and TREK_DB_FILE naming different files.
2026-11-23 15:11:33 +01:00
Maurice 60885627b1 fix(scripts): rotate the wanderer token with the encryption key
The key rotation now re-encrypts wanderer_connections.token, so a wanderer connection keeps working after the key changes instead of calling out without its token.
2026-11-23 15:11:33 +01:00
Maurice 9c454a04e1 fix(db): keep plugin index names when moving plugin data to Postgres
The move now creates each index a plugin named under that name, so a later plugin migration that drops or alters it by name finds it on a moved install as on a fresh one.
2026-11-23 15:11:33 +01:00
Maurice 6a6c403860 fix(db): keep booking to stay links of old installs when moving to Postgres
An install from before April 2026 stores reservations.accommodation_id as an INTEGER, so the move now writes such a stay id as the '<id>.0' text TREK compares it as, instead of '14', which no longer matched the stay on Postgres.
2026-11-23 15:11:33 +01:00
Maurice e51902a03b fix(reservations): drop a stay id from another trip when a booking is created
Create now checks that the linked stay belongs to the trip, as update already does, instead of storing a link to a stay that does not exist there.
2026-11-23 15:11:33 +01:00
Maurice 3a2645a3e4 fix(db): match a booking to its stay on Postgres without failing on odd ids
The Postgres stay match now casts the leading digits of the stored text as bigint, the way SQLite reads it, so a non-numeric or oversized accommodation_id no longer fails the calendar, share and stay reads for every trip.
2026-11-23 15:11:32 +01:00
Maurice bf8677a28c fix(backup): name the client tool when pg_restore cannot read a Postgres dump
A missing pg_restore, or one older than the pg_dump that wrote the archive, was reported as an invalid dump. The refusal now says which tool to install or point TREK_DB_PG_BIN_DIR at.
2026-11-23 15:11:32 +01:00
Maurice 89da19e535 fix(backup): refuse a Postgres restore the role or tools cannot run before anything is copied
The admin restore now answers a privileged role, old client tools or an unreachable server with a 400 naming the reason, before it keeps a pre-restore dump. RESTORE_FROM_BACKUP checks the same before it unpacks the archive, and removes the unpacked copy when the load fails.
2026-11-23 15:11:32 +01:00
Maurice e630e92183 fix(backup): clear a Postgres schema holding views or functions over TREK's tables
A table dropped with CASCADE takes its views and functions along, and the clear then rendered their stale oids as bare numbers and failed the restore. Rows whose object is already gone are now skipped.
2026-11-23 15:11:32 +01:00
Maurice bb2b4a1f5a fix(backup): restore Postgres backups into PostgreSQL 14, 15 and 16
pg_restore 17 and later write SET transaction_timeout at the top of every script, which older servers refuse under ON_ERROR_STOP. The restore now leaves settings the target server does not know out of the script while it streams.
2026-11-23 15:11:32 +01:00
Maurice 626e19c534 fix(mail-ingest): keep bookings the data names that the AI left out
When the AI returned fewer bookings than the machine-readable data, the others were dropped without an entry.
2026-11-23 15:11:31 +01:00
Maurice 8f5988ee33 fix(mail-ingest): match each AI leg to the data leg it agrees with
Under one booking reference every leg after the first was compared with the first and went to the inbox as a disagreement.
2026-11-23 15:11:31 +01:00
Maurice 4cef885e12 fix(mail-ingest): never queue a mail again for a failure after its commit
An error in the announcements, documents or notices after a mail was written sent it back to the queue, which duplicated its entries or marked it failed.
2026-11-23 15:11:31 +01:00
Maurice 303d161ecf fix(mail-ingest): keep a booking that fails the item shape in the inbox
Such a booking made the whole mail fail and retry instead of waiting to be filled in by hand. A reference read as a number is now read as its text.
2026-11-23 15:11:31 +01:00
Maurice eaa557343e fix(mail-ingest): compare look-alike bookings at their wall time on any server zone
The window around a booking's start went through the host time zone, so on a server outside UTC it missed a booking at the same local time and added it twice.
2026-11-23 15:11:31 +01:00
Maurice dea903f011 fix(booking-import): treat a booking a forwarded mail added as already imported
The file and assistant import only looked for bookings the file import wrote, so the same booking arrived twice when it had come in by mail first.
2026-11-23 15:11:30 +01:00
Maurice 91edf0c565 fix(mail-ingest): announce a place a mail created with its whole row
The open planners of the trip received only the new place's id and kept a nameless place without coordinates until a reload. The broadcast now carries the row the place routes send.
2026-11-23 15:11:30 +01:00
Maurice 403b7d2f93 fix(mail-ingest): make the own address once when two views ask for it together
The first look at the settings made the address outside a transaction and always revoked the live one, so two requests at once could leave a view showing a revoked address. It is now checked and made in one transaction and never replaces an address it finds.
2026-11-23 15:11:30 +01:00
Maurice 5d4cfec3b6 fix(mail-ingest): list the mail import tools only while the import is on
Every mail tool answered 'Mail import is not available' on installs that never switched the import on, which is the default, so they are now gated like the addon tools.
2026-11-23 15:11:30 +01:00