Commit Graph

5309 Commits

Author SHA1 Message Date
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 c72c8dcaf7 fix(plugins): hand a visit's stay_minutes to plugins in the assignment output contract (#3092) 2026-11-14 18:03:20 +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 f71acb08bd fix(assistant): send the earlier answer back to the provider in the shape it saw it (#3094)
Follow-up messages failed with HTTP 400: a whitespace-only text block, two model messages in a row where the turn had pushed for an answer, or a tool call renamed after its provider state was recorded. The rebuilt history now matches what the provider saw during the first answer.
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 ba562c9047 fix(tests): ensure email channel is registered before sending notifications 2026-11-14 16:49:32 +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 5e97123bdf chore(deps): raise the hono floor to 4.13.18 for its validator and routing security fixes 2026-11-14 16:37:28 +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
Maurice c67c95201b style(test): format the safe-area chrome tests 2026-11-14 16:25:43 +01:00
Maurice e6f35158c5 fix(mobile): keep the page clear of a Duo's status capsule and leave a scrolled column's pull to it
TestFlight feedback from an iPhone Duo:

- Folded, the status capsule stands in the right inset and ran over the hero
  card's actions; the page now keeps clear of the side insets as iOS asks
  (.m-page), and a floating bar keeps a little air next to an inset.
- Unfolded, the top bar ignored the trailing inset and the capsule sat on the
  avatar; on a wide window the bars now end before it, by their box, so a
  bar that centres itself still does.
- Dragging the dashboard's second column back up refreshed the page: a pull
  that starts inside a box scrolled on its own now belongs to that box.
2026-11-14 16:19:44 +01:00
Maurice d541bfa838 test(mobile): the passkey confirm now closes with the user sheet it belongs to 2026-11-14 12:00:41 +01:00
Maurice ef5deada83 fix(android): write the session cookie down when the app leaves the screen
The web view flushes new cookies about half a minute after a sign-in; an
app Android ended in that time lost the sign-in it just had.
2026-11-14 11:50:51 +01:00
Maurice e1090d5427 chore(client): lower the complexity and function-length baselines the settings refactor shrank 2026-11-14 11:48:03 +01:00
Maurice 335dd9c788 fix(android): reach Capacitor's package-private injector by reflection for the offline copy 2026-11-14 11:36:47 +01:00
Maurice c23518dae0 fix(native): start without the server on Android and keep the offline start on iOS
A tester with a server on his home network could not open the Android app
away from it: after closing the app and turning Wi-Fi off it stayed on the
address screen ("No server answered at this address").

- Android keeps the server's UI itself (TrekOfflineShell): the start page
  and every file of the build, listed by native/offlineShell.ts from the
  server's manifest and downloaded natively. A web view runs no service
  worker on a plain-http server, the usual address of a server at home, so
  the old "Android has the service worker" assumption did not hold.
- Without a network, or once the server failed to load twice, the web view
  serves the copy under the server's origin with Capacitor's bridge; the UI
  runs on its own offline data and the API answers again once the server
  is back. The address screen opens the copy too (openOfflineCopy).
- The check an update asks for no longer locks the app out offline: on both
  platforms a server out of reach is put back on its copy and checked on
  the next launch that reaches it. iOS no longer throws its copy away when
  the update check runs.
2026-11-14 11:34:28 +01:00
Maurice 91f8deb3f3 refactor(mobile): keep the settings views under the size and complexity limits
The user sheet's actions on another account (passkeys, two-factor, SSO
link, delete) are MUserDangerActions with their own confirms, the place
names picker is MPlaceLanguage, and useApiKeys takes its copied flag from
a small useCopiedFlag.
2026-11-14 11:34:28 +01:00
Maurice a40ae60abb feat(mobile): API keys in the phone's settings
- MApiKeysSection: the keys with what each may read, creating one in a sheet
  (name, the areas as chips, the key shown once with a copy button), deleting
  behind a confirm sheet, and the endpoint to copy.
