Commit Graph

5803 Commits

Author SHA1 Message Date
Maurice 9ea489ac97 feat(mobile): move a stop to another day from its day in the place sheet
On the phone a stop could only be removed from a day and added to another,
which lost its time and notes. A tap on the day in the place sheet now opens
the same short day list as adding, headed 'Move to another day', and moves
the stop there through the planner's move, so its time, notes and road trip
waypoints come along and a timed stop lands where its time belongs. No new
control in the plan's rows.

Addresses discussion #2583.
2026-11-27 23:23:59 +01:00
Maurice 17c56326e9 feat(mobile): fold transports and bookings that are over into a Past section
Mid-trip the transports and bookings tabs kept every flight already landed
and every check-in already done above what is still ahead. What is over (its
end, or its start where it has none, before the moment the tab opened, in
local wall-clock time) now stands in a Past section at the end, latest first.
It starts folded while something is still ahead and open once the whole trip
is over, to look back on. The desktop list is unchanged.

Addresses discussion #3156.
2026-11-27 23:23:59 +01:00
Maurice f3bdcf7ffb feat(mobile): open directions from a place's address and a booking's location
On the road the address is what the eye lands on. A tap on it in the place
sheet now does what the navigation button does (the preferred map app, or
the choice of apps), and the location row of a booking card opens
directions to it the same way, marked by a small arrow. The rest of the
booking card still opens the booking.

Addresses discussion #3213.
2026-11-27 23:23:59 +01:00
Maurice e7b900d309 fix(journey): open photos and videos full screen below the status bar, with the close button in reach
On a phone the journey's photo viewer opened inside the screen's own box
instead of over the whole screen, and its top bar, close button included, sat
under the status bar and a notch. It is now portalled to the page, its top
bar is a row of its own below the device's insets, the photo or video fills
what is left, and the page behind it no longer scrolls. The trip files
viewer, which shows videos too, keeps its header below the insets as well
and gets the same larger close button.
2026-11-27 23:23:58 +01:00
Maurice ffd9338217 fix(ci): give the Sonar upload five minutes instead of one
The release pull request's analysis report zips to about 77 MB, and the
scanner gave up on its upload to SonarCloud after the default 60 second
socket timeout three runs in a row (HttpTimeoutException on ce/submit), so
the scan never reached a quality gate.
2026-11-27 22:41:52 +01:00
Maurice 2186d8b230 test(oidc): narrow the logout token check with in, as the server compiles without strictNullChecks 2026-11-27 22:30:03 +01:00
Maurice 06aaddc34d feat(oidc): end TREK sessions when the identity provider signs a user out
OpenID Connect Back-Channel Logout 1.0: the provider calls
POST /api/auth/oidc/backchannel-logout with a logout token when a user signs
out there or an admin ends their session, and TREK ends the matching
sessions. Until now a session lived on for up to 30 days after access was
taken away at the provider.

- The token is checked as section 2.6 asks, through the verifier the login
  uses for the id_token (provider JWKS, issuer incl. a custom discovery URL,
  client id in aud), plus a recent iat, the logout event, a sub or sid, no
  nonce, an accepted typ and a jti not seen before (in-memory, bounded replay
  store; a jti whose sessions failed to end is released for the retry).
- The id_token's sid is stored on the session the SSO sign-in creates
  (nullable user_sessions.oidc_sid, both engines), and an app session handed
  off from that browser sign-in carries it too. A token with a sid ends those
  sessions only; a token with only a sub ends every session of the account.
- A valid token answers 200 with no-store also when it names nobody here; an
  invalid one 400 invalid_request, never 500, with the reason only in the
  server log. Public route with its allow-list entry, rate limited, audited
  as oidc.backchannel_logout.
- Always active: nothing changes until an admin enters the URL at the
  provider. Wiki: the URL, where it goes in Authentik, Keycloak and Pocket ID,
  and Keycloak's single token when an admin signs a user out.

