Rows get the packing list's filled checkbox, priority, due date and list as quiet badges, and the assignee as an avatar with the name as its tooltip. The tasks sit in a card whose head names the filter and holds the sort, Priority or Due date, which moved out of the sidebar; a second click on the active one goes back to the manual order. The progress card matches the packing list's. The detail pane is a card with a box in its head that ticks the task off, and Delete and Save changes stay in sight: the To-Do view now fills the space under the Lists bar instead of a fixed height that pushed the pane's foot off screen. The detail pane and the new-task form share one set of fields, and a new list is named in a dialog, from the sidebar and from the form; the dialog moved to shared/NameDialog for both lists. The To-Do help pictures are re-rendered, the texts that described the old sidebar and form follow in all 27 languages, and the wiki page is updated. The phone screens are unchanged.
@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.