Commit Graph

2877 Commits

Author SHA1 Message Date
Maurice 091ad0f23d fix(collab): keep the keyboard open after sending a chat message
The send button in the trip chat cancels its mousedown like the note format bar, so the native app no longer closes the keyboard after every message.
2026-11-23 15:45:26 +01:00
Maurice 2b21407cf9 fix(admin): open the tab a link names while the admin page is already open
The active tab now follows ?tab= when only the query changes, so a help guide's go to screen link reaches the Services tab from the Security tab.
2026-11-23 15:45:26 +01:00
Maurice 464d5aa902 fix(native-share): read every trip's Collaboration when the share sheet opens and keep it settled
A Collaboration switch on a trip not open on this device now counts for a shared link, and a later reload of a trip's list no longer hides the trips or saves a refused link again.
2026-11-23 15:45:26 +01:00
Maurice b9637ff90c fix(trip-addons): let a second reader wait for the trip's list being read
A read started while another one runs now answers with that read's list instead of the one held before, so the offline sync no longer skips the Tours and Road trip caches next to a planner load.
2026-11-23 15:45:26 +01:00
Maurice 918efe35fe fix(costs): show the owe and owed cards as unknown instead of settled while the balances are
A failed read, a read still running or flows in another currency no longer print zero with the settled line on desktop and phone. Flows the server answered in the trip currency are converted at the rate the read sent along.
2026-11-23 15:45:26 +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 965b519f23 test(notes): wait for the caret frame before typing in the numbered list test 2026-11-23 12:11:46 +01:00
Maurice 3ec7cc73b2 fix(notes): number list items in order from the format toolbar
The numbered list button always inserted '1. ' and only on the caret's line, so writing a list item by item left 1. 1. 1. in the field. It now continues from the item above and formats every line of a multi-line selection (bullets and quotes too).
2026-11-23 12:05:03 +01:00
Maurice 493571c559 fix(android): log the address and sender of a page that fails with an HTTP error
When the server's page came back with an error status, the app went to the
address screen with "HTTP 503" and logged nothing, not even which page it
was. A report could then not tell the server, a proxy in front of it and
something on the phone apart: the reporter's Cloudflare and Traefik logs
show no 503, and the page was not requested at all.

Every main-frame HTTP error is now logged under TrekShell with the page's
address (without its query, where a sign-in page carries a challenge), the
status, the reason phrase and the headers that name whoever answered
(Server, Via, CF-Ray, Content-Type). An answer with none of them says so,
which points at something on the phone. What the app does with the error
is unchanged.

Refs #3014
2026-11-22 22:58:02 +01:00
Maurice 28f750f7c4 fix(pdf): give formatMoney a locale, lower the strict entry of the export
lint:strict: a place's price passed the export's locale, which can be
undefined, to formatMoney; it falls back to en like the export's other
money figures. The rewritten TripPDF.tsx holds 1 strict error instead of 38,
and its entry is lowered to that.
2026-11-22 22:28:09 +01:00
Maurice 8c9cf4a80c fix(pdf): handle a failed cover bake where it happens, lower the eslint baseline
Client types: the overview test used Array.prototype.at, which the client's
lib setting does not include; it reads the last cell with slice instead.

Client lint: the export swallowed a failed cover bake with .catch(() => null).
bakePdfCover now catches a canvas that will not draw or encode itself and says
why, so the export calls it plainly. The rewrite also leaves fewer warnings,
and the baseline is lowered to the counts the run measured: complexity 216,
no-explicit-any 138, no-unused-vars 117, and in the tests
no-non-null-assertion 1872.
2026-11-22 22:19:51 +01:00
Maurice b33d592325 perf(pdf): draw the first pages once, not on every scroll
The cover and the route overview stuttered in the preview and in the saved
file, in every viewer:

- The cover photo was embedded at its upload size, 4000 px and more, under
  a translucent gradient across the whole page, which every viewer had to
  composite again on each redraw. The export now crops the photo to the
  page at print size (A4 at 150 dpi) and paints the shade into it, one flat
  JPEG. A photo from another origin keeps the photo and the gradient.
- The route overview drew every point of the routed roads, about 35,000 on
  a two-week trip and most of them on the same pixel, twice each (casing
  and line). Points that round onto the one before are dropped and the rest
  thinned within a third of a pixel (Douglas-Peucker): about 900 points,
  the same shape on paper.
- The cover's glass is a tinted fill without a backdrop blur, and the
  casing under the cover route is opaque.

