mirror of
https://github.com/bitbaum/sbb-fundbuero.git
synced 2026-12-04 05:30:31 +01:00
Five things were asked for. All five are here. 1. LOOK LIKE THE OPERATOR The palette was already theirs and had been for a long time — the token names in globals.css ARE the Lyne names (charcoal, granite, cloud, milk, smoke, storm) and the hex values match to the digit. That is why "make it look like them" kept not working: the colours were never the problem. What was missing is carried almost entirely by typographic metrics, and ours were generic: body line-height 1.5 -> 1.75 body letter-spacing 0 -> 0.03em heading line-height 1.5 -> 1.4 scale 7 sizes -> 12 13 14 16 18 20 24 32 40 48 56 64 Body copy set at 1.75 with a sliver of tracking is unusually airy, and that airiness is most of what a reader actually recognises. The metrics are mirrored into the Tailwind scale, not left to the cascade, because a fontSize utility emits its own line-height and would silently opt out of the brand. Chrome follows the shape these sites converge on: white ground, hairline rule, wordmark hard left, service controls hard right. No coloured header bar — the brand colour is spent on the primary action and almost nothing else, which is what makes these pages read as calm rather than loud. Provenance is in docs/design-language.md, which is the one file allowed to name the operator while discussing design. The components describe the PATTERN, and `check:tenant` is what forced that distinction — it rejected my own comments, correctly. The neutral house tenant wears the same chrome in blue and looks right doing it, which is the test that this is a pattern and not an impersonation. 2. /app IS NO LONGER A PHONE ON A DESKTOP It rendered in a 430px frame with a drop shadow at every width, with a white action bar welded across the bottom of the viewport. On a phone that is exactly right and it still does that. On a laptop it was a phone screenshot pretending to be a web page — which tells a visitor who just arrived from the landing page that the product is a mock-up. The app now wears the site's header and footer, gets a heading, and above `md` becomes a form on a page with the action in the reading order. The crew board moved to its own `(crew)` group and keeps the phone frame with none of the marketing chrome: crew walking a carriage do not need a language switcher and a legal footer. 3. FOUR LANGUAGES, REACHABLE Four full catalogues have shipped for a long time with no way for a visitor to reach three of them — the locale came from Accept-Language and nothing else, so a French speaker on a German-configured browser read German and had no recourse. Shipping translations and hiding the switch is worse than not translating, because it looks deliberate. Plain anchors to a server route that sets a cookie and 303s back. Works with JavaScript off and before hydration, which matters most for the person who cannot read the page they are on. Order de/fr/it/en, endonyms in full. `next` is validated rather than trusted: "starts with a slash" is not the check, since `//evil.example` starts with one too — 10 refusal cases are tested. On a phone the header reflows into three rows rather than dropping the switcher, because the switcher is the first thing a responsive header sheds and that is precisely the bug. 4. DESCRIBE IT INSTEAD OF FILLING IT IN A textarea above the first step: say what happened, the fields fill in. Built on @bitbaum/ai-kit/forms — fleet/SHARED.md is explicit that the second implementation is the bug, and five apps already run this one. It fills, it does not submit. The person walks the form as normal and the message says "please check", because a filled form someone reviewed is checked data and a submitted one is a claim nobody saw — and this product's entire argument is that its data is trustworthy enough to match on. What the model may write is SHORTER than the form, and the omissions are the design. No journeyId or stationId: a model reading "the IC 8 from Bern" and writing a journey id is exactly the failure rule 3 forbids, a confident unverifiable trip the matcher then trusts above everything. No email or phone: a misread journey costs a search, a misread phone number sends someone's recovery notice to a stranger. No timestamp either — "just before eight" needs a timezone and today's date; it asks for minutes and reuses offsetToIso. Off is distinguishable from broken. With no provider configured the route returns 501 and the UI says the feature is not configured and the form works as normal — not a spinner, not a generic error, and never a plausible fill produced from nothing. No microphone button: every phone keyboard already has dictation, wired to an engine the person has already permitted. A bespoke recorder means a second permission prompt, an audio upload and a transcript to store, for no gain over a textarea. 5. HEADER, FOOTER, NAVIGATION Header with sections, language and action. Footer with three columns, the legal basis (ZGB 720/3, VPB 77, by SR number), retention, source, and the concept disclaimer. No invented links — reproducing a real operator's footer shape with 404s would be the footer equivalent of a mock that renders as real data. ALSO FIXED, FOUND BY LOOKING The first heading of the report form was painting a 2px brand-red outline on load — a red box around "Welche Fahrt?" that reads as a validation error before anyone has typed anything. It is a programmatic focus target for screen-reader announcement, not a keyboard destination someone chose, so it keeps the focus and loses the paint. `lib/server/assist-fields.ts` imports its types only: ai-forms is ESM-only and a runtime import puts it in Jest's module graph, which SHARED.md records breaking AOZ. defineFields is the identity function, so the annotation does the same work and the registry stays plain testable data. `pnpm run verify` green: 305 tests, 21 suites. Privacy boundary and open redirect both proven by mutation. Claude-Session: https://claude.ai/code/session_01HVudRzEmLqLHvGNqFSpJq6 Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>