Addresses discussion #3124.
2026-11-27 22:24:21 +01:00
Maurice 6f669920f1 test(realtime): wait for socket frames without awaiting in a loop
The room revocation suite polled for frames and joined its sockets one by
one, which the server lint counts as await in a loop against the tests'
baseline. It now waits on the frames as they arrive and joins in parallel.
2026-11-27 22:08:01 +01:00
Maurice 1fb20a542c fix(realtime): end a socket with its session and after a database swap
An open WebSocket outlived what it was opened with. Ending a user's
sessions (a password change or reset, an admin password change or MFA
reset, signing out other devices, a single session revoked) left their
sockets in every room and on their user channel, so a stolen session kept
listening. A backup restore or the demo reset put another database in place
while every socket stayed in its rooms, and on SQLite a restored id can
name another trip.

Ending a session now closes the user's sockets, and every reopen of the
database closes all of them; a client whose session still holds connects
again and joins what it may. A join asks once more from inside the room,
so a removal that committed while its first answer was on the way cannot
leave it behind. The trip recheck always names its trip, and its checks
are covered branch by branch.
2026-11-27 22:08:01 +01:00
Maurice d8be9a40e7 fix(realtime): take a socket out of a room once its access ends
A socket was let into a trip room or a journey's book room with one access
check and then trusted: delivery went by room membership alone. So a member
removed from a trip kept receiving every broadcast of it on the socket they
had already joined, a contributor taken off a journey kept the book's
pointers and presence and could still send pointers, and a deleted account's
sockets stayed in every room.

The gateway now installs the checks its joins run, and every write that ends
access asks the sockets already in again once it is committed and its own
event went out: a member removed or leaving (REST, MCP and plugin RPC), a
trip deleted, a contributor removed, a journey deleted, a trip's journal
link replaced, narrowed or removed. Open books are asked again with every
trip change, since a book can be open through a trip's journal. A socket
that no longer passes leaves the room, and a book that loses somebody tells
the others. A deleted account's sockets are closed. An answer that cannot be
had counts as no access.
2026-11-27 22:08:01 +01:00
Maurice 512584b4f1 fix(native): catch the status bar style call where the app has no status bar plugin
An unanswered rejection from StatusBar.setStyle surfaced in the sign-in
screen's tests, where the web build has no such plugin. Unimplemented is no
failure; anything else is reported as the other native calls are.
2026-11-27 21:48:56 +01:00
Maurice 985998e757 test(login): submit the app sign-in form with its required fields filled 2026-11-27 21:42:57 +01:00
Maurice 742c0dd72d fix(login): keep the app sign-in screen within the eslint ratchets
Split the other ways in out of one component (complexity), finish the async
handlers with void instead of handing promises to React, report a landscape
that fails to load instead of logging it, let the handover wait on settled
settings rather than catching them, and move the one-time code field's props
into a module of their own so MfaCodeStep only exports its component.
2026-11-27 21:42:56 +01:00
Maurice efd34df038 fix(login): name the SSO button SSO when the provider has no display name, as OIDC-only does 2026-11-27 21:42:56 +01:00
Maurice 321980c95b test(login): build the sign-in page's own config shape in the app screen tests 2026-11-27 21:42:56 +01:00
Maurice d4595269b5 refactor(login): both sign-in screens take their headings and labels from loginModel
LoginPage grew past its size baseline with the app's branch. Its heading,
subtitle and submit label chains now come from loginModel, which the app's
screen already used, so the file shrinks by 21 lines and the baseline follows.
The model translates the keys itself, written out, so the i18n key check
keeps seeing them.
2026-11-27 21:42:55 +01:00
Maurice 32de7adbf6 feat(native): app sign-in screen that continues the address screen
Inside the iOS and Android app the sign-in page looked like the web form it
is in a browser: a white card on grey, the web header and a language menu,
reached through a white page, a grey spinner and another white page, and left
through the 2.6 s takeoff animation.