- The list and every action move from ApiKeysSection into useApiKeys, shared
  by both views; the calls go through a small online-only apiKeysRepo, so no
  view reaches the API (offline baseline loses ApiKeysSection and
  AdminSettingsTab).
- The phone's Integrations tab is always there now, as on the desktop: the
  keys in it need no addon.
- A test title no longer breaks on its apostrophe.
2026-11-14 11:19:06 +01:00
Maurice 5caa890523 feat(mobile): notification defaults, SSO unlink, wanderer and place names on the phone
- Admin notifications: the defaults every user's cells start as, one row per
  event with a pill per channel cycling On, Off and Blocked
  (MAdminNotificationDefaults); the grid's constants are shared with the
  desktop panel in notificationDefaultsModel.
- Editing a user offers "Remove SSO link" behind a confirm sheet, as on the
  desktop, once SSO is set up and never for yourself.
- Settings: the wanderer connection (MWandererConnectionSection, on
  useWandererConnection) and the language of place names under General.
- MSetCard takes a brand mark as its icon, not only a lucide icon.
2026-11-14 11:14:09 +01:00
Maurice a3620f9e05 feat(mobile): the admin services section gets what the desktop tab has
- Place search and routing as one card, as on the desktop: TREK's own
  services, today's allowance with a new identity behind a confirm sheet
  (MAdminServiceQuota), sharing place details (MAdminPlaceContrib), the transit
  backend and the place search provider as TREK selects, and the search log.
- The key card holds Google (with its options and the daily request cap,
  MAdminGoogleDailyLimit), Unsplash and Amap, in the desktop order.
- The logic both views need moves into one place: the transit switch into
  useAdminSettingsActions, the allowance figures into serviceIdentityModel,
  and the share-place-details panel into usePlaceContribPanel.
- MAdminSettingsSection renders each section in a function of its own.
- Tests follow the split admin sections (Save order, 2FA label, field marker).
2026-11-14 11:09:22 +01:00
Maurice dbda2d7d7c chore(client): lower the size, theme and knip baselines the mobile settings pass shrank 2026-11-14 10:59:10 +01:00
Maurice b6a296ffea style(i18n): format the help strings the Mapbox change shortened 2026-11-14 10:52:36 +01:00
Maurice ae3dfa2eb7 feat(mobile): admin and settings sections ordered and trimmed like the desktop
- The phone's admin sections follow the desktop sidebar: the same groups
  (Users, Configuration, Maintenance) in its dropdown, Security and Services
  instead of one Settings section, and live flights and booking mails beside
  the addons they configure. An old ?tab=settings link still opens Security.
- Passkey login and the 2FA rule sit with the other ways in; the passkey card
  keeps the domain, and a managed install no longer shows the danger zone.
- MAdminSelect replaces every native select on the admin screens: TREK's own
  field or row pill that opens the picker sheet (permissions, backup schedule,
  invite trip, plugin settings).
- Explanations wait behind an info mark (MHintLabel), as on the desktop: admin
  rows and fields, the settings rows' new `hint`, addon and provider rows.
- Permissions are one line each with the level as a pill; addon rows lose the
  type badge their heading already names; settings buttons no longer wrap.
- "Require 2FA" in every language; admin.tabs.settings is unused and gone.
2026-11-14 10:49:09 +01:00
Maurice bab1ca9dca feat(settings): drop the experimental badge from Mapbox GL 2026-11-14 10:29:49 +01:00
Maurice e1e8c4c63d fix(flight-live): sort attribution sources with an explicit compare 2026-11-14 10:18:03 +01:00
Maurice 5f49c87f4a fix(admin): map the retired integration group for managed tabs
The settings redesign folded the integration sidebar group into config,
but ManagedAdminTab still accepts group 'integration'. Indexing the label
map with it was an implicit any under the strict check and would have put
such a tab under an empty heading. It now lands under config.
2026-11-13 23:30:35 +00:00
Maurice 01653f81e3 test(settings): follow the redesigned settings and admin pages
The tests now look for what the pages show after the redesign: the admin
Settings tab is Security and Services, MCP Access and User Defaults are MCP
and Defaults, notification channels and the 2FA rule are rows with a named
switch, hints sit behind the info mark, each addon type card counts its own
addons, OAuth scopes and the AI sharing note are shown in full, and the 2FA
disable password is the field beside the code. The phone's MCP admin header
keeps its own title, MCP Access. The mail pill test renders with
translations, so it finds From mail rather than the key.
2026-11-13 23:10:05 +00:00
Maurice a0764b9c96 fix(settings): the checks the settings redesign left red
The phone's MCP card still read the config fold state that the shared hook
no longer holds, so the client failed to typecheck. The phone keeps its
folded config, so it now holds that state itself.