Also spells out the span and status keys so the key check can follow them,
keeps types nothing imports private, and drops the export's theme and rtl
baseline entries, which reach zero.
2026-11-22 22:10:52 +01:00
Maurice 590b174dd1 feat(pdf): draw the trip's route on the cover, keep its figures on one line
The cover gains the trip's own shape: every routed day drawn in its map
colour on a glass card beside the title, a band of the days' colours with
the first and last date under it, and the dates on a pill above the title.
The figures sit in one row and never break inside a number.

Print engines leave out a backdrop blur, so the glass gets a tinted fill
that reads on paper; the blur stays for the preview. The dates of the day
overview are aligned to the start.
2026-11-22 21:52:27 +01:00
Maurice 2a833c4ba9 fix(pdf): keep a note's second line in its card, fill the preview width
A day note's time field is the free line the day plan prints under its
text, not a clock: it printed in the narrow time column and broke into a
word per line. It stays in the card again, and the time column is empty.

The preview showed the A4 sheet at its print width inside the wider
dialog, with a pale band on either side; on screen the document now fills
the frame, as it did before. The stops column of the day overview is
centred under its pin.

Tests for the day's cards, the cover and overview, and the new preview
switches.
2026-11-22 21:43:34 +01:00
Maurice a5de1bc52d feat(pdf): redesign the trip PDF
The trip PDF gets a new layout in the app's current look, with nothing it
printed before left out and more of each place on the page.

- Cover: the trip photo full bleed, title and dates over it, the trip's
  figures on frosted tiles.
