fix(shared,tests): bound the book contract and close the gaps that hid all this

Book page setup and element geometry were unbounded numbers, so a shared
book could be saved with zero, negative or astronomical dimensions and every
consumer downstream - the canvas, the PDF export - had to cope. Day-note caps
had drifted from the limits their own doc comment states, and icon had none.

On the test side: the path filter meant a PR touching only the root lockfile
ran no jobs at all, which is exactly the change class most likely to break a
native binding; the canAccessTrip mock is hand-copied into 72 files and had
already drifted from the real query; the path-traversal test asserted only
status !== 200, so a 500 from a broken guard passed it; and one unit test
shelled out to a real kitinerary binary if the host happened to have one.
This commit is contained in:
Maurice
2026-08-23 09:48:23 +02:00
committed by Maurice
parent a7aaa29c16
commit eadb3703bc
11 changed files with 149 additions and 26 deletions
+1 -1
View File
@@ -352,7 +352,7 @@ export const TREK_WS_EVENTS = {
},
} as const satisfies Record<string, TrekWsEventContract>;
/** Every registered event name (65 trip-scoped + 29 user-scoped). */
/** Every registered event name. The registry above is the count; this derives from it. */
export type TrekWsEventName = keyof typeof TREK_WS_EVENTS;
/** Names broadcast to a trip room (`{ type, tripId, ...payload }` envelope). */