SettingsColumns takes start and end instead of left and right: the prop
types counted as two physical sides for lint:rtl, and in a right-to-left
language the first column is the right one anyway.

Also: an unused icon import, seven files outside the format baseline run
through Prettier, Routing (de) and Services (fr) confirmed as the same word
as in English, and the size and warning baselines lowered to what the
redesign left (AdminPluginsPanel one wrapped line shorter, two promise
warnings, one long function and two non-null assertions in tests fewer).
2026-11-13 23:10:05 +00:00
Maurice 94ac7673a5 feat(settings): one look for every user and admin settings page
The settings pages had grown into a mix of styles: folds, dialogs behind
rows, full-width rows next to boxed ones, pills for every figure and buttons
in four sizes. Every page now uses the same kit.

- Cards keep their tinted head band; every part of a card is a rounded block
  with its own small head (SettingsBlock), and rows sit in rounded boxes.
- Nothing folds and nothing hides behind a dialog: the MCP config, OAuth
  scopes, mail how-to, AI privacy note and addon sub-options are all shown.
- Each page is split into two columns balanced by length (SettingsColumns).
- Long explanations moved into an info mark next to the label (HintMark).
- One button size everywhere (text-control); tab names are one word.
- Admin: the old Settings tab is split into Security and Services
  (?tab=settings still opens Security, and the phone keeps its single
  Settings section for both); the Integration group is gone, live flights
  and mail import sit next to the addons they configure.
- Addons: one card per type with rows, no search, filter or fold.
- Quota, TREK API facts, mail import status and Google's daily limit are
  compact lines and strips instead of tiles and pills.
- Language is a select; routing has its own card under the defaults;
  storage saves from the foot of its categories card.
- Unused keys, FoldSummary and the page-width wrapper are removed.
2026-11-13 23:18:28 +01:00
Maurice 5fe3dea4cc feat(settings): collapsible settings cards, first on the integrations tab
The settings pages list everything at once, so they read as a wall of
forms. SettingsCard and Section take 'collapsible': the card starts shut
and its badge says its state ('Connected', 'Not set up'); its title is the
button, stretched over the head, the head's action stays its own button.
The body stays mounted while shut. A link to #id opens the card and
scrolls to it; the browser remembers a card left open.

Every integrations card is collapsible now; AI parsing shows its saved
model and MCP the apps signed in. The assistant's settings link opens the
AI connection card. Tests that read into a card open it first
(tests/helpers/settingsCards.ts).
2026-11-13 21:57:20 +01:00
Maurice 608f76f32c feat(settings): two columns for the integrations tab
From xl up, as on the admin settings: what connects your trips with other
services (booking mails, photo servers, AirTrail, Dawarich, Wanderer) on
the left, AI and developer access (AI connection, AI parsing, API keys,
MCP) on the right. A column with nothing to show drops out and the other
takes the whole width.
2026-11-13 21:35:04 +01:00
Maurice a2cc7af695 fix(bookings): keep 'From mail' out of the card and list head
Behind the title stood the review mark, the 'From mail' pill and the two
actions, and the title was cut short. Where a booking came from is looked
up in its detail dialog, so the pill stays there only. The AirTrail note
sat above the mail pill; it is back above AirTrailPill.
2026-11-13 21:21:49 +01:00
Maurice dfbe23e5b8 fix: one status tile list for both admin cards; clear the copied timer on unmount
- The mail import's status tiles (which, labels, tones) were written out
  in the desktop and the mobile card alike; statTiles in the shared model
  holds them, each card keeps its own look.
