Commit Graph

2745 Commits

Author SHA1 Message Date
Maurice daa4e1dfcf test(planner): an older place lookup that answers last does not replace the newer results 2026-11-18 23:30:37 +01:00
Raz Erlich 9a7bce6fd8 fix(planner): scope transit picks by day and rank other stays by date 2026-11-18 23:30:36 +01:00
Maurice 3e0a2ef8ed fix(native): widgets turn to the next trip day by themselves
TestFlight feedback: during a trip the widgets stayed on day 1 until the app
was opened again. The app wrote only today's day into the widget snapshot,
and only while it ran, so every timeline entry after midnight still showed
the day it last ran, with its stops all ahead again.

The snapshot now also carries the trip's days from today on (a month at
most, sixteen stops a day), each with its date. On iOS every timeline entry
takes the day of its own date, so the quarter-hour entry at midnight turns
the widget to the next day, and the bookings list drops the days behind; the
Android widgets do the same on each update. A snapshot from an app without
the days reads as it was written, and an older app binary ignores them.
2026-11-18 22:21:26 +01:00
Maurice fd35f79c36 fix(mobile): keep every screen clear of an iPhone Duo's status capsule
TestFlight feedback: on an iPhone Duo the status capsule in the top right
corner covered the trip's controls, its day chips, the map's category bar and
the first cards of every trip tab, upright and on its side. The app has
measured the capsule since 0f42b8b8a, but only the shell's own bars and page
used it, and the trip, its map and the sheets place their own controls.

- Upright, a control row in the capsule's height stands beside it and the
  content starts below it: the trip's top row and day chips, the map's
  category bar, the road trip's stage bar, every trip tab's first row, the
  places browser, the plan timeline, docked and card sheets, the assistant,
  the account menu, the image viewer's close button, the atlas search,
  vacay's header and a journey's content and map controls.
- On a wide window the page gives up the capsule's side over the whole
  height instead, as an iPhone on its side does for its camera: lifting each
  page below the capsule cost a quarter of the height of an unfolded Duo.
  The list tabs, the assistant panel and the form sheets end before it too.
- Screens whose first row is part of the page (settings, administration,
  collections) are lifted until that row is below the capsule; screens that
  keep clear of it by themselves (atlas, vacay, a journey) are not lifted.
- Right to left the rail stands on the capsule's side and takes it.

All of it reads the corner variables the app publishes, which are 0 on every
other device and before iOS 26, so nothing else moves. The rules for the
screens that place their own controls live in mobile/corner.css.
2026-11-18 21:23:14 +01:00
Maurice 294a386d23 fix(planner): take a ?tab=, ?day= or ?assistant= link once per URL
React Router lands the URL without the link as a transition. Until it does,
every render still read the link, and the tab link took it again on each of
them: selectTab is a new function per render and onLinked sets state, so a
notification's ?tab= link rendered the planner into React's update limit and
the route's error page replaced the trip on an iPad or an unfolded foldable.
Both link hooks now take a link once per URL and wait for the cleaned one;
the same link in a new URL is taken again.
2026-11-18 21:23:03 +01:00
Maurice ee79413653 fix(mobile): keep the navigation rail's list ref stable
The rail's list ref was an inline function that set state. React 19 detaches
and re-attaches a ref whose function changed, so every commit set the list to
null and back and asked for one more render of the rail. The ref is one
function for the rail's lifetime now.
2026-11-18 21:23:03 +01:00
Maurice ec08915a16 fix(trips): a day added before the start leaves the plan on its dates
Adding a day before a trip's start with "Keep bookings on their dates"
moved almost everything a day earlier and emptied the last day. The day
grid was always rebuilt by position: the n-th day row took the n-th date
of the new range. With bookings kept on their dates, only timed bookings
and stays were re-anchored afterwards. Places, day notes, bookings with no
time and a booking's place in a day's order stayed on their re-dated rows
and slid to the day before. Days added at both ends had the same problem.

planDayGrid now takes keepDates. When the new range still holds every
dated day, each of them keeps its date and the new days go around them.
The server passes it unless the traveller chose to shift everything, and
the trip dialog's warning check uses the same rule. A moved or shorter
range still follows the positional rule the dialog describes, and "Shift
everything" still moves the whole plan with the new start.

Two things keyed outside the day rows followed the old rule. Road trip day
boundaries are keyed by day number, so a new first day left each one on
the day before its own. They now follow their days to their new numbers
and go out to every screen. The owner's leave days moved by the change of
start even when days were only added. They now move by as far as the
trip's first day moved, which is nothing when days are only added. The
help text of the option and the MCP description say what happens when
days are added.