- Overview: the route map, every day at a glance (colour, date, plan, the
  night's stay, stops, cost) and all bookings and stays with their codes.
- Days: the header in the day's map colour, a photo strip of the day's
  stops, where the night is spent, then the plan as a timeline with the
  times on the left.
- Places: photo or category tile, category, duration, price, rating, tags,
  address, coordinates, description, notes, opening hours of that day,
  phone, website, e-mail and the members going. The rating, e-mail, hours
  and reservation note come from the trip's place, since the assignment
  only carries a projection of it.
- Bookings: route first, then airline, number, seat or platform as badges,
  each leg with its own code, status and the booking's code.
- A second row of switches in the preview: overview, photos, coordinates,
  and contact and hours, next to page per day, large text and transport
  notes. Each one is a class on the document and remembered.

The document is split into modules for its helpers, icons, stylesheet,
cover and overview, and the day, so the export itself only gathers the data.
2026-11-22 21:34:29 +01:00
Maurice 1b20214a7f fix(planner): show the drive to a rental car's return and away from its pickup
On the day a rental car is picked up the route ended at the desk, and on the
day it is returned it started at the return, the way it does for an overnight
train. The drive with the car itself showed nowhere: a stop planned before the
return got no travel time to it, in the day plan on the phone and the desktop
and on the map, and neither did the first stop after the pickup.

A car or bicycle rental is now a stop the day's drive passes through on those
two days. Bookings that are ridden keep their one-sided endpoint, and two
bookings back to back still get no drive between them (#1394).
2026-11-22 19:48:34 +01:00
Maurice 3e8496dce6 feat(ios): hide the status bar where a corner capsule was measured
On a window where the app measured an element in a top corner, an iPhone
Duo's status capsule, it now hides the status bar, which is meant to take
the capsule away; whatever still covers the corner stays in the safe area
the page keeps clear of. Each window size keeps its answer once seen, so
hiding the bar never brings it back, and the folded and unfolded displays
decide on their own. Devices without such an element are not affected.
2026-11-22 19:36:31 +01:00
Maurice ea1b75e639 fix(mobile): keep every screen clear of the iPhone Duo's status capsule
The capsule in a top corner was handled screen by screen: the m-corner-*
classes and --m-corner-clear put bars beside it and lifted content below
it, so every layer that did not opt in sat under it, and testers found it
on almost every page.

It now counts as safe area in mobile.css. Upright the top inset reaches
below the capsule and the sides keep their full width; on a wide window
its side is given up over the whole height instead. The per-screen
handling and corner.css are gone. Control rows a screen places itself and
layers that fill the window keep to the side insets through m-safe-row and
m-safe-trail, and the trip's pane keeps its content off the capsule's side
on a wide window. On every other device the insets come out as before.
2026-11-22 19:36:31 +01:00
Maurice 49b9ffc77d fix(client): keep the seat change clear of the sheet's held ref and of non-null assertions
Client lint was red: passing the ref-held reservation to bookingSeats added a react-hooks/refs warning in MTransportSheet, so the sheet now reads the seats from the legs it already has (seatsOfLegs). The new PDF test used a non-null assertion.
2026-11-21 15:45:04 +01:00
Maurice adb6a2c80d fix(planner): show each leg's own seat on a flight with a stop
A flight with a stop saves a seat per leg, but every view read the
booking's flat seat, which mirrors the first leg's. A seat booked only on
the second leg showed nowhere, and one on the first leg showed on both.
#2701 had fixed this for trains only.

- getFlightLegs reads each leg's seat. The first leg falls back to the flat
  seat, as the booking form does, so older bookings keep theirs.
- bookingSeats lists the seat of every leg that has one with its route.
  The detail views (the phone's transport sheet, the booking detail) show
  each leg's seat under its route ("Seat IST → JFK"), and a leg opened
  from its row shows its own. The cards and field grids (bookings list,
  the phone's Bookings and Transports tabs, the day plan's transport
  detail) hold every seat in one Seat cell, so a card cutting its grid
  short no longer drops the second leg's.
- The day plan's flight leg rows carry their seat, and the PDF prints a
  flight's seat, direct or per leg.
- The watch and the Wallet pass name every leg's seat of the booking.
- A legs-only MCP update sets the flat seat, airline and flight number
  (train number and platform) again from the new first leg, so a seat
  taken off the first leg does not live on in the flat seat. A flat value
  the stored first leg never had stays.

Closes #3158
2026-11-21 15:24:52 +01:00
Maurice 1824cc77ec fix(ci): bring the per-trip addon tests and ratchets in step
The second run of #3157 was red in six jobs:
- Server types: ReminderJobsService takes AddonsService now; RJOB-007 built
  it with five arguments.
- Server tests 2/10: the doc-sync job tests stubbed AddonsService without
  isEnabledForTrip, which the sync asks per trip now.
- Client tests 4/10: toursPermissions mocked useAuthStore as a bare
  selector; tripAddonsStore keys its lists by account through getState.
- Server lint (knip): TripAddonRow was exported without a reader outside
  its file.
- Client lint and Client types: no-unused-vars and the strict errors in
  useTripPlanner.ts went down by one, so their entries are lowered.
2026-11-21 14:00:02 +01:00
Maurice 9956c58dd5 feat(client): follow and switch a trip's own addons
- The trip's addon list is read through tripAddonsRepo into
  tripAddonsStore (per account and trip, kept in Dexie version 16 for
  offline), refreshed when the connection returns and live on
  tripAddons:changed.
- The planner's tabs, dock, rail and deep links, the cost, tour and list
  readers, the PDF export, the share link options, the widgets and the
  watch follow the trip instead of the instance switch.
- Trip settings gets an Addons area for the owner, on the desktop dialog
  and the phone sheet, on one useTripAddonRows hook: each trip addon with
  its switch, marked "This trip only" while it differs from the instance.
  Switching back to the instance's value drops the trip's choice.
  Switching needs a connection.
2026-11-21 13:23:09 +01:00
Maurice f668eee227 test(client): drop the two new non-null assertions in the addon card tests
Client lint was red: lint:warnings counted 1877 no-non-null-assertion warnings in tests against a baseline of 1875, both from closest('section')! in FE-ADMIN-ADDON-045 and 046. Cast to HTMLElement like the other card lookups in the file.
2026-11-21 10:59:35 +01:00
Maurice 711015d5fd feat(admin): live flight status, booking mail import and paddle water data as rows of the addon cards
The addons page listed the trip, global and integration addons and then three
loose cards under them: live flight status, the booking mail import and the
paddle water data. They now sit where they belong, as rows of the cards:

- Live flight status is a row of the trip card, with its switch, locked when
  FLIGHT_LIVE_ENABLED holds it.
- The booking mail import is a row of the integration card with its switch;
  while it is on, "Set up mail import" opens the transport, address, AI
  allowance, test and status in a dialog, the way AI is set up.
- The paddle water data are a row under the Tours addon that opens the
  regions in a dialog, counting the open requests, else the regions.

The phone follows with the same rows and bottom sheets. The setup row and the
setup dialog are shared components (AddonSetupRow, AddonSetupDialog on the
desktop, MAdminOptionRow and MAdminSetupRow on the phone), the card counts
stay the addons' own, and the settings tab loses its features part.
2026-11-21 00:23:13 +01:00
Maurice 6ebd5cf0c7 fix(mobile): a road trip stage draws only its own rides, not the drive's flight home
The phone's road trip tab shows one stage at a time, but its map drew the
arcs of every ride that seams the whole drive, plus every booking switched on
for any day. A flight home on the 12th then crossed the map of the stage on
the 9th, with its airport label, as if it were part of that day.

The stage now draws the rides that seam its own drive, whatever day they were
booked on, and of the bookings switched on by hand only those that run on the
stage's day. The all-days view and the desktop, which shows the whole drive,
are unchanged.
2026-11-20 23:00:52 +01:00