"Add manually" did not fit beside "Search" and rendered as "Add manu…", which is neither the label nor a shape anybody recognises. The button face now carries one short word, with the full sentence kept as its accessible name and its tooltip, so nothing is lost to a reader or a pointer. Every locale got its own short form rather than a clipped version of the long one: Selbst, A mano, Ručně, Elle, 手動. Below two hundred pixels the row drops both words instead of shortening them, and the two actions are their icons. The width is the row's own, measured, not the window's: this column is resizable, so it can be narrow on a wide screen and a media query would answer the wrong question. The search button also stops restating the progress. Its label used to grow into "Searching 3 of 12" while a run was on, which is the longest string in the panel and the very sentence the progress row directly underneath already prints next to the share as a figure. It keeps its word, disabled, with the spinner in front of it.
@trek/shared
Single source of truth for TREK's API contracts, expressed as Zod schemas and consumed by both the server (request validation + inferred DTO types) and the client (typed requests/responses).
This package is part of the incremental NestJS + React 19 migration (see the "Brownfield Rewrite" board). It is intentionally dormant until modules start importing it — adding it changes nothing for users.
Rules
- One folder per domain:
src/<domain>/<domain>.schema.ts(+.spec.ts). - Domain-agnostic building blocks live in
src/common/. - A route is only considered migrated once its contract lives here.
- Schemas are the source of truth; server DTOs and client types are inferred from them
(
z.infer<typeof schema>), never hand-duplicated.
Consumption (dev)
Both apps resolve @trek/shared to this package's TypeScript source:
- Server (
tsx): viapathsinserver/tsconfig.json. - Client (
vite): viaresolve.aliasinclient/vite.config.ts(+pathsfor the type-checker).
Production packaging (Docker / workspace wiring) is introduced in card F2, when the server first depends on this package at runtime. Until then prod builds are untouched.
Not yet here
The canonical error envelope is finalised in card F5 (it must match TREK's current Express error responses byte-for-byte), so it is deliberately not invented in F1.