Closes #3119
2026-11-18 17:14:38 +01:00
Maurice 40f9c020bb fix(bookings): show the calendar date beside transport times
Tapping a transport in the compact Transports or Bookings list on the phone
opens the transport sheet, and its time boxes showed only the clock time. The
sheet named a date only in its subline, and only for a booking with no route
and no airline or number, so a flight or ferry could not be placed on a day
without unfolding the whole list. A transport holding only times (its date
lives on the linked trip day) had no date at all, and the desktop transport
detail dialog had the same gap: it read the date off reservation_time alone
and never named the arrival day of an overnight trip.

The dates now come from one helper, bookingDates(), which reads the booking's
own date, then the stop's local date, then the linked day's date, the rule
bookingFacts already used and now shares. The phone sheet prints the date
above each time (a leg opened from its row uses its own days); when no time
box carries a date, because no time is entered yet or the live flight card
stands in their place, the subline names the day instead. The desktop dialog
names the day, or both days of an overnight trip in reading order, in the
user's locale.

Closes #3122
2026-11-18 16:52:18 +01:00
Maurice 684a3bf5f5 fix(roadtrip): draw the drive between connected days in the arrival day's colour
With "Connect the days" and "A colour per day" on, the drive from one day's
last stop to the next day's first stop was coloured as the day it left. A stop
reached after midnight was handled the same way: the line into it kept the
colour of the day it came from. The road trip panel counts both drives toward
the arriving day (its distance includes them, and the setting's hint says
connecting drives count toward the arrival day). So the map showed the drive
under one day while the panel counted it under the other. This also happened
with daily travel times set to end the day at the last place, whenever the
schedule could not be kept (a drive longer than the window) and the days were
drawn as stored.

assembleRoadtrip now puts every line drawn into a day under that day's
number, the day whose figures count it, and still marks it as a join, so the
one-day stage view still leaves it off. Every map takes its day colours
from this list: desktop Leaflet and Mapbox GL, the phone map and its stage
view. The client tests that pinned the old colouring and the old join order
now expect the new ones.

Closes #3123
2026-11-18 16:52:17 +01:00
Maurice 17b47b38b9 test(places): wait for the new tag's tick, not only the tag
The tag reaches the trip's list before the form ticks it, so the button
could be found in the moment between and read as not pressed.
2026-11-17 10:12:33 +01:00
Maurice c203b0a597 test(places): look for the hidden tab's formatting buttons too 2026-11-17 09:27:49 +01:00
Maurice b36fefdf5d test(places): keep the place form's test file at its size
The tab changes had grown it past its line budget; the labels of the texts
are covered by PlaceFormTexts' own tests.
2026-11-17 09:20:46 +01:00
Maurice c8e48460b6 fix(places): settle the gates for the place form rework
The text tabs name their field type for the switch, so it type-checks. The
colour field's sliders run left to right in every language and say so with
dir=ltr and a logical inset. The new phone fields take their sizes from the
type tiers or fs() instead of rem literals, the category field builds its
icon as an element, and the ESLint and theme baselines come down to what the
tree now holds. The tests follow the tabs (only the open tab's field and
formatting bar are shown), the category list and the files row, whose link
button keeps its place before attach.
2026-11-17 09:08:41 +01:00
Maurice 5ecf3001af fix(places): keep the hooks' helper types to their files
knip counts an exported type nothing imports; the tabs' row type and the
hours' field type are only used where they are declared.
2026-11-17 08:57:18 +01:00
Maurice a3f6635633 feat(places): colour tags, tabs for the texts and opening hours on the phone
Tags on the place form are pills in their own colour, with a palette under
the dot that recolours a tag for the whole trip (PUT /trips/:id/tags/:id was
there already, the client now reaches it through repo and store) and a
custom colour field of its own instead of the system picker. A new tag is
made in a colour picked the same way.

Description, notes and the note for one day's visit sit in one card under a
switch, each with a line on where the text shows up; the day tab is named
after its day and is only there with one visit in context. Nothing about the
three fields changes underneath.

Opening hours get a switch for open around the clock next to closed. Google
writes a place open all week as one period on Sunday that never closes; it
read as Sunday open and every other day closed, and now opens every day.