- AppLogin: the address screen's landscape with the connected server on its
  glass card (Change leads back to the address screen), and its fields,
  buttons and type on the same warm page. Same useLogin hook, so password,
  remember me, forgot password, SSO, OIDC-only, passkey, demo, MFA, password
  change, registration and invites all stay as they are.
- The app speaks the device language with English as the fallback; no
  language menu there.
- Handover: theme-boot.js marks a page inside the app that nobody signed in
  to yet, which then starts on the address screen's colour, waits with its
  spinner, and fades the sign-in screen in. After signing in the screen steps
  back while the settings load and the app rises in, instead of the takeoff.
- Android: the WebView and window keep the address screen's colour across the
  restart onto the server, and the status bar icons stay readable where an
  older WebView lays the page out below the bar (shell and sign-in).
- loginModel holds the headings, button labels and SSO links both sign-in
  screens share.

The browser's sign-in page is unchanged.
2026-11-27 21:42:39 +01:00
Maurice fef7ac4587 fix(map): set the trip overview aside for the visit instead of switching it off
Making room for the day details went through the overview's remembered
switch, which the account keeps per trip and syncs to every device. A day
sheet on the phone, or two cards that did not fit on a narrow window, turned
the overview off everywhere without the traveller touching the pill.

The overview is now set aside for this visit only: the remembered switch
stays as it was, the pill shows it off and brings it back with one tap, and
a reload shows it again. The route overview hook keeps its declared return
type with the new hasPlannedRoute flag.
2026-11-27 21:07:07 +01:00
Luffy 7a57c58dd0 fix(map): prevent trip overview and day details from overlapping 2026-11-27 21:07:07 +01:00
Maurice 3dd63331bc fix(tours): format the dropdown changes and lower the hook ref baseline
The editor dropdown change drops the options ref useAnchoredPosition kept
for its measure callback, so the react-hooks/refs count falls by one and
the baseline follows it. The new and touched files are formatted, and the
new rail test gets its id like the rest of the file.
2026-11-27 20:51:46 +01:00
Luffy 20c8457f18 fix(tours): keep editor dropdowns inside the sidebar 2026-11-27 20:51:46 +01:00
Maurice eaef3c014e test(pdf): read the export's note cards without non-null assertions
The markdown test for the day notes reached its cards with three non-null
assertions, which the client lint counts against the tests' baseline. A
small lookup that fails with the missing selector reads them instead.
2026-11-27 20:35:01 +01:00
Maurice f02c0e088b fix(journey): keep the journal shown when a reload after a change fails
The journal views read the journal again after their own changes (saved
settings, a finished entry, an added trip, picked provider photos) by
calling loadJourney and dropping the promise. loadJourney rethrows every
failure, so a reload that failed, offline or timed out, became an unhandled
rejection with nothing shown to the user. In CI the same happened whenever a
test ended with such a read still open: the teardown runs the pending timers,
the request timeout fired, and the run failed on the unhandled error.

The store gets refreshJourney, which reads the journal and answers whether
the read landed instead of rejecting; a 404 still turns into notFound. The
shared journal hook hands it to the desktop and the phone view and to the
map layers in place of the raw loader, and the Studio uses it for its own
reads.
2026-11-27 20:27:29 +01:00
Maurice 2915ea573a fix(bookings): say what happens to an imported booking's cost on save
Reviewing an imported booking that carries a price shows the cost that
the save will link. Under it the dialog printed the create button's hint,
"Saves the booking, then opens the Costs editor", but this row is no
button: saving an imported booking adds the cost by itself, as the import
always has, and opens no editor. Following the hint, people waited for an
editor that never came.

The preview row now says the cost is added to Costs when the booking is
saved, in every language. The create button keeps its own hint.

