mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
c82a8f899f
The kinds were written out in nine places: the enum in @trek/shared, the service list and the colours in the model, the corridor's category keys, the map's road-trip categories, the popup's own table, two lookups in the rail, one in the map markers and one in the corridor panel. Each carried a comment asking the next person to keep the others in step, and it came apart anyway. A rest area was a parking sign in the popup, on the map pill and in the panel, and a coffee cup on the rail disc and the map marker, for the same stop. The parking sign wins: the colour has been documented since it was written as "the blue every parking sign in Europe is printed in". stopKinds.ts holds one row per kind and everything else reads from it. It sits beside the model rather than inside it because an icon is a React component and roadtripModel.ts is deliberately React-free so the arithmetic can be tested on its own; the colours and the service list stay there and are read from here. Two flags rather than one, because they are not the same question: a hotel is something the corridor can find, but sleeping somewhere ends the day rather than interrupting the drive. Seven tests pin the table against the two lists that cannot import it, so the next kind added in one place and forgotten in another fails a test instead of quietly counting as a destination.