The phone form follows the desktop: category as one field with a list, tags
in one field, the texts switch, and phone, e-mail and opening hours, which it
did not have. The hours and the text tabs are shared hooks (usePlaceHours,
usePlaceTextTabs). Files and costs on the phone sheets are drawn as fields
like the rest, and the paste hint, a keyboard shortcut a phone has no use
for, is gone with its key.
2026-11-17 08:44:46 +01:00
Mariano 33d074c786 feat(places): tags on places, owned by the trip
A place keeps its one category, which decides its marker, and can now carry
any number of tags as extra labels to filter by.

- Tags belong to the trip (tags.trip_id): every member sees the same list and
  whoever may edit the trip's places adds, renames and deletes. Personal tags
  stay what they were.
- The place form picks them on desktop and mobile through one shared hook,
  usePlaceTags, and can add a new tag to the trip on the spot.
- The existing category filter of the places list lists the tags as well.
- Tags show on the place (inspector pills, phone place sheet); the marker is
  untouched.
- MCP: create_place, create_and_assign_place and update_place take `tags`,
  and list/create/update/delete_trip_tag manage a trip's tags.
- /api/trips/:tripId/tags and the tripTags:changed event keep every client
  of the trip in step.
2026-11-17 08:44:10 +01:00
Maurice 35dbcc2103 chore(deps): bump npm dependencies, jsdom 31, isomorphic-dompurify 4 and dotenv 18
The minor and patch group of #3108 without MikroORM: 7.2.9 refuses to set
the OAuth client reference from its client_id (the Postgres probe fails on
OauthTokens.insertToken and OauthConsents.upsertGrant), so MikroORM stays on
7.2.8 and with it better-sqlite3 and kysely, which it pins exactly.

mapbox-gl 3.33 shapes right-to-left text itself and removed setRTLTextPlugin,
so the engine registers nothing any more and @mapbox/mapbox-gl-rtl-text, its
Vite alias and the registration guard go. The WebAssembly module it loads
instead comes from api.mapbox.com, which the CSP already allows.

jsdom 31 and isomorphic-dompurify 4 move together, since the sanitizer needs
jsdom 31. jsdom is also a root devDependency now: listed only in the client,
npm nests it under client/ where vitest's built-in jsdom environment does not
find it.

dotenv 18 is loaded through `import 'dotenv/config'` only, which stays quiet.

Closes #3108, closes #3109, closes #3110, closes #3112
2026-11-16 21:20:33 +01:00
Maurice eb56e77600 fix(studio): hold photos back only in the export's sheets
The print-mode photos held their source back for the print view, but the
assistant also draws pages in print mode and needs its photos loaded. Only
the export's sheets now ask for it, the loader reads a minimal print
document like whenReady, and the new test helpers stay within the client's
TypeScript target and lint baseline.
2026-11-16 10:47:50 +01:00
Maurice 1a50e7f0ac fix(costs): settle up only in the currency the debts were read in
After switching the display currency the flows stayed in the old one until
the new read landed, or for good when it failed offline, and a settle-up
booked those amounts in the new currency. The ledger now remembers the
currency it read, drops answers to older reads and only settles flows read
in the one shown.
2026-11-16 10:45:24 +01:00
Maurice 856d1e5ea5 fix(flight-live): keep a past flight's times in its booking view
The booking dialog and the phone sheet hid their departure and arrival tiles
as soon as the store held any leg of the flight, but a leg long over or never
seen by the feed draws no live card, so such a flight showed no times at
all. Both views now hide the tiles only for legs that get a card.
2026-11-16 10:45:23 +01:00
Maurice aa8d041a33 fix(studio): load a large book's photos a few at a time for the PDF export
Every printed photo got its src at once, off screen in the editor and again
in the print frame, so a journey with a few hundred photos asked for every
original in parallel and the browser failed with insufficient resources.

The print markup now holds the source back, and the print view hands it over
four at a time, retries a failed photo once, gives up on one that never
answers and shows the progress on the Save button.

Closes #3102
2026-11-16 10:30:32 +01:00
Maurice 24bc132476 fix(planner): keep an untimed stop between the bookings it was dropped between
The desktop day list hides the stop a lodging booking puts on the day, but
the places are stored across the full day. Bookings and notes were positioned
by counting only the visible places, so every hidden row ahead of a stop
pushed it one slot behind the booking it was dropped above, and it fell
below the evening flight on every drag or arrow move.

Position bookings and notes in the same full-day count the places are
stored in, and share that count with the page's reorder.