Closes #3237
2026-11-27 20:13:31 +01:00
Maurice 407de33560 fix(booking-import): import a booking the document calls confirmed as confirmed
The mail import already wrote a booking as confirmed when its metadata held
reservationStatus, but nothing ever filled that field: the KItinerary mapper
dropped schema.org's reservationStatus, the AI reading was neither asked
for it nor given it in its response schema (a schema-bound provider fills
declared properties only), and the review form, the file import confirm
path and the assistant's import card all started every booking as pending.

The mapper now reads reservationStatus from every node, schema.org URL,
bare ReservationConfirmed or a plain word alike, and keeps it in the
item's metadata as TREK's word. The AI prompt and response schema ask for
it. One shared helper turns it into the status a booking is saved with:
confirmed when the document said so, pending otherwise, so a cancellation
or an unknown value still lands as pending. The review form prefill, the
mail import, the confirm path and the assistant card all use it.

Closes #3238
2026-11-27 20:08:19 +01:00
Maurice addcbe4801 fix(pdf): render markdown in day notes, booking notes and the day intro
The planner renders a day note's second line and a booking's notes as
markdown, and place texts in the PDF already went through the app's
sanitized markdown pipeline (#2692). Day notes, booking notes and the day
intro were still printed through escHtml, so the export showed the raw
syntax (asterisks, list dashes, rules) instead of the formatting.

They now use the same sanitized pipeline as bare markup inside their own
card, without the info row a place text gets, and drop the pre-line
whitespace that would double every markdown line break. Raw HTML in a
note is still printed as text.

Closes #3236
2026-11-27 19:58:00 +01:00
Maurice a9fd443b63 feat(db): present a Postgres client certificate from sslcert and sslkey in TREK_DB_URL
A Postgres server that authenticates clients by certificate could not be
used: TREK read only sslmode and sslrootcert from TREK_DB_URL, so neither
the connection pool nor pg_dump, pg_restore and psql ever offered a client
certificate (discussion #3215).

TREK_DB_URL now also takes libpq's sslcert and sslkey. Both must be given
together and only with a verifying sslmode, and each file must be readable,
or the boot refuses with the same kind of message as for sslrootcert. The
pool gets them as its TLS cert and key, the tools as PGSSLCERT and
PGSSLKEY. The Postgres wiki page shows the URL, how to mount the files with
Compose or the chart's extraVolumes, and libpq's rule for the key file's
permissions, which the backup tools enforce.
2026-11-26 23:35:18 +01:00
Maurice b8dffdbb13 fix(files): serve the stored offline copy when a live download stalls
Opening a document that was stored for offline use fetched it from the
server first and only fell back to the stored copy when the request
rejected. On a weak or stalled connection the request never rejects, so a
boarding pass already on the phone could spin indefinitely.

With a stored copy, the live download now gets five seconds, request and
body together; after that the stored copy is served and the download is
aborted. A connection that breaks while the body arrives serves the copy as
well. An HTTP error that comes back in time still surfaces over the copy,
and without a stored copy the download waits as long as it always did. The
test file is now formatted and leaves the format baseline.
2026-11-26 23:35:18 +01:00
Maurice 3b42ffa67b feat(helm): render extra Kubernetes objects from an extraObjects list
The chart had no way to ship objects of the operator's own next to TREK, so
a backup CronJob, a ConfigMap for it or any other helper had to live in a
second release or be applied by hand (discussion #3194). extraObjects takes
a list, empty by default so nothing renders, and renders each item through
tpl: a map as YAML, a string as written, so names such as
{{ .Release.Name }} resolve in both forms.

The values comment, the chart README and the Helm wiki page say that braces
are evaluated in both forms, that a backup job must mount the data volume
read only, and that it should copy TREK's own backup archives rather than
the live travel.db. Those archives carry the encryption key unless
ENCRYPTION_KEY comes from the environment, so their destination needs the
same protection as the volume. CI renders a variant with a CronJob in the
map form and a ConfigMap in the string form, checks it with kubeconform
-strict, and fails when a {{ is left unrendered.
2026-11-26 23:35:18 +01:00
Maurice 2ea1c99e31 ci(native): publish the Play-signed Android APK to liketrek/trek-android for installs outside Google Play
People who install apps from GitHub (Obtainium and the like) asked for the
Android app outside Google Play. After the Play upload, the release job now
fetches the universal APK Google Play builds of that same bundle, signed
with the Play app signing key, and publishes it with a checksum to
liketrek/trek-android: one release per app version, a newer build of the
same version replacing its APK. A phone can move between the Play install
and this APK without uninstalling, and Play Billing and push work in it
wherever Google Play services do.

It runs only inside the app builds that already happen, so a server release
without app changes publishes nothing. A build is held back while the app
needs a newer native API than the latest server release answers, so no APK
asks for a server that is not out yet. The APKs live in their own repository
so app releases never show up in the server's release list or update check.
2026-11-26 23:12:27 +01:00
Maurice d383d3527b fix(oauth): bind an authorization code to the session that consented, not to the password version
Reading the password version from the oauth domain meant injecting the
users repository, which the auth domain owns. The sessions domain answers
the same question and more: a password reset or change ends every session
of the user, and a sign-out ends the one that consented. The code now
carries that session's id and both token endpoints issue tokens for it
only while the session is active, checked in the transaction that writes
them. A token from before sessions were tracked has no session to check
and passes, as it does everywhere until it expires. A refused code is
audited as session_ended.
2026-11-26 22:46:15 +01:00
Maurice 05843c8e5b test(oauth): give the pending-code fixture its password version and format the controller test 2026-11-26 22:32:44 +01:00
Maurice 19270adef8 test(oauth): read the granted code without non-null assertions 2026-11-26 22:26:58 +01:00
Maurice f9ab280b7e fix(oauth): an authorization code mints tokens only while the password it was granted under holds
The consent page mints a two-minute authorization code from the cookie
session. A password reset or change revokes the user's OAuth tokens but
left such a pending code alone, so a code granted before the reset still
redeemed afterwards into a fresh token pair at either token endpoint.

The code now carries the password version of the session that consented,
and both token endpoints issue tokens for it only while that version is
still the account's, checked in the transaction that writes the tokens.
A refused code answers invalid_grant as any other and is audited as
password_changed.
2026-11-26 22:21:46 +01:00
Maurice c88d3abc5e fix(auth): a native app hand-off code redeems only while the session that minted it stands
The browser side of the native sign-in mints a one-time code from its
cookie session, and the app redeems it within a minute for a session of
its own. The code was bound to the account alone, so one minted before a
password reset, a sign-out or a revoked session still redeemed afterwards
into a fresh session, carrying access across the point where the account
took it back.

The code now carries the session it came from: its password version and,
for a tracked session, its id. Redeeming it mints a session only while the
password is unchanged and that session is still active, checked in the
same transaction that mints the new one.
2026-11-26 22:14:12 +01:00
Maurice 10d95a39ac fix(map): open a day the routing relay could not answer drawn, without waiting for it again
On an instance that routes its days with Valhalla (the TREK services by
default), a day the relay could not answer in time was drawn by OSRM and
kept only under the OSRM key. The next visit missed the Valhalla key, asked
the relay again and waited out its deadline, up to twelve seconds a day,
before the kept road showed, so every reload showed straight lines first.

OSRM's answer now stands in for such a day for an hour under a key of its
own, on the device only. Reopening the trip draws it at once; after the
hour the relay is asked again and its answer becomes the day's. Days that
avoid something keep asking Valhalla, since the stand-in drives the road
they mean to leave out.

Closes #3228
2026-11-26 22:09:59 +01:00
Maurice 7d802081ce test(assistant): replay the changed requests side by side in ANTH-010 2026-11-26 20:04:40 +01:00
Maurice 7586126797 fix(assistant): send Anthropic's thinking back only where the conversation before it is unchanged
Follow-up messages failed with HTTP 400 on Anthropic once a thread held an
answer that thought: the API binds each thinking block to everything the
request sends before it and refuses the request when any of that changed.
It changes in normal use: a tool group loaded later in the turn, an earlier
tool answer cut short once a new question follows, a held change applied
since, a trip card that moved on.

Each recorded step now keeps a fingerprint of what its request sent before
it (model, system blocks, tools, history). On replay its thinking blocks go
back only while that fingerprint still matches; otherwise the step goes back
without them, which the API accepts. Records written before this change
carry no fingerprint and go back without their thinking.

A refusal from Anthropic is now logged with the path its message names
(such as messages.1.content.0), without the rest of the message.

Closes #3094
2026-11-26 20:00:00 +01:00
Maurice 9fa2bef101 test(journey): keep the journey page suite's journal and handlers in its helper
The suite carried its sample journal and the journal's default handlers inline, and waiting for the reload in FE-PAGE-JOURNEYDETAIL-153 took it past its size limit. Both move to tests/helpers/journeyDetail.ts beside seedJourneyOwner; the file is 142 lines shorter and its size baseline follows.
2026-11-26 14:21:04 +01:00
Maurice ed1bba9371 test(client): finish moving the tests to msw 3
Two more window.location stand-ins sat on http://localhost while the
page runs on http://localhost:3000; they now use locationAt like the
rest, which brings back the plugin settings answer FE-COMP-
PLUGINSETTINGS-020 waits for. FE-PAGE-JOURNEYDETAIL-153 ended while the
journal reload it set off was still out, which timed out after the
test; it now waits for that read. The reload mocks in
versionHandover.test.ts carry the signatures of location.replace and
location.reload, as locationAt's overrides require.
2026-11-26 14:03:46 +01:00
Maurice 3c1cf8b347 chore(server): lower the strict baseline of the repository base class
MikroORM 7.2.12's typings leave trek-repository.ts with 4 strict errors instead of 8; the ratchet holds it there.
2026-11-26 14:03:46 +01:00
Maurice 1ed77870f9 test(db): see the unnamed temp files SQLite 3.54 opens on Linux
SQLite 3.54, which better-sqlite3 13.2.0 bundles, opens its temp files
with O_TMPFILE where the system has it. On Linux such a file has no
name: among the process's descriptors it reads <dir>/#<inode> (deleted)
instead of etilqs_<random>. The watcher only looked for the name, so
the control test saw nothing, and the test that TREK's own connection
never touches a temp file would have passed whatever happened. The
watcher now knows both forms; the control proves again that it sees
them.
2026-11-26 14:03:46 +01:00
Maurice 22ee4dbac7 ci(dependabot): let MikroORM and msw move again
Both are on their new versions now: MikroORM 7.2.12 with the OAuth
repositories writing the client the way it accepts, and the client tests
on msw 3. Their ignore entries go. better-sqlite3 and kysely, which
@mikro-orm/sqlite pins exactly, join the MikroORM group instead of being
ignored, so the three move in one pull request. cron and the musl rollup
pins stay held back for their own reasons.
2026-11-26 13:41:29 +01:00
Maurice 6926591112 fix(admin): a default setting reset right after typing is the value that stays
Typing a new Mapbox token or CARTO key and clicking that field's reset
link straight away sent two requests at once: the field's save on blur,
then the reset. Nothing ordered them, so when the server handled the
save last, the key typed a moment ago was stored again while the field
showed it cleared, on the desktop tab and on the phone screen alike.

The hook both shells share now sends its writes one after another, in
the order they were made (useWritesInOrder; a write that fails does not
hold up the next). FE-ADMIN-DUS-032 types, clicks reset at once and
makes the save the slower request; it fails without the order.
FE-HOOK-WRITES-001 to 003 cover the helper.
2026-11-26 13:41:28 +01:00
Maurice 66382e791b fix(admin): keep the dev notification buttons mounted while the panel updates
The desktop panel declared its button component inside its render, so
every state change (each lookup landing, each send starting and ending)
made a new component type and React remounted every button: focus and
hover were lost, and a click that arrived during a re-render went to a
button that was no longer there. Btn now lives at module level and takes
the send in flight as a prop, as the phone panel's Btn already does.
FE-ADMIN-DEVNOTIF-017 holds a button across the lookups landing and
expects the same element; it fails with the old panel.
2026-11-26 13:41:28 +01:00
Maurice 32837afe2e chore(deps-dev): bump msw from 2.15.0 to 3.0.8 and move the client tests to it
msw 3 renames onUnhandledRequest to onUnhandledFrame and reports every
network frame there; the setup judges the HTTP frames as before (another
origin is an error, the page's own a warning).

It also resolves a relative handler, and its fetch interceptor a
relative URL, against location.href at the time of the request, while
jsdom's XHR sends to the document's own address. Tests that replaced
window.location with a stand-in on http://localhost while the page runs
on http://localhost:3000 sent their requests past every handler.
tests/helpers/location.ts builds such stand-ins on the page's own origin
(locationAt, pageUrl), and every one of them now uses it.

msw no longer escapes fake timers, and responses are timed differently,
which surfaced tests that ended with work still running: a held request
answering in the next test, a lookup still out when the assertions ran,
a reload switched by counting reads. Each of those now waits for, or
releases, what it started, and answers by what happened rather than by
a count.

The day panel suites share their setup through
tests/helpers/dayDetailPanel.ts instead of a copy each, which keeps the
larger one under its size limit.
2026-11-26 13:15:45 +01:00
Maurice 05f4c84885 test(reservations): cover the traveller insert that ignores existing rows
ReservationTravelers.insertIgnore had no test of its own. MikroORM 7.2.10 changed how upsertMany with a composite conflict key matches rows read back after a conflict, which is exactly the case of a traveller already on the booking next to a new one in one call. RS9-001 to RS9-004 pin that case, a duplicate id, another booking's row and an empty list; the first two fail with a plain insert.
2026-11-26 12:57:32 +01:00
Maurice 6905729ab6 chore(deps): bump MikroORM from 7.2.8 to 7.2.12 with better-sqlite3 13.2.0 and kysely 0.29.9
From 7.2.9 on, MikroORM reads a bare value given for a relation as the
target's primary key. The client relation of oauth_tokens and
oauth_consents points at oauth_clients.client_id, a unique column that
is not the primary key, so every token mint and every consent grant was
refused ("Cannot set OauthTokens.client to a reference of OauthClients
without the value of OauthClients.client_id"): every OAuth and MCP
sign-in would have failed.

insertToken now hands the referenced column itself to the relation
(oauthClientRef), which MikroORM writes to client_id as it is.
upsertGrant writes the row with Kysely's onConflict on
UNIQUE(client_id, user_id), because em.upsert takes that same value as
the data of a new OauthClients entity. The test fixtures that seed
tokens and consents use the same helper. Reading client_id back is
unchanged; the repository tests seed clients whose primary key differs
from their client_id, one of them a decoy whose primary key equals
another client's client_id.

The lockfile resolves the MikroORM tree from scratch, so there is one
@mikro-orm/core again instead of a second copy next to @mikro-orm/nestjs.
better-sqlite3 13.2.0 ships prebuilt binaries for every platform the
image builds, musl included.
2026-11-26 12:39:43 +01:00
Maurice 85aa1c91ff test(booking-import): check the upload limits the route sets, not Nest's whole set
NestJS 11.2.12 adds its default parts limit to every multer interceptor, so the options hold one more key than the route names.
2026-11-26 11:26:35 +01:00
Maurice de9901d941 refactor(files): drop the drop zone's noClick option, which is its default
Keeps useFileManager within the function length limit now that it names noPaste; react-dropzone's noClick defaults to false, so a click still opens the picker.
2026-11-26 11:26:35 +01:00