- The journey share link set 'copied' back two seconds after a copy even
  when the dialog had closed, which also broke a client test run (window
  gone at teardown). useCopied, the trip share's hook, moves to hooks/ and
  serves both; it clears its timer on unmount.
- PlanLlmConfig is not exported: only the union is used outside.
2026-11-13 21:17:28 +01:00
Maurice 6ac7bd2d96 fix(mail-ingest): read a mail as soon as a transport takes it in
Only an upload started a processing run; a forwarded mail waited for the
next two-minute tick, and one that came in right after a run waited for two.
The IMAP and relay runs start one run once they took anything in, the
webhook once per mail it accepted.
2026-11-13 21:05:54 +01:00
Maurice a67361c6bd fix(mail-ingest): read on to To when a delivery header names no address
Stalwart writes Delivered-To as the mailbox itself, its sub-address dropped,
so a forwarded mail to trek+<token>@ was refused as unknown_address: the
first delivery header won even though it carried no token. The headers are
now read in their order of trust, and the first that names a live address
decides.
2026-11-13 20:57:55 +01:00
Maurice 7a40225852 feat(llm-parse): read bookings on a ChatGPT plan
A ChatGPT sign-in only ever ran the assistant: parsing's clients call an
endpoint with a key, and a plan has none. AI connections now lends the plan
as a reader. Each document is one Responses call with the schema as the one
tool the model has to call (tool_choice required). The token is read and
refreshed per call by ChatgptAuthService, and a sign-in that has to be
renewed lends nothing.

- ResolvedLlmConfig is a union: ApiLlmConfig (what an admin configures) or
  PlanLlmConfig (provider chatgpt, a read function, never stored).
- ConnectionReadClient sends the text plus photo or scanned pages, and reads
  the filled shape, or the shape written as text; prose is unreadable.
- AiChatClientService.chatgptPlan is the one place that builds the plan's
  client, for the assistant and for parsing.
- Wiki: a ChatGPT sign-in reads bookings on its plan.
2026-11-13 20:49:08 +01:00
Maurice 29816f81a9 fix(mail-ingest): send an uploaded .eml as multipart; publish the booking origin as a contract
- The upload posted its FormData through the client's JSON default, so the
  form went as JSON and the server saw no file (400). It goes through
  postMultipart now, like every other upload.
- reservation-origin.ts becomes reservation-origin.contract.ts: the booking
  import sets an origin, and a contract is what another domain may import.
- CI: the client's strict type check holds the whole program with strict
  checks and outgrew the default ~4 GB heap; it gets 8 GB like the server's.
2026-11-13 20:49:08 +01:00
Maurice 4337969c2c fix(mail-ingest): the settings card makes the person's own address on first look
The own address was made only when asked for, and the card had no way to ask
before one existed, so it showed none. Once a template is set and the
person's import is on, the first look provisions it (idempotent; read after).
2026-11-13 20:32:31 +01:00
Maurice 6789ee1cb6 refactor(server): keep the grown files at their size baselines; centre the inbox dialog
- auth.service: how an admin form value is stored (validated, encrypted, a
  masked echo kept) moves to the app settings registry as storedAdminValue
  and isMaskEcho.
- reservations.service: a booking's origin (withoutOrigin, originColumns)
  moves to reservation-origin.ts, its input shapes to reservation-inputs.ts,
  exported on from the service so importers stay as they were.
- Reservations.repository: the joined projection, the origin lookup and the
  origin columns move to _shared/, like the Wallet pass context before.
- test-sql: MailIngestApplyService.prepare is marked as no SQL statement.
- The pending bookings dialog opens centred, and says 'nothing waiting' once.
2026-11-13 20:28:17 +01:00
Maurice 7ed15a77b4 style(mail-ingest): a more compact admin status 2026-11-13 19:55:13 +01:00