Closes #3100
2026-11-16 10:29:47 +01:00
Maurice f728b568ed test(plugins): avoid a non-null assertion in the new frame visibility tests
The added test used querySelector('iframe')! which pushes the tests
no-non-null-assertion count one over its frozen baseline; cast instead.
2026-11-15 20:39:19 +01:00
Maurice c4a2a91578 fix(plugins): pause and suspend plugin frames when they leave the screen
A tester reported that their own plugin, fine on the web, slowed the app down
badly on a phone. A sandboxed plugin iframe keeps running its timers, polling and
animation even off screen, and on a phone it shares the WebView's main thread with
the whole app, so a heavy one janks everything.

The frame now watches whether it is on screen and the app in the foreground
(IntersectionObserver + page visibility) and forwards it as trek:visibility, so a
plugin can pause its work while hidden; the design kit exposes trek.onVisibility /
trek.isVisible and pauses its own CSS animations via data-hidden. On a phone a
dashboard-widget plugin scrolled well out of view is suspended outright: its iframe
is unmounted and a placeholder holds the widget's height, so an offscreen widget
costs nothing and remounts when it scrolls back.
2026-11-15 20:33:27 +01:00
Maurice a58d0117c6 fix(packing): a lighter visibility switch and bringers side by side in the item window
The picked visibility is a raised light segment on the grey track, like the
other pills in the window, instead of a black block, and the +N of further
bringers sits beside the first picture rather than over its initial.
2026-11-15 15:08:26 +01:00
Maurice 439736e904 fix(packing): stack the item window and the Lists menu on the app's layers
The item window sits on the layer of the other floating menus and the Lists
menu just above the bars, through the z-index tokens instead of numbers, and
the theme baseline follows the files the redesign left with fewer literals.
2026-11-15 12:51:20 +01:00
Maurice a65342574a test: bring the packing, todo and dashboard changes in line with the CI gates
Lower the lint and strict baselines the redesign made smaller, keep the
detail window and the todo tab under the complexity limit by moving their
choices into helpers, read the toast in the detail test through its module
rather than a window global, keep the new dialog focus case in the module's
existing test file, show the panel's progress once in the standalone header,
and point the planner wiring tests at the Lists menu.
2026-11-15 12:30:14 +01:00
Maurice 783a697d95 fix(dashboard): a long trip name in an upcoming booking ends in an ellipsis
The badge holds its text in an element of its own, which the ellipsis needs
inside a flex badge, and the row's middle column may shrink below its content.
2026-11-15 12:23:27 +01:00
Maurice b8966330e0 test: keep the bringer and panel width changes within the lint and RTL ratchets
The bringer tests read their items through a small type instead of any, the
panel hook names its two ceilings after the panels rather than the sides, and
the stored-width test runs on a window wide enough for the map's share.
2026-11-15 12:22:12 +01:00
Maurice cb1b5dd88c fix(dashboard): upcoming bookings read cleanly, pending as a letter on the icon
The PENDING pill beside a title broke long names over several lines; a small
dot on the type icon's corner now carries the status's first letter (A for
Ausstehend, P for Pending), with the word as its tooltip and accessible name.
The time and the trip or place below the name are soft badges instead of a
line strung together with dots. Desktop and phone alike.
2026-11-15 12:22:05 +01:00
Maurice a1f063c703 fix(collections): the add-place search reads as one field and takes the focus
The search runs from a small button inside the field, dark once there is
something to look for, instead of a greyed-out button beside it, and the row
keeps its distance from the address box below. A dialog can now mark the field
it starts in, so this one opens in the search rather than in the name above it.
2026-11-15 12:11:43 +01:00
Maurice b65a1bb65c feat(collections): the map's padlock, and a picked place on the full map keeps the map
The collections map gets the trip map's padlock (#2010): locked, a click on a
place leaves the camera where it is, so places can be clicked through without
the map zooming in and out. One setting for both maps. On the full map a
picked place no longer brings the list back: its details dock on the map's
edge, or open as a sheet on a narrow screen.
2026-11-15 12:11:42 +01:00
Maurice d1cb0a418a feat(todo): the phone's task list takes the look of the packing list
The progress card says how many tasks are done with a slim bar, a round "+"
for a new task and a "..." for the order and the lists; the filters sit in
one tinted track, with "Mine" kept short there; and the tasks are rows of one
card, with priority and due date under the name and the assignee's face.
2026-11-15 12:11:40 +01:00
Maurice 5536d29cbf feat(packing): a calmer packing list, with every item's choices in one window
A row now shows its box, its name and only what is set: the amount from two
up, the pieces packed while packing, and who brings it. A click on the name
opens a small window at the row with the list, amount, pieces packed, weight,
bag, who brings it and who sees it, each as one pill, plus copy and delete,
instead of fields, a bin and menus in menus on every row. Above the lists the
Lists bar keeps Add list and gathers templates, import, export, the order,
hiding packed items, the bags on a narrow screen and the clean-up in one menu;
the progress moves next to the Shared/My list switch. The bag overview stays.

The phone follows the same shape: one "..." sheet for the list's actions, a
sheet per list for its own, a slim row and an item sheet that saves as you go.
Who may change what about an item lives in one module both views read.
2026-11-15 12:11:15 +01:00
Maurice 7bbb5a9f71 fix(packing): anyone on the trip can be put down as the bringer of a shared item, and taken off again (#3098)
A common item only let you pledge yourself. Nobody else could be named,
and a bringer could never be removed, so an item that went personal and back
kept its owner's avatar for good. The item menu now lists every member to
tick on or off, a click on the avatar opens it there, and the add route takes
an optional user_id limited to the trip's members. Taking the owner off
clears the owner. The remove route now checks visibility for the caller, not
for the user named in the path.
2026-11-15 11:00:21 +01:00
Maurice a1bf57b71a feat(planner): planner panels widen as far as the window allows and follow the drag without lag
The side panels stopped at a fixed 520 px, which left a wide screen with a
narrow day plan. Each panel may now take whatever the window leaves once the
map keeps at least 35% of it (never under 360 px), the day plan keeping its
width first when the window shrinks. While a handle is held the width
transition is off, so the panel no longer trails behind the map and its
buttons.
2026-11-15 11:00:11 +01:00
Maurice 87bcb5a519 fix(native): an entry field pushed under the open keyboard by a new row comes back above it
The packing list keeps its entry field open after Enter, and each added item
lands above it. With the keyboard already up no keyboard event fires, so the
field slid under the keyboard after the first entry. While the keyboard is up,
a change to the page now checks the focused field again, once a frame at most.
2026-11-14 23:29:33 +01:00
Maurice bac4599d64 fix(roadtrip): keep the stay on each visit, not on the place (#3092)
A nullable day_assignments.stay_minutes holds the stay of one visit; a visit without one keeps reading the place's duration, so existing trips drive as before. REST PUT /trips/:tripId/assignments/:id/stay and the MCP tool set_assignment_stay write it with day_edit.
2026-11-14 17:48:57 +01:00
Maurice 535761dbd5 fix(journey): draw lines across the antimeridian the short way on the Journey map (#3080) 2026-11-14 17:48:57 +01:00
Maurice 5be521199f fix(share): wrap a note's detail line and long words on a shared trip link (#3082) 2026-11-14 17:48:56 +01:00
Maurice d6905435ae refactor(mobile): move the trip shell's tab switch into a hook of its own, under the size limit 2026-11-14 17:48:56 +01:00
Luffy 6bcc49fc6f fix(notifications): link admin emails to admin notification settings 2026-11-14 16:49:32 +01:00
Maurice 64847e906e fix(vacay): keep the last weekend day selected and restore the weekend days label 2026-11-14 16:49:31 +01:00
Luffy 75d458b06b fix(vacay): correct weekend toggling and remove redundant labels 2026-11-14 16:49:31 +01:00
Maurice a76a96ccca fix(notifications): drop a tab the planner lacks from the URL, link booking mails to the reservations tab, open the chat on the phone 2026-11-14 16:49:20 +01:00
Maurice bfdbf4d811 fix(notifications): format the tests, move the open-planner tab test into its own file, lower the exhaustive-deps baseline 2026-11-14 16:49:20 +01:00
Luffy b068e593fc fix(notifications): update navigation targets for trip and vacay events 2026-11-14 16:49:19 +01:00
Maurice d3ec833ab7 refactor(client): keep the login page's language corner class in a module of its own 2026-11-14 16:45:02 +01:00
Maurice 2bcef51664 fix(native): the login page's language menu stands beside a Duo's status capsule 2026-11-14 16:33:05 +01:00
Maurice 0f42b8b8ae fix(mobile): put the top bar beside a Duo's status capsule and the page below it, full width
Keeping the whole right inset clear gave up a strip of the full height for a
capsule that only sits in the corner. The iOS app now measures an element in
a top corner (iOS 26 safe area with corner adaptation, vertical against
horizontal) and hands its reach and width to the page: the floating bars
stand beside it, the page keeps the full width and starts below it. Without
such an element, on every other device and before iOS 26, nothing changes.
2026-11-14 16:30:58 +01:00