From 75f288088f1de1bfad214d3510d0889df9f575d7 Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 22:59:42 +0100 Subject: [PATCH 01/13] design: one shell for the web app, and a system for the shared web code web-planner is the one shell of the web app: the entry, the pages, the host layer, the build configuration and the browser tests of the app. The new system web-foundations owns the code that the other web systems share: lib/core, format.ts, download.ts, constants.ts, the theme, the page addresses and the build plugins in vite/. lib/ui goes to route-planning, because its window and controls use the icon of the planner. Each folder of test-support goes to its system. The big cycle through device-map-builder is gone; the baseline holds 39 entries in place of 53. Co-Authored-By: Claude Opus --- .cairn/baseline.json | 16 +- docs/design/README.md | 34 +-- docs/design/device-link.md | 4 + docs/design/device-map-builder.md | 61 ------ docs/design/map-assembly.md | 1 + docs/design/map-style.md | 7 +- docs/design/map.json | 345 ++++++++++-------------------- docs/design/obc-data.md | 6 +- docs/design/route-planning.md | 3 + docs/design/search.md | 1 + docs/design/trailview.md | 8 +- docs/design/web-foundations.md | 41 ++++ docs/design/web-planner.md | 25 ++- docs/design/website.md | 2 +- 14 files changed, 214 insertions(+), 340 deletions(-) delete mode 100644 docs/design/device-map-builder.md create mode 100644 docs/design/web-foundations.md diff --git a/.cairn/baseline.json b/.cairn/baseline.json index cecc03b94f..8075d0b512 100644 --- a/.cairn/baseline.json +++ b/.cairn/baseline.json @@ -24,32 +24,18 @@ "cycle content -> device-map-baking", "cycle content -> map-reading", "cycle device-link -> card-storage", - "cycle device-link -> device-map-builder", "cycle device-link -> firmware-update", "cycle device-map-baking -> content", "cycle device-map-baking -> map-reading", "cycle device-map-baking -> source-preparation", - "cycle device-map-builder -> device-link", - "cycle device-map-builder -> firmware-update", - "cycle device-map-builder -> route-planning", - "cycle device-map-builder -> trailview", "cycle firmware-update -> device-link", - "cycle host-runtime -> card-storage", - "cycle map-assembly -> card-storage", - "cycle map-assembly -> device-link", - "cycle map-assembly -> device-map-builder", - "cycle map-assembly -> host-runtime", "cycle map-assembly -> map-style", "cycle map-assembly -> route-planning", "cycle map-reading -> device-map-baking", - "cycle map-style -> device-map-builder", "cycle map-style -> map-assembly", - "cycle route-planning -> device-map-builder", "cycle route-planning -> map-assembly", "cycle route-planning -> trailview", "cycle source-preparation -> map-reading", "cycle trailview -> route-planning", - "dependency search -> device-map-builder", - "test dependency route-planning -> planner-map-baking", - "test dependency trailview -> device-map-builder" + "test dependency route-planning -> planner-map-baking" ] diff --git a/docs/design/README.md b/docs/design/README.md index 0dd3ee0656..84455aa5df 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -14,6 +14,7 @@ flowchart LR s_map_assembly["map-assembly"] s_map_style["map-style"] s_route_planning["route-planning"] + s_web_foundations["web-foundations"] end subgraph area1["Data and services"] s_content["content"] @@ -55,17 +56,16 @@ flowchart LR s_device_link ==> s_card_storage s_device_link ==> s_firmware_update s_device_link --> s_navigation + s_device_link --> s_web_foundations s_device_map_baking ==> s_content s_device_map_baking ==> s_map_reading s_device_map_baking --> s_rendering_display s_device_map_baking ==> s_source_preparation s_device_runtime --> s_navigation s_firmware_update ==> s_device_link - s_host_runtime ==> s_card_storage + s_host_runtime --> s_card_storage s_host_runtime --> s_device_runtime - s_map_assembly ==> s_card_storage - s_map_assembly ==> s_device_link - s_map_assembly ==> s_host_runtime + s_map_assembly --> s_host_runtime s_map_assembly ==> s_map_style s_map_assembly ==> s_route_planning s_map_reading ==> s_device_map_baking @@ -79,6 +79,7 @@ flowchart LR s_route_planning ==> s_trailview s_routing --> s_source_preparation s_search --> s_content + s_search --> s_web_foundations s_source_preparation --> s_data_engine s_source_preparation ==> s_map_reading s_trailview ==> s_route_planning @@ -92,9 +93,10 @@ flowchart LR | --- | --- | --- | --- | --- | | [host-runtime](host-runtime.md) | Runs the device core on a computer or phone instead of the board. | draft | card-storage, device-runtime, foundations, map-reading, navigation, rendering-display | map-assembly, simulators | | [library](library.md) | Keeps the rider's routes, rides, photos of rides and settings in the browser, each route and ride with a summary, and saves and loads them as one backup file. | draft | | route-planning, web-planner | -| [map-assembly](map-assembly.md) | Assembles a device map from published cells. | draft | card-storage, device-link, device-map-baking, device-map-builder, foundations, host-runtime, map-reading, map-style, navigation, rendering-display, route-planning | map-style, obc-data, route-planning, web-planner | -| [map-style](map-style.md) | Defines how map features look on the device. | draft | device-map-builder, map-assembly | map-assembly, web-planner | -| [route-planning](route-planning.md) | Lets a rider plan a route on a map, in the browser or on the phone. | draft | device-map-builder, library, map-assembly, trailview | device-map-builder, map-assembly, obc-data, trailview, trailview-page, web-planner | +| [map-assembly](map-assembly.md) | Assembles a device map from published cells. | draft | card-storage, device-link, device-map-baking, foundations, host-runtime, map-reading, map-style, navigation, rendering-display, route-planning, web-foundations | map-style, obc-data, route-planning, web-planner | +| [map-style](map-style.md) | Defines how map features look on the device. | draft | map-assembly, web-foundations | map-assembly, web-planner | +| [route-planning](route-planning.md) | Lets a rider plan a route on a map, in the browser or on the phone. | draft | library, map-assembly, trailview, web-foundations | map-assembly, obc-data, trailview, trailview-page, web-planner | +| [web-foundations](web-foundations.md) | Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download and the build plugins. | draft | | device-link, map-assembly, map-style, obc-data, route-planning, search, trailview, web-planner | ### Data and services @@ -106,9 +108,9 @@ flowchart LR | [device-map-baking](device-map-baking.md) | Turns prepared sources into the device's map cells. | draft | content, data-engine, foundations, map-reading, rendering-display, source-preparation | content, map-assembly, map-reading, obc-data | | [planner-map-baking](planner-map-baking.md) | Turns prepared sources into the planner's map releases. | draft | | | | [routing](routing.md) | Finds a bike route between points. | draft | data-engine, source-preparation | obc-data | -| [search](search.md) | Finds places by name. | draft | content, data-engine, device-map-builder | obc-data | +| [search](search.md) | Finds places by name. | draft | content, data-engine, web-foundations | obc-data | | [source-preparation](source-preparation.md) | Turns raw external datasets into the prepared sources that products build from. | draft | data-engine, foundations, map-reading | device-map-baking, obc-data, routing | -| [trailview](trailview.md) | Renders a region as an explorable 3-D landscape in the browser. | draft | data-engine, route-planning | device-map-builder, obc-data, route-planning, trailview-page, web-planner | +| [trailview](trailview.md) | Renders a region as an explorable 3-D landscape in the browser. | draft | data-engine, route-planning, web-foundations | obc-data, route-planning, trailview-page, web-planner | ### Device @@ -117,10 +119,10 @@ flowchart LR | [board-inputs](board-inputs.md) | Turns raw sensor bytes and button edges into the values the core reads. | draft | foundations | device-firmware, simulators | | [board-support](board-support.md) | Drives the nRF54L hardware: radio, USB, microSD, display panel, sensors, buzzer. | draft | | | | [card-storage](card-storage.md) | Keeps the device's objects on the SD card. | draft | device-link, foundations | device-firmware, device-link, host-runtime, map-assembly, repository-tooling, simulators | -| [device-link](device-link.md) | Moves objects between the device and a phone or computer. | draft | card-storage, device-map-builder, firmware-update, foundations, navigation | card-storage, device-firmware, device-map-builder, firmware-update, map-assembly, simulators, web-planner | +| [device-link](device-link.md) | Moves objects between the device and a phone or computer. | draft | card-storage, firmware-update, foundations, navigation, web-foundations | card-storage, device-firmware, firmware-update, map-assembly, simulators, web-planner | | [device-runtime](device-runtime.md) | Drives each frame of the device core. | draft | foundations, map-reading, navigation, rendering-display | device-firmware, host-runtime, repository-tooling, simulators | | [discovery](discovery.md) | Tells the rider what is around them: places, summits, landmarks. | draft | | | -| [firmware-update](firmware-update.md) | Installs a verified firmware image on the device, with rollback. | draft | device-link, foundations | device-firmware, device-link, device-map-builder, simulators, web-planner | +| [firmware-update](firmware-update.md) | Installs a verified firmware image on the device, with rollback. | draft | device-link, foundations | device-firmware, device-link, simulators, web-planner | | [foundations](foundations.md) | Holds the shared building blocks that have no product policy: the byte layouts of the file formats, the byte-reading interface, CRC-32, the host interfaces and the map-scene interface. | approved | | board-inputs, card-storage, content, device-firmware, device-link, device-map-baking, device-runtime, firmware-update, host-runtime, map-assembly, map-reading, navigation, obc-data, rendering-display, repository-tooling, simulators, source-preparation | | [map-reading](map-reading.md) | Reads the device's map content from the card: OBCM maps, OBCT terrain. | draft | device-map-baking, foundations | content, device-firmware, device-map-baking, device-runtime, host-runtime, map-assembly, navigation, repository-tooling, simulators, source-preparation | | [navigation](navigation.md) | Guides the rider along a route. | draft | foundations, map-reading | device-firmware, device-link, device-runtime, host-runtime, map-assembly, repository-tooling, simulators | @@ -147,20 +149,18 @@ flowchart LR | --- | --- | --- | --- | --- | | [companion-ios](companion-ios.md) | Runs the iPhone app that plans routes, sends them to the device and gets rides back. | approved | | | | [device-firmware](device-firmware.md) | Builds the nRF54L board image from the device systems. | approved | board-inputs, card-storage, device-link, device-runtime, firmware-update, foundations, map-reading, navigation, rendering-display | | -| [device-map-builder](device-map-builder.md) | Holds the build configuration of the web app and the code that its pages share. | approved | device-link, firmware-update, route-planning, trailview | device-link, map-assembly, map-style, obc-data, route-planning, search, web-planner | -| [obc-data](obc-data.md) | Runs the `obc data` command and its operator page. | approved | data-engine, device-map-baking, device-map-builder, foundations, map-assembly, route-planning, routing, search, source-preparation, trailview | | +| [obc-data](obc-data.md) | Runs the `obc data` command and its operator page. | approved | data-engine, device-map-baking, foundations, map-assembly, route-planning, routing, search, source-preparation, trailview, web-foundations | | | [planner-tile-server](planner-tile-server.md) | Serves the map tiles of a planner release from the storage bucket or from a local folder. | approved | | | | [simulators](simulators.md) | Runs the device core on a computer, a phone or a web page, and sends test input to a real board. | approved | board-inputs, card-storage, data-engine, device-link, device-runtime, firmware-update, foundations, host-runtime, map-reading, navigation, rendering-display, repository-tooling | | | [trailview-page](trailview-page.md) | Opens TrailView, the 3-D view of a region, as its own page in the browser. | approved | route-planning, trailview | | -| [web-planner](web-planner.md) | Opens the app at /plan/: the top bar, the pages, and the route planner as one page. | approved | device-link, device-map-builder, firmware-update, library, map-assembly, map-style, route-planning, trailview | | +| [web-planner](web-planner.md) | Opens the app at /plan/: the top bar, the pages, and the route planner as one page. | approved | device-link, firmware-update, library, map-assembly, map-style, route-planning, trailview, web-foundations | | | [website](website.md) | Publishes the project site, the guide and the blog. | approved | | | ## Tangles -- A cycle between card-storage, device-link, device-map-builder, firmware-update, host-runtime, map-assembly, map-style, route-planning, trailview: card-storage -> device-link, device-link -> card-storage, device-link -> device-map-builder, device-link -> firmware-update, device-map-builder -> device-link, device-map-builder -> firmware-update, device-map-builder -> route-planning, device-map-builder -> trailview, firmware-update -> device-link, host-runtime -> card-storage, map-assembly -> card-storage, map-assembly -> device-link, map-assembly -> device-map-builder, map-assembly -> host-runtime, map-assembly -> map-style, map-assembly -> route-planning, map-style -> device-map-builder, map-style -> map-assembly, route-planning -> device-map-builder, route-planning -> map-assembly, route-planning -> trailview, trailview -> route-planning +- A cycle between card-storage, device-link, firmware-update: card-storage -> device-link, device-link -> card-storage, device-link -> firmware-update, firmware-update -> device-link - A cycle between content, device-map-baking, map-reading, source-preparation: content -> device-map-baking, content -> map-reading, device-map-baking -> content, device-map-baking -> map-reading, device-map-baking -> source-preparation, map-reading -> device-map-baking, source-preparation -> map-reading +- A cycle between map-assembly, map-style, route-planning, trailview: map-assembly -> map-style, map-assembly -> route-planning, map-style -> map-assembly, route-planning -> map-assembly, route-planning -> trailview, trailview -> route-planning - route-planning -> planner-map-baking (test) is not in the doc of route-planning -- search -> device-map-builder is not in the doc of search -- trailview -> device-map-builder (test) is not in the doc of trailview diff --git a/docs/design/device-link.md b/docs/design/device-link.md index bb76840295..ba781fb6c3 100644 --- a/docs/design/device-link.md +++ b/docs/design/device-link.md @@ -11,6 +11,9 @@ owns: - host/obc-vectors/** - builder/web/src/lib/usb/** - builder/web/src/lib/device/** + - builder/web/test-support/device-smoke/** + - builder/web/test-support/flat-device/** + - builder/web/tests/device-smoke/** - companion-ios/Packages/OBCKit/Sources/OBCTransport/** - companion-ios/Packages/OBCKit/Sources/OBCProtocolV4/** - companion-ios/Packages/OBCKit/Tests/OBCTransportTests/** @@ -20,6 +23,7 @@ depends_on: - firmware-update - foundations - navigation + - web-foundations test_depends_on: - map-reading status: draft diff --git a/docs/design/device-map-builder.md b/docs/design/device-map-builder.md deleted file mode 100644 index c87b1e481c..0000000000 --- a/docs/design/device-map-builder.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -system: device-map-builder -kind: shell -purpose: "Holds the build configuration of the web app and the code that its pages share." -owns: - - builder/web/vite.config.ts - - builder/web/svelte.config.js - - builder/web/src/main.ts - - builder/web/src/App.svelte - - builder/web/src/components/ConfirmDialog.svelte - - builder/web/src/components/Header.svelte - - builder/web/src/components/UpdatePrompt.svelte - - builder/web/src/components/device/** - - builder/web/src/lib/api/** - - builder/web/src/lib/constants.ts - - builder/web/src/lib/core/** - - builder/web/src/lib/download.ts - - builder/web/src/lib/format.ts - - builder/web/src/lib/palette.ts - - builder/web/src/lib/platform/** - - builder/web/src/lib/router.svelte.ts - - builder/web/src/lib/routes.test.ts - - builder/web/src/lib/routes.ts - - builder/web/src/lib/theme.svelte.test.ts - - builder/web/src/lib/theme.svelte.ts - - builder/web/src/lib/ui/** - - builder/web/src/routes/** - - builder/web/tests/** - - builder/web/test-support/** - - builder/web/scripts/** - - builder/web/vite/** - - builder/__init__.py - - builder/build-wasm-bridges.sh -depends_on: - - device-link - - firmware-update - - map-assembly - - map-style - - route-planning - - trailview - - website -test_depends_on: - - repository-tooling -status: approved ---- - -# Device map builder - -## What it does - -This document holds the code that the pages of the web app share: the host layer [`platform/`](../../builder/web/src/lib/platform/index.ts), the build configuration [`vite.config.ts`](../../builder/web/vite.config.ts), the shared parts in `lib/ui` and the loader of the shared WebAssembly core. The web app itself is the web planner. Map assembly owns the WebAssembly core. - -## Rules that must hold - -| Rule | Check | -| --- | --- | -| The built app refers to its files with relative paths, so it works under any path of a server. | `references its own assets relatively` in [`bundle.test.ts`](../../builder/web/src/lib/platform/bundle.test.ts); the step `Mountable at any prefix` in [`deploy-site.yml`](../../.github/workflows/deploy-site.yml) | - -## Decisions - -- **A browser with no WebUSB gets one sentence.** The device session has the state `unsupported` for such a browser, and the Device page shows a sentence in place of the Connect button ([`webusb.ts`](../../builder/web/src/lib/usb/webusb.ts)). diff --git a/docs/design/map-assembly.md b/docs/design/map-assembly.md index 147a161794..2bb7b22b83 100644 --- a/docs/design/map-assembly.md +++ b/docs/design/map-assembly.md @@ -23,6 +23,7 @@ depends_on: - map-reading - navigation - rendering-display + - web-foundations test_depends_on: - content status: draft diff --git a/docs/design/map-style.md b/docs/design/map-style.md index 9e0d8f85c8..1699649ca0 100644 --- a/docs/design/map-style.md +++ b/docs/design/map-style.md @@ -5,13 +5,10 @@ area: Apps purpose: "Defines how map features look on the device." owns: - builder/web/src/lib/skin/** - - builder/web/src/lib/config/** - - builder/web/src/lib/schema/** - builder/web/src/lib/color/** - builder/web/src/components/skin/** - - builder/web/src/components/advanced/** - - builder/server/** -depends_on: [] +depends_on: + - web-foundations test_depends_on: [] status: draft --- diff --git a/docs/design/map.json b/docs/design/map.json index 2fa530d1e1..7eec7c8be9 100644 --- a/docs/design/map.json +++ b/docs/design/map.json @@ -51,7 +51,7 @@ "map-reading", "navigation" ], - "violations": 5, + "violations": 3, "lines": 16264, "problems": [ { @@ -62,14 +62,6 @@ "rule": "cycle", "message": "device-link -> card-storage closes a cycle: obc-flat-device -> obc-storage, obc-link -> obc-storage (test)" }, - { - "rule": "cycle", - "message": "host-runtime -> card-storage closes a cycle: obc-host-core -> obc-storage" - }, - { - "rule": "cycle", - "message": "map-assembly -> card-storage closes a cycle: obc-builder-bridge -> obc-storage" - }, { "rule": "R1", "message": "crate obc-app (device-runtime) holds 5 file(s) of card-storage" @@ -189,13 +181,14 @@ "depends_on": [ "firmware-update", "foundations", - "navigation" + "navigation", + "web-foundations" ], "test_depends_on": [ "map-reading" ], - "violations": 8, - "lines": 34811, + "violations": 5, + "lines": 36200, "problems": [ { "rule": "cycle", @@ -205,26 +198,14 @@ "rule": "cycle", "message": "device-link -> card-storage closes a cycle: obc-flat-device -> obc-storage, obc-link -> obc-storage (test)" }, - { - "rule": "cycle", - "message": "device-link -> device-map-builder closes a cycle: builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/bytes.ts (test), builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/flat-device/load.ts (test), builder/web/src/lib/device/sha256.test.ts -> builder/web/src/lib/core/hash.ts (test), and 8 more" - }, { "rule": "cycle", "message": "device-link -> firmware-update closes a cycle: obc-vectors -> obc-dfu, builder/web/src/lib/device/write.ts -> builder/web/src/lib/firmware/obcu.ts" }, - { - "rule": "cycle", - "message": "device-map-builder -> device-link closes a cycle: builder/web/test-support/device-smoke/smoke.test.ts -> builder/web/src/lib/usb/client.ts (test), builder/web/test-support/device-smoke/smoke.test.ts -> builder/web/src/lib/usb/flat-device.ts (test), builder/web/test-support/device-smoke/smoke.test.ts -> builder/web/src/lib/usb/protocol.ts (test), and 16 more" - }, { "rule": "cycle", "message": "firmware-update -> device-link closes a cycle: builder/web/src/lib/firmware/obcu.test.ts -> builder/web/src/lib/usb/crc32.ts (test), builder/web/src/lib/firmware/obcu.ts -> builder/web/src/lib/usb/crc32.ts, builder/web/src/lib/firmware/obcu.ts -> builder/web/src/lib/usb/protocol.ts" }, - { - "rule": "cycle", - "message": "map-assembly -> device-link closes a cycle: obc-builder-bridge -> obc-flat-device, obc-builder-bridge -> obc-link, obc-builder-bridge -> obc-vectors (test), and 4 more" - }, { "rule": "R1", "message": "crate obc-app (device-runtime) holds 1 file(s) of device-link" @@ -282,61 +263,6 @@ } ] }, - { - "name": "device-map-builder", - "kind": "shell", - "area": "Shells", - "purpose": "Holds the build configuration of the web app and the code that its pages share.", - "status": "approved", - "depends_on": [ - "device-link", - "firmware-update", - "map-assembly", - "map-style", - "route-planning", - "trailview", - "website" - ], - "test_depends_on": [ - "repository-tooling" - ], - "violations": 8, - "lines": 9192, - "problems": [ - { - "rule": "cycle", - "message": "device-link -> device-map-builder closes a cycle: builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/bytes.ts (test), builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/flat-device/load.ts (test), builder/web/src/lib/device/sha256.test.ts -> builder/web/src/lib/core/hash.ts (test), and 8 more" - }, - { - "rule": "cycle", - "message": "device-map-builder -> device-link closes a cycle: builder/web/test-support/device-smoke/smoke.test.ts -> builder/web/src/lib/usb/client.ts (test), builder/web/test-support/device-smoke/smoke.test.ts -> builder/web/src/lib/usb/flat-device.ts (test), builder/web/test-support/device-smoke/smoke.test.ts -> builder/web/src/lib/usb/protocol.ts (test), and 16 more" - }, - { - "rule": "cycle", - "message": "device-map-builder -> firmware-update closes a cycle: builder/web/test-support/device-sync/fake-device.ts -> builder/web/src/lib/firmware/check.svelte.ts" - }, - { - "rule": "cycle", - "message": "device-map-builder -> route-planning closes a cycle: builder/web/scripts/road-census.ts -> builder/web/src/lib/planner/layers/mercator.ts, builder/web/src/lib/platform/web.ts -> builder/web/src/lib/planner/release.ts, builder/web/src/lib/ui/Segmented.svelte -> builder/web/src/components/planner/PlannerIcon.svelte, and 15 more" - }, - { - "rule": "cycle", - "message": "device-map-builder -> trailview closes a cycle: builder/web/scripts/check-wgsl.mjs -> builder/web/src/lib/trailview/gpu/include.ts, builder/web/scripts/road-census.ts -> builder/web/src/lib/trailview/frame/space.ts, builder/web/scripts/road-census.ts -> builder/web/src/lib/trailview/terrain/bins.ts, and 28 more" - }, - { - "rule": "cycle", - "message": "map-assembly -> device-map-builder closes a cycle: builder/web/src/components/coverage/CoverageMap.svelte -> builder/web/src/lib/core/grid.ts, builder/web/src/components/coverage/CoverageMap.svelte -> builder/web/src/lib/format.ts, builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/lib/ui/Window.svelte, and 21 more" - }, - { - "rule": "cycle", - "message": "map-style -> device-map-builder closes a cycle: builder/web/src/lib/skin/preview.test.ts -> builder/web/src/lib/core/bridge.ts (test), builder/web/src/lib/skin/preview.ts -> builder/web/src/lib/core/bridge.ts" - }, - { - "rule": "cycle", - "message": "route-planning -> device-map-builder closes a cycle: builder/web/src/components/planner/CompareList.svelte -> builder/web/src/lib/ui/Segmented.svelte, builder/web/src/components/planner/CompareScreen.svelte.test.ts -> builder/web/test-support/planner/MapStub.svelte (test), builder/web/src/components/planner/CompareScreen.svelte.test.ts -> builder/web/test-support/planner/trip.ts (test), and 33 more" - } - ] - }, { "name": "device-runtime", "kind": "system", @@ -419,17 +345,13 @@ "test_depends_on": [ "map-reading" ], - "violations": 4, + "violations": 3, "lines": 7697, "problems": [ { "rule": "cycle", "message": "device-link -> firmware-update closes a cycle: obc-vectors -> obc-dfu, builder/web/src/lib/device/write.ts -> builder/web/src/lib/firmware/obcu.ts" }, - { - "rule": "cycle", - "message": "device-map-builder -> firmware-update closes a cycle: builder/web/test-support/device-sync/fake-device.ts -> builder/web/src/lib/firmware/check.svelte.ts" - }, { "rule": "cycle", "message": "firmware-update -> device-link closes a cycle: builder/web/src/lib/firmware/obcu.test.ts -> builder/web/src/lib/usb/crc32.ts (test), builder/web/src/lib/firmware/obcu.ts -> builder/web/src/lib/usb/crc32.ts, builder/web/src/lib/firmware/obcu.ts -> builder/web/src/lib/usb/protocol.ts" @@ -486,18 +408,9 @@ "device-map-baking", "repository-tooling" ], - "violations": 2, + "violations": 0, "lines": 17284, - "problems": [ - { - "rule": "cycle", - "message": "host-runtime -> card-storage closes a cycle: obc-host-core -> obc-storage" - }, - { - "rule": "cycle", - "message": "map-assembly -> host-runtime closes a cycle: obc-builder-bridge -> obc-host-core" - } - ] + "problems": [] }, { "name": "library", @@ -525,37 +438,22 @@ "host-runtime", "map-reading", "navigation", - "rendering-display" + "rendering-display", + "web-foundations" ], "test_depends_on": [ "content" ], - "violations": 8, - "lines": 21789, + "violations": 4, + "lines": 21758, "problems": [ - { - "rule": "cycle", - "message": "map-assembly -> card-storage closes a cycle: obc-builder-bridge -> obc-storage" - }, - { - "rule": "cycle", - "message": "map-assembly -> device-link closes a cycle: obc-builder-bridge -> obc-flat-device, obc-builder-bridge -> obc-link, obc-builder-bridge -> obc-vectors (test), and 4 more" - }, - { - "rule": "cycle", - "message": "map-assembly -> device-map-builder closes a cycle: builder/web/src/components/coverage/CoverageMap.svelte -> builder/web/src/lib/core/grid.ts, builder/web/src/components/coverage/CoverageMap.svelte -> builder/web/src/lib/format.ts, builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/lib/ui/Window.svelte, and 21 more" - }, - { - "rule": "cycle", - "message": "map-assembly -> host-runtime closes a cycle: obc-builder-bridge -> obc-host-core" - }, { "rule": "cycle", "message": "map-assembly -> map-style closes a cycle: builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/components/skin/SkinEditor.svelte, builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/components/skin/SkinPreviewThumbnail.svelte, builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/lib/skin/custom.ts, and 4 more" }, { "rule": "cycle", - "message": "map-assembly -> route-planning closes a cycle: builder/web/src/lib/map/basemap-config.test.ts -> builder/web/src/lib/planner/map-style.ts (test), builder/web/src/lib/map/basemap-config.ts -> builder/web/src/lib/planner/config.ts, builder/web/src/lib/map/basemap-config.ts -> builder/web/src/lib/planner/release.ts, and 1 more" + "message": "map-assembly -> route-planning closes a cycle: builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/lib/ui/Window.svelte, builder/web/src/lib/map/basemap-config.test.ts -> builder/web/src/lib/planner/map-style.ts (test), builder/web/src/lib/map/basemap-config.ts -> builder/web/src/lib/planner/config.ts, and 2 more" }, { "rule": "cycle", @@ -607,19 +505,17 @@ "area": "Apps", "purpose": "Defines how map features look on the device.", "status": "draft", - "depends_on": [], + "depends_on": [ + "web-foundations" + ], "test_depends_on": [], - "violations": 3, + "violations": 2, "lines": 1998, "problems": [ { "rule": "cycle", "message": "map-assembly -> map-style closes a cycle: builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/components/skin/SkinEditor.svelte, builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/components/skin/SkinPreviewThumbnail.svelte, builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/lib/skin/custom.ts, and 4 more" }, - { - "rule": "cycle", - "message": "map-style -> device-map-builder closes a cycle: builder/web/src/lib/skin/preview.test.ts -> builder/web/src/lib/core/bridge.ts (test), builder/web/src/lib/skin/preview.ts -> builder/web/src/lib/core/bridge.ts" - }, { "rule": "cycle", "message": "map-style -> map-assembly closes a cycle: builder/web/src/components/skin/SkinEditor.svelte -> builder/web/src/lib/catalog/manifest.ts, builder/web/src/components/skin/SkinEditor.svelte -> builder/web/src/lib/coverage/store.svelte.ts, builder/web/src/components/skin/SkinLivePreview.svelte -> builder/web/src/lib/catalog/manifest.ts, and 6 more" @@ -658,21 +554,21 @@ "depends_on": [ "data-engine", "device-map-baking", - "device-map-builder", "foundations", "map-assembly", "route-planning", "routing", "search", "source-preparation", - "trailview" + "trailview", + "web-foundations" ], "test_depends_on": [ "map-reading", "repository-tooling" ], "violations": 4, - "lines": 9954, + "lines": 10055, "problems": [ { "rule": "R1", @@ -800,23 +696,16 @@ "purpose": "Lets a rider plan a route on a map, in the browser or on the phone.", "status": "draft", "depends_on": [ - "library" + "library", + "web-foundations" ], "test_depends_on": [], - "violations": 7, - "lines": 27585, + "violations": 5, + "lines": 28026, "problems": [ { "rule": "cycle", - "message": "device-map-builder -> route-planning closes a cycle: builder/web/scripts/road-census.ts -> builder/web/src/lib/planner/layers/mercator.ts, builder/web/src/lib/platform/web.ts -> builder/web/src/lib/planner/release.ts, builder/web/src/lib/ui/Segmented.svelte -> builder/web/src/components/planner/PlannerIcon.svelte, and 15 more" - }, - { - "rule": "cycle", - "message": "map-assembly -> route-planning closes a cycle: builder/web/src/lib/map/basemap-config.test.ts -> builder/web/src/lib/planner/map-style.ts (test), builder/web/src/lib/map/basemap-config.ts -> builder/web/src/lib/planner/config.ts, builder/web/src/lib/map/basemap-config.ts -> builder/web/src/lib/planner/release.ts, and 1 more" - }, - { - "rule": "cycle", - "message": "route-planning -> device-map-builder closes a cycle: builder/web/src/components/planner/CompareList.svelte -> builder/web/src/lib/ui/Segmented.svelte, builder/web/src/components/planner/CompareScreen.svelte.test.ts -> builder/web/test-support/planner/MapStub.svelte (test), builder/web/src/components/planner/CompareScreen.svelte.test.ts -> builder/web/test-support/planner/trip.ts (test), and 33 more" + "message": "map-assembly -> route-planning closes a cycle: builder/web/src/components/coverage/SkinStep.svelte -> builder/web/src/lib/ui/Window.svelte, builder/web/src/lib/map/basemap-config.test.ts -> builder/web/src/lib/planner/map-style.ts (test), builder/web/src/lib/map/basemap-config.ts -> builder/web/src/lib/planner/config.ts, and 2 more" }, { "rule": "cycle", @@ -832,7 +721,7 @@ }, { "rule": "cycle", - "message": "trailview -> route-planning closes a cycle: builder/web/src/lib/trailview/dressing/dressing.ts -> builder/web/src/lib/planner/layers/mercator.ts, builder/web/src/lib/trailview/engine.ts -> builder/web/src/lib/planner/config.ts, builder/web/src/lib/trailview/engine.ts -> builder/web/src/lib/planner/geo.ts, and 38 more" + "message": "trailview -> route-planning closes a cycle: builder/web/scripts/road-census.ts -> builder/web/src/lib/planner/layers/mercator.ts, builder/web/src/lib/trailview/dressing/dressing.ts -> builder/web/src/lib/planner/layers/mercator.ts, builder/web/src/lib/trailview/engine.ts -> builder/web/src/lib/planner/config.ts, and 42 more" } ] }, @@ -864,18 +753,15 @@ "status": "draft", "depends_on": [ "content", - "data-engine" + "data-engine", + "web-foundations" ], "test_depends_on": [ "device-map-baking" ], - "violations": 2, + "violations": 1, "lines": 11477, "problems": [ - { - "rule": "dependency", - "message": "search uses device-map-builder but does not list it in depends_on: planner/search/native-build.mjs -> builder/web/vite/third-party-licenses.ts" - }, { "rule": "R4", "message": "search (Data and services) has 2 file(s) under tools/" @@ -948,27 +834,22 @@ "purpose": "Renders a region as an explorable 3-D landscape in the browser.", "status": "draft", "depends_on": [ - "data-engine" + "data-engine", + "web-foundations" ], - "test_depends_on": [], - "violations": 5, - "lines": 103131, + "test_depends_on": [ + "repository-tooling" + ], + "violations": 3, + "lines": 106147, "problems": [ - { - "rule": "cycle", - "message": "device-map-builder -> trailview closes a cycle: builder/web/scripts/check-wgsl.mjs -> builder/web/src/lib/trailview/gpu/include.ts, builder/web/scripts/road-census.ts -> builder/web/src/lib/trailview/frame/space.ts, builder/web/scripts/road-census.ts -> builder/web/src/lib/trailview/terrain/bins.ts, and 28 more" - }, { "rule": "cycle", "message": "route-planning -> trailview closes a cycle: builder/web/src/components/planner/TrailViewConditions.svelte -> builder/web/src/lib/trailview/view.ts, builder/web/src/components/planner/TrailViewWindow.svelte -> builder/web/src/lib/trailview/engine.ts, builder/web/src/components/planner/TrailViewWindow.svelte -> builder/web/src/lib/trailview/frame/camera.ts, and 12 more" }, - { - "rule": "dependency", - "message": "trailview tests use device-map-builder but test_depends_on does not list it: builder/web/src/lib/trailview/roads/mesh.test.ts -> builder/web/test-support/trailview/census.ts (test), builder/web/src/lib/trailview/terrain/model.test.ts -> builder/web/test-support/fake-caches.ts (test), builder/web/src/lib/trailview/terrain/stamp-cache.test.ts -> builder/web/test-support/fake-caches.ts (test), and 2 more" - }, { "rule": "cycle", - "message": "trailview -> route-planning closes a cycle: builder/web/src/lib/trailview/dressing/dressing.ts -> builder/web/src/lib/planner/layers/mercator.ts, builder/web/src/lib/trailview/engine.ts -> builder/web/src/lib/planner/config.ts, builder/web/src/lib/trailview/engine.ts -> builder/web/src/lib/planner/geo.ts, and 38 more" + "message": "trailview -> route-planning closes a cycle: builder/web/scripts/road-census.ts -> builder/web/src/lib/planner/layers/mercator.ts, builder/web/src/lib/trailview/dressing/dressing.ts -> builder/web/src/lib/planner/layers/mercator.ts, builder/web/src/lib/trailview/engine.ts -> builder/web/src/lib/planner/config.ts, and 42 more" }, { "rule": "R4", @@ -1003,6 +884,18 @@ "lines": 7278, "problems": [] }, + { + "name": "web-foundations", + "kind": "system", + "area": "Apps", + "purpose": "Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download and the build plugins.", + "status": "draft", + "depends_on": [], + "test_depends_on": [], + "violations": 0, + "lines": 1289, + "problems": [] + }, { "name": "web-planner", "kind": "shell", @@ -1011,17 +904,19 @@ "status": "approved", "depends_on": [ "device-link", - "device-map-builder", "firmware-update", "library", "map-assembly", "map-style", "route-planning", - "trailview" + "trailview", + "web-foundations" + ], + "test_depends_on": [ + "repository-tooling" ], - "test_depends_on": [], "violations": 0, - "lines": 14023, + "lines": 16979, "problems": [] }, { @@ -1158,12 +1053,6 @@ "test": false, "undeclared": true }, - { - "from": "device-link", - "to": "device-map-builder", - "test": false, - "undeclared": true - }, { "from": "device-link", "to": "firmware-update", @@ -1188,6 +1077,12 @@ "test": false, "undeclared": false }, + { + "from": "device-link", + "to": "web-foundations", + "test": false, + "undeclared": false + }, { "from": "device-map-baking", "to": "content", @@ -1254,36 +1149,6 @@ "test": false, "undeclared": true }, - { - "from": "device-map-builder", - "to": "device-link", - "test": false, - "undeclared": false - }, - { - "from": "device-map-builder", - "to": "firmware-update", - "test": false, - "undeclared": false - }, - { - "from": "device-map-builder", - "to": "repository-tooling", - "test": true, - "undeclared": false - }, - { - "from": "device-map-builder", - "to": "route-planning", - "test": false, - "undeclared": false - }, - { - "from": "device-map-builder", - "to": "trailview", - "test": false, - "undeclared": false - }, { "from": "device-runtime", "to": "data-engine", @@ -1428,12 +1293,6 @@ "test": false, "undeclared": false }, - { - "from": "map-assembly", - "to": "device-map-builder", - "test": false, - "undeclared": true - }, { "from": "map-assembly", "to": "foundations", @@ -1476,6 +1335,12 @@ "test": false, "undeclared": true }, + { + "from": "map-assembly", + "to": "web-foundations", + "test": false, + "undeclared": false + }, { "from": "map-reading", "to": "device-map-baking", @@ -1502,15 +1367,15 @@ }, { "from": "map-style", - "to": "device-map-builder", + "to": "map-assembly", "test": false, "undeclared": true }, { "from": "map-style", - "to": "map-assembly", + "to": "web-foundations", "test": false, - "undeclared": true + "undeclared": false }, { "from": "navigation", @@ -1548,12 +1413,6 @@ "test": false, "undeclared": false }, - { - "from": "obc-data", - "to": "device-map-builder", - "test": false, - "undeclared": false - }, { "from": "obc-data", "to": "foundations", @@ -1608,6 +1467,12 @@ "test": false, "undeclared": false }, + { + "from": "obc-data", + "to": "web-foundations", + "test": false, + "undeclared": false + }, { "from": "rendering-display", "to": "foundations", @@ -1650,12 +1515,6 @@ "test": false, "undeclared": false }, - { - "from": "route-planning", - "to": "device-map-builder", - "test": false, - "undeclared": true - }, { "from": "route-planning", "to": "library", @@ -1680,6 +1539,12 @@ "test": false, "undeclared": true }, + { + "from": "route-planning", + "to": "web-foundations", + "test": false, + "undeclared": false + }, { "from": "routing", "to": "data-engine", @@ -1712,9 +1577,9 @@ }, { "from": "search", - "to": "device-map-builder", + "to": "web-foundations", "test": false, - "undeclared": true + "undeclared": false }, { "from": "simulators", @@ -1820,9 +1685,9 @@ }, { "from": "trailview", - "to": "device-map-builder", + "to": "repository-tooling", "test": true, - "undeclared": true + "undeclared": false }, { "from": "trailview", @@ -1831,26 +1696,26 @@ "undeclared": true }, { - "from": "trailview-page", - "to": "route-planning", + "from": "trailview", + "to": "web-foundations", "test": false, "undeclared": false }, { "from": "trailview-page", - "to": "trailview", + "to": "route-planning", "test": false, "undeclared": false }, { - "from": "web-planner", - "to": "device-link", + "from": "trailview-page", + "to": "trailview", "test": false, "undeclared": false }, { "from": "web-planner", - "to": "device-map-builder", + "to": "device-link", "test": false, "undeclared": false }, @@ -1878,6 +1743,12 @@ "test": false, "undeclared": false }, + { + "from": "web-planner", + "to": "repository-tooling", + "test": true, + "undeclared": false + }, { "from": "web-planner", "to": "route-planning", @@ -1889,25 +1760,31 @@ "to": "trailview", "test": false, "undeclared": false + }, + { + "from": "web-planner", + "to": "web-foundations", + "test": false, + "undeclared": false } ], "cycles": [ [ "card-storage", "device-link", - "device-map-builder", - "firmware-update", - "host-runtime", - "map-assembly", - "map-style", - "route-planning", - "trailview" + "firmware-update" ], [ "content", "device-map-baking", "map-reading", "source-preparation" + ], + [ + "map-assembly", + "map-style", + "route-planning", + "trailview" ] ] } diff --git a/docs/design/obc-data.md b/docs/design/obc-data.md index b13c16a6a3..28cb89b090 100644 --- a/docs/design/obc-data.md +++ b/docs/design/obc-data.md @@ -7,10 +7,11 @@ owns: - builder/web/src/data.ts - builder/web/src/lib/data/** - builder/web/src/components/data/** + - builder/web/tests/browser/data/** + - builder/web/tests/browser/playwright.data.config.js depends_on: - data-engine - device-map-baking - - device-map-builder - foundations - map-assembly - route-planning @@ -18,6 +19,7 @@ depends_on: - search - source-preparation - trailview + - web-foundations test_depends_on: - map-reading - repository-tooling @@ -30,7 +32,7 @@ status: approved An operator runs `obc data` to build and publish the project's data: the map cells of the device, the releases of the route planner, and the prepared sources (processed copies of large external datasets). The binary `obc-data` ([`main.rs`](../../host/obc-data-steps/src/main.rs)) gives the data engine the list of products and their steps ([`lib.rs`](../../host/obc-data-steps/src/lib.rs)). The products are the device maps and the planner, with its routing, search and TrailView layers. The list also names the producers of prepared sources. -`obc data ui` serves an operator page on this machine, at port 8700 ([`ui.rs`](../../host/obc-data-steps/src/ui.rs)). The page is a Svelte app ([`DataApp.svelte`](../../builder/web/src/components/data/DataApp.svelte)) that the map builder's build configuration builds. For each action, the page sends one `obc data` command to the server, and the server runs it. +`obc data ui` serves an operator page on this machine, at port 8700 ([`ui.rs`](../../host/obc-data-steps/src/ui.rs)). The page is a Svelte app ([`DataApp.svelte`](../../builder/web/src/components/data/DataApp.svelte)) that the build configuration of the web app ([`vite.config.ts`](../../builder/web/vite.config.ts)) builds. For each action, the page sends one `obc data` command to the server, and the server runs it. The data engine owns the commands, the store, the versions and the publication. diff --git a/docs/design/route-planning.md b/docs/design/route-planning.md index b24a21b8fa..79ef48ffe3 100644 --- a/docs/design/route-planning.md +++ b/docs/design/route-planning.md @@ -6,12 +6,15 @@ purpose: "Lets a rider plan a route on a map, in the browser or on the phone." owns: - builder/web/src/lib/planner/** - builder/web/src/components/planner/** + - builder/web/src/lib/ui/** + - builder/web/test-support/planner/** - companion-ios/Packages/OBCKit/Sources/OBCPlanner/** - companion-ios/Packages/OBCKit/Tests/OBCPlannerTests/** - companion-ios/PlannerNative/** - companion-ios/PlannerSearch/** depends_on: - library + - web-foundations test_depends_on: [] status: draft --- diff --git a/docs/design/search.md b/docs/design/search.md index e6be8dda0a..bc5d5fff03 100644 --- a/docs/design/search.md +++ b/docs/design/search.md @@ -11,6 +11,7 @@ owns: depends_on: - content - data-engine + - web-foundations test_depends_on: - device-map-baking status: draft diff --git a/docs/design/trailview.md b/docs/design/trailview.md index ac303c322b..767c68bea9 100644 --- a/docs/design/trailview.md +++ b/docs/design/trailview.md @@ -10,11 +10,17 @@ owns: - builder/web/src/lib/trailview/** - builder/web/src/plan-timing.ts - builder/web/plan-timing.html + - builder/web/scripts/** + - builder/web/test-support/trailview/** + - builder/web/tests/browser/trailview/** + - builder/web/tests/browser/playwright.trailview.config.js - tools/trailview/** - tools/planner_trailview_canopy.py depends_on: - data-engine -test_depends_on: [] + - web-foundations +test_depends_on: + - repository-tooling status: draft --- diff --git a/docs/design/web-foundations.md b/docs/design/web-foundations.md new file mode 100644 index 0000000000..b3203a0932 --- /dev/null +++ b/docs/design/web-foundations.md @@ -0,0 +1,41 @@ +--- +system: web-foundations +kind: system +area: Apps +purpose: "Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download and the build plugins." +owns: + - builder/web/src/lib/core/** + - builder/web/src/lib/format.ts + - builder/web/src/lib/download.ts + - builder/web/src/lib/constants.ts + - builder/web/src/lib/theme.svelte.ts + - builder/web/src/lib/theme.svelte.test.ts + - builder/web/src/lib/routes.ts + - builder/web/src/lib/routes.test.ts + - builder/web/src/lib/router.svelte.ts + - builder/web/vite/** + - builder/web/test-support/bytes.ts + - builder/web/test-support/core.ts + - builder/web/test-support/fake-caches.ts +depends_on: [] +test_depends_on: [] +status: draft +--- + +# Web foundations + +## What it does + +This system holds the code that more than one web system uses and that has no product rule of its own. The web app, route planning, map assembly, map style, the device link, TrailView, search and the operator page of `obc data` use it. + +- [`core/bridge.ts`](../../builder/web/src/lib/core/bridge.ts) loads the shared WebAssembly core one time for the page. The other files of `core/` call it to read and write GPX and FIT files, to calculate SHA-256 and to name the map cells of the grid. Map assembly owns the Rust code of the core. +- [`download.ts`](../../builder/web/src/lib/download.ts) downloads one catalogue object and refuses bytes whose size or SHA-256 differs from the published values. +- [`theme.svelte.ts`](../../builder/web/src/lib/theme.svelte.ts) keeps the look (system, light or dark) of each page. +- [`routes.ts`](../../builder/web/src/lib/routes.ts) gives the hash address of each page of the web app, and [`router.svelte.ts`](../../builder/web/src/lib/router.svelte.ts) follows the address. Route planning uses them too, so they are not in the shell. +- `vite/` holds the build plugins: the licence notices, the version of a bundle and the bundle of the terrain stamps. Each one imports no local file, because plain Node also loads them. + +## Rules that must hold + +| Rule | Check | +| --- | --- | +| This system uses no other system, so each web system can use it with no cycle. | `cycles` in [`cairn.py`](../../tools/cairn/cairn.py), with `depends_on: []` | diff --git a/docs/design/web-planner.md b/docs/design/web-planner.md index d24f2bd4cc..4ccee3a069 100644 --- a/docs/design/web-planner.md +++ b/docs/design/web-planner.md @@ -3,6 +3,9 @@ system: web-planner kind: shell purpose: "Opens the app at /plan/: the top bar, the pages, and the route planner as one page." owns: + - builder/web/vite.config.ts + - builder/web/svelte.config.js + - builder/build-wasm-bridges.sh - builder/web/src/planner.ts - builder/web/src/Shell.svelte - builder/web/src/components/TopBar.svelte @@ -11,17 +14,23 @@ owns: - builder/web/src/components/route/** - builder/web/src/lib/covers/** - builder/web/src/lib/device-sync/** + - builder/web/src/lib/platform/** - builder/web/src/lib/ride/** + - builder/web/test-support/device-sync/** + - builder/web/tests/browser/planner/** + - builder/web/tests/browser/playwright.planner.config.js + - builder/web/tests/browser/serve.py depends_on: - device-link - - device-map-builder - firmware-update - library - map-assembly - map-style - route-planning - trailview -test_depends_on: [] + - web-foundations +test_depends_on: + - repository-tooling status: approved --- @@ -31,7 +40,7 @@ status: approved This page is the app of the rider at the path `/plan/`. The entry point [`planner.ts`](../../builder/web/src/planner.ts) mounts the shell ([`Shell.svelte`](../../builder/web/src/Shell.svelte)). The shell shows the top bar ([`TopBar.svelte`](../../builder/web/src/components/TopBar.svelte)), one page, and a footer line with the links of the project site, the legal pages and the licence notices that the build writes beside the page. -The hash of the address selects the page, for example `#/planner` or `#/route/ID` ([`routes.ts`](../../builder/web/src/lib/routes.ts)). The table `PAGES` in the shell has one line for each page. A line gives the label of the link in the top bar, if the page has one, and a function that loads the page. A hash with no line in `PAGES` shows the Home page. Each page goes in `src/pages/`. The route planner is the page of route planning (`PlannerApp`). Its line loads the shared WebAssembly core of the map builder first. When a page cannot load, the shell shows its message. +The hash of the address selects the page, for example `#/planner` or `#/route/ID` ([`routes.ts`](../../builder/web/src/lib/routes.ts)). The table `PAGES` in the shell has one line for each page. A line gives the label of the link in the top bar, if the page has one, and a function that loads the page. A hash with no line in `PAGES` shows the Home page. Each page goes in `src/pages/`. The route planner is the page of route planning (`PlannerApp`). Its line loads the shared WebAssembly core first. When a page cannot load, the shell shows its message. The planner page stays mounted when another page shows, so its Undo history, its map view and its calculated line stay. The shell hides it and gives it `active` false, and then the planner reads no keys. When the route changes, the shell closes each open modal window, because an open modal window makes the rest of the page inert. @@ -41,7 +50,9 @@ The shell makes the one library of the app (`Library`) and gives it to each page The settings ([`Settings.svelte`](../../builder/web/src/pages/Settings.svelte)) are a large window over the page, not a page in `PAGES`; the gear at the right end of the top bar opens them. For `#/settings`, the router keeps the route and the id of the page before it, so that page is not created again and keeps its scroll place and its selection. A direct visit shows the window over the first page: the router puts `#/` in the history before it. So each close of the window is Back, and Close, Escape and a click on the dimmed page go back too. The settings set the units, the look, the maximum heart rate and the threshold power, and it saves and loads a backup of the library. "Delete all" empties the library with `clear` and loads the page again, because after `clear` the `Library` object of the tab refuses each write. -`npm run build:planner` builds the page into `builder/web/dist/planner`. The site deploy copies it to the path `/plan/` of the project site ([`deploy-site.yml`](../../.github/workflows/deploy-site.yml)). Route planning owns all the planner code. This shell owns the entry point, the shell, the top bar, the pages, their parts in `components/route` and the covers in `lib/covers`. +The pages reach the browser through one host layer ([`platform/`](../../builder/web/src/lib/platform/index.ts)), the web host. The build configuration ([`vite.config.ts`](../../builder/web/vite.config.ts)) builds this app, TrailView alone and the operator page of `obc data`, each with its own mode. `npm run build:planner` builds the app into `builder/web/dist/planner`. The site deploy copies it to the path `/plan/` of the project site ([`deploy-site.yml`](../../.github/workflows/deploy-site.yml)). The browser tests of the app are in `tests/browser/planner/`. + +Route planning owns all the planner code and the shared window and controls of `lib/ui`. Web foundations owns the code that the other web systems share too: the page addresses, the theme and the loader of the WebAssembly core. This shell owns the entry point, the shell, the top bar, the pages, their parts in `components/route`, the covers in `lib/covers`, the host layer and the build configuration. ## Home page @@ -177,3 +188,9 @@ A card whose record gets no cover shows a still picture of the map ([`map-pictur The cover part ([`Cover.svelte`](../../builder/web/src/lib/covers/Cover.svelte)) cuts the image as CSS `cover` does, and moves the cut toward the middle of the route. It draws the line thinner far from the eye, and draws no part of the line that the terrain hides. It shows a selected part and a mark, and gives the point of the line under the pointer. Its prop `place` tells where it shows: a row of a list asks for nothing, a card asks for the cover and then the map picture, and a page asks for the cover only. With no cover, a card shows the map picture of the theme with the line drawn on it as on a cover. Else the part draws the summary line on a plain ground. `planner.html?cover=ID` shows the cover of one record in a home card and at a large size, for the browser test. The window "Add files" ([`AddFiles.svelte`](../../builder/web/src/pages/AddFiles.svelte)) adds GPX and FIT files, folders and the ZIP exports of services to the library. It gives the file readers of the shared core to the library (`readFiles`), so that the library depends on no other system. A route from a file becomes a plan of the planner with one drawn leg (`planFromFile`). The Routes page opens the window. + +## Rules that must hold + +| Rule | Check | +| --- | --- | +| The built app refers to its files with relative paths, so it works under any path of a server. | `references its own assets relatively` in [`bundle.test.ts`](../../builder/web/src/lib/platform/bundle.test.ts); the step `Mountable at any prefix` in [`deploy-site.yml`](../../.github/workflows/deploy-site.yml) | diff --git a/docs/design/website.md b/docs/design/website.md index c44c9a4db0..f46426b462 100644 --- a/docs/design/website.md +++ b/docs/design/website.md @@ -15,7 +15,7 @@ status: approved The website is the project site at openbikecomputer.com: the landing page, the guide, the blog, the system docs and the hardware parts list. The script [`build_docs.py`](../../docs/build_docs.py) renders the Markdown pages of `docs/content/` and the blog posts to HTML. [`nav.json`](../../docs/content/nav.json) gives the order and the titles of the guide pages. The script also makes the data-sources tables from the data registry, a page for each system doc, and, with the `--hardware` flag, the parts list of the hardware. -Trunk ([`Trunk.toml`](../../docs/Trunk.toml)) builds the landing page with the web demo of the simulators, and runs the script first. The site deploy ([`deploy-site.yml`](../../.github/workflows/deploy-site.yml)) adds the map builder at `/builder/` and the route planner at `/plan/`. [`serve.py`](../../docs/serve.py) shows the site on this machine. `docs/README.md` gives the authoring rules. +Trunk ([`Trunk.toml`](../../docs/Trunk.toml)) builds the landing page with the web demo of the simulators, and runs the script first. The site deploy ([`deploy-site.yml`](../../.github/workflows/deploy-site.yml)) adds the web app at `/plan/`. [`serve.py`](../../docs/serve.py) shows the site on this machine. `docs/README.md` gives the authoring rules. ## Rules that must hold From a8daf3a92f86c55f1fadd09a5b6061b608dc5989 Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:04:46 +0100 Subject: [PATCH 02/13] web: comments and a README that named the old page Co-Authored-By: Claude Opus --- builder/web/src/components/planner/README.md | 4 ++-- builder/web/src/lib/map/coverage-map.css | 3 +-- builder/web/src/pages/device/Software.svelte | 2 +- host/obc-bake/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/builder/web/src/components/planner/README.md b/builder/web/src/components/planner/README.md index 2fdfde9dea..4da29d8359 100644 --- a/builder/web/src/components/planner/README.md +++ b/builder/web/src/components/planner/README.md @@ -24,8 +24,8 @@ The [release contract](../../../../../specs/planner-release.md) defines the file The planner reads the `active` [catalogue](../../../../../specs/planner-release.md#catalogue) entry at page load. `VITE_PLANNER_CATALOG` names another catalogue, such as the one that `obc data serve` -prints. The map builder then reads its device catalogue too. `VITE_PLANNER_CONFIG` -replaces the entry with one entry. `VITE_CATALOG_URL` gives the map builder another +prints. The map pages then read its device catalogue too. `VITE_PLANNER_CONFIG` +replaces the entry with one entry. `VITE_CATALOG_URL` gives the map pages another device catalogue. Basemap zooms are 0–14; terrain zooms are 0–12. Browser contours use terrain diff --git a/builder/web/src/lib/map/coverage-map.css b/builder/web/src/lib/map/coverage-map.css index d183e3714e..a6ecf0e0c7 100644 --- a/builder/web/src/lib/map/coverage-map.css +++ b/builder/web/src/lib/map/coverage-map.css @@ -1,5 +1,4 @@ -/* The rules of the coverage map on Leaflet. `lib/map/coverageMap.ts` loads them, so the map builder and a page of the - shell show the same map. */ +/* The rules of the coverage map on Leaflet. `lib/map/coverageMap.ts` loads them. */ .basemap-warning { padding: 6px 10px; background: var(--panel); diff --git a/builder/web/src/pages/device/Software.svelte b/builder/web/src/pages/device/Software.svelte index dede704017..8b8653250f 100644 --- a/builder/web/src/pages/device/Software.svelte +++ b/builder/web/src/pages/device/Software.svelte @@ -19,7 +19,7 @@ $effect(() => { working = !!step; }); let said = $state(null); - /** The two steps of the map builder: the package goes to the card, then the device is asked to install it. Only the + /** The two steps of the update: the package goes to the card, then the device is asked to install it. Only the * answer of the device says that it installs. */ async function update() { const target = release; diff --git a/host/obc-bake/src/lib.rs b/host/obc-bake/src/lib.rs index 3238e4eac4..bf014ef945 100644 --- a/host/obc-bake/src/lib.rs +++ b/host/obc-bake/src/lib.rs @@ -1,5 +1,5 @@ //! `obc-bake` builds the published cell catalog once, centrally, and uploads it. -//! The map builder only selects, downloads, and assembles these cells; +//! The web app only selects, downloads, and assembles these cells; //! raw OSM processing stays here as maintainer tooling. //! //! A bake takes the Geofabrik regions of `data/regions/` ([`regions`]), the From 74631fd8d736cde1e633ac4df609fd2451c545a7 Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:04:46 +0100 Subject: [PATCH 03/13] docs: the guides and the specs name the web app, not the map builder The map is chosen on the area page of the web app and sent from its Device page. The guides on firmware updates, formats, packer and routing and terrain, the overview and the firmware update diagram say so. The reader names in obcc-catalog, planner-release, obc-data, flat-store-protocol and obcm-map are the web app. Co-Authored-By: Claude Opus --- .../diagrams/software-firmware-updates-02.svg | 4 ++-- docs/content/index.md | 2 +- docs/content/software/firmware-updates.md | 6 +++--- docs/content/software/formats.md | 6 +++--- docs/content/software/packer-routing.md | 14 ++++++-------- docs/content/software/terrain.md | 4 ++-- specs/flat-store-protocol.md | 2 +- specs/obc-data.md | 6 +++--- specs/obcc-catalog.md | 6 +++--- specs/obcm-map.md | 4 ++-- specs/planner-release.md | 8 ++++---- 11 files changed, 30 insertions(+), 32 deletions(-) diff --git a/docs/assets/diagrams/software-firmware-updates-02.svg b/docs/assets/diagrams/software-firmware-updates-02.svg index eadc8a999b..40d859ca36 100644 --- a/docs/assets/diagrams/software-firmware-updates-02.svg +++ b/docs/assets/diagrams/software-firmware-updates-02.svg @@ -1,4 +1,4 @@ - + Release and delivery @@ -16,7 +16,7 @@ - Companion (BLE) or builder (USB) + Companion (BLE) or web app (USB) Download a release, or select a local package Local package diff --git a/docs/content/index.md b/docs/content/index.md index 88e6af26e3..f54aa4122b 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -12,7 +12,7 @@ offline maps, route navigation, and ride recording. ## Start here - [Try the device](../#demo): explore a ride in the browser demo. -- [Prepare a map](../plan/#/device): choose coverage and download a map. +- [Prepare a map](../plan/#/device): choose the area of the map and send it to the device. - [Work on the software](src:README.md): find setup instructions and the source code. ## How the system fits together diff --git a/docs/content/software/firmware-updates.md b/docs/content/software/firmware-updates.md index caacd71a62..0deedb5593 100644 --- a/docs/content/software/firmware-updates.md +++ b/docs/content/software/firmware-updates.md @@ -74,14 +74,14 @@ channels, stable and prerelease, and the path of a published package never chang
-A release candidate triggers a build, signature, and inspection. Verified packages are published to GitHub and the update service. The companion or builder can upload a published or local package with PUT. The rider then confirms the install on the device. +A release candidate triggers a build, signature, and inspection. Verified packages are published to GitHub and the update service. The companion or the web app can upload a package with PUT. The rider then confirms the install on the device.
Release clients stage an update package. The install itself starts on the device.
-The companion app uploads a package over Bluetooth, the map builder uploads one over USB, and -either client can upload a local file. The card is not user-accessible, so a computer cannot copy a +The companion app uploads a package over Bluetooth, and it can also upload a local file. The web +app uploads a published package over USB from its Device page. The card is not user-accessible, so a computer cannot copy a package onto it directly. Both clients check the package header, the CRCs, and the size before they upload, and check the diff --git a/docs/content/software/formats.md b/docs/content/software/formats.md index 182e7a1db9..6a1de98888 100644 --- a/docs/content/software/formats.md +++ b/docs/content/software/formats.md @@ -19,7 +19,7 @@ says what each format is for and why it has that shape. | OBCR | Route geometry, statistics, and waypoints | Device | | Ride object | Recorded samples and summary | Device and companion | | OBCT | Terrain height raster | Device and map tools | -| OBCC | Map-builder catalog | Website | +| OBCC | Device map catalog | Web app | | OBCA | Cell and assembly rules | Map tools | Values are little-endian and coordinates are signed microdegrees. A reader uses checked arithmetic @@ -212,9 +212,9 @@ its small tables in memory: the map header, styles, and level table; the route i header and a few tiles. Indexes and geometry stream as the frame needs them. That is what lets a map larger than the device's RAM be drawn at all. -## The catalog — the map builder's source of truth +## The catalog — the web app's source of truth -OBCC is the map-builder catalog, and the device never reads it. Its root publishes the map schema, +OBCC is the catalog of the device maps, and the device never reads it. Its root publishes the map schema, the skins, the region selections, the cell index for each band, the terrain metadata, and the license information. It pins every object by length and digest: a map is assembled from files fetched over a network, so the catalog, not the transport, decides what the right bytes are. diff --git a/docs/content/software/packer-routing.md b/docs/content/software/packer-routing.md index 2b92ef01b4..f880b6ce45 100644 --- a/docs/content/software/packer-routing.md +++ b/docs/content/software/packer-routing.md @@ -208,17 +208,15 @@ A node becomes a leaf when its features fit the chunk size and the ring limit; o and its features are clipped into the children, so a feature that crosses a boundary appears in both. The device walks the same flat quadtree, so the packer's decision is the renderer's index. -### The builder +### The map assembly -The product builder assembles published cells; it does not run the packer. A selection can mix -named regions and boxes, and the builder unions them before it prices or downloads anything, so +The web app assembles published cells; it does not run the packer. A selection can mix +named regions and boxes, and the web app unions them before it prices or downloads anything, so overlapping parts do not pay twice. It verifies every object against the catalog, and the assembler verifies the finished map with the production readers. -One Svelte application serves the website and the maintainer server; the host modules differ in -transport and storage, never in the selection or assembly algorithm. The website -is static and the cells live in object storage, so publishing a new region does not deploy the -website. +The web app assembles the map in the browser. The website is static and the cells live in object storage, so publishing a new region +does not deploy the website. ## Following a route @@ -321,7 +319,7 @@ region's texts and photos are under. Each place keeps its own notices. - Landmark bake stage: [`landmarks.rs`](src:host/obc-bake/src/landmarks.rs) - Navigation graph: [`nav.rs`](src:host/obc-network/src/nav.rs) - Quadtree: [`quadtree.rs`](src:host/obc-draw/src/quadtree.rs) -- Builder: [`builder/`](src:builder) +- Web app: [`builder/web`](src:builder/web) - Web assembler: [`obc-builder-bridge`](src:builder/wasm) - Device router: [`nav.rs`](src:firmware/obc-route/src/nav.rs) - Route matcher: [`matcher.rs`](src:firmware/obc-route/src/matcher.rs) diff --git a/docs/content/software/terrain.md b/docs/content/software/terrain.md index faf43bd3c6..ff7fa016aa 100644 --- a/docs/content/software/terrain.md +++ b/docs/content/software/terrain.md @@ -182,8 +182,8 @@ the registry. A map with terrain-derived contours needs the attribution too. A map with [crest lifts](#crest-lifts) also carries the attribution of each finer model it used. The catalog lists those models with their required credit and license, copied from the reference -archive that holds the wording. A consumer that shows one shows all of them. The map builder shows -them on the map summary card. +archive that holds the wording. A consumer that shows one shows all of them. The web app shows +them in the credits of the map area page. Map data carries the OpenStreetMap credit of the same registry. diff --git a/specs/flat-store-protocol.md b/specs/flat-store-protocol.md index ee4c7770fe..8d37dba0d8 100644 --- a/specs/flat-store-protocol.md +++ b/specs/flat-store-protocol.md @@ -751,7 +751,7 @@ reads them. The entry exists to keep them out of the allocator, and post-install removes it with one commit. There is no card-sideload path. The card is not user-accessible and the only delivery routes are -BLE, USB and the builder. +BLE and USB. ## 5. Transport bindings diff --git a/specs/obc-data.md b/specs/obc-data.md index 6709e61288..ff8b6370b2 100644 --- a/specs/obc-data.md +++ b/specs/obc-data.md @@ -107,10 +107,10 @@ field for programs, such as the catalog `license`. Rust code reads the file that the build embeds (`obc_data::sources::attribution`). Python reads it through `tools/data_registry.py`, and shell through `tools/data_registry.py attribution ID`. The web bundle notice reads it at build time through -`builder/web/vite/third-party-licenses.ts`. The web planner, the map builder and the iOS planner show the +`builder/web/vite/third-party-licenses.ts`. The web app and the iOS planner show the planner release `attribution`. Text that no step can generate keeps a copy, and a test -compares the copy with this file: the device About page, and the footers of the site, the -docs and the map builder. +compares the copy with this file: the device About page, and the footers of the site and the +docs. ### Settings of a target diff --git a/specs/obcc-catalog.md b/specs/obcc-catalog.md index 587ca59555..f2f947867e 100644 --- a/specs/obcc-catalog.md +++ b/specs/obcc-catalog.md @@ -7,7 +7,7 @@ feed them to the same assembler. The device does not read OBCC. - Version: `"schema_version": 3`. Consumers MUST reject any other value before interpreting the rest of the document. - Writers: `host/obc-pack` (`obc-pack catalog`), run by `obc-bake`. -- Readers: the map builder (`builder/web/src/lib/catalog/`). +- Readers: the web app (`builder/web/src/lib/catalog/`). - Code authority: [`host/obc-pack/src/catalog.rs`](../host/obc-pack/src/catalog.rs). Its checked-in JSON Schema and worked examples: [`catalog.schema.json`](../host/obc-pack/schema/catalog.schema.json), @@ -396,7 +396,7 @@ identities, and the selected skin are passed to the OBCA assembler. Island pruni assembly, seams unify only exact serialized coordinates, and the resulting mounted map follows [obca-assembly.md](obca-assembly.md) §4. -Every host of the map builder MUST use the same selection arithmetic, verified cell bytes, skin, +Every client that assembles a map MUST use the same selection arithmetic, verified cell bytes, skin, and assembler. Host-specific file saving MUST NOT alter the assembled bytes. A consumer MAY stream assembler output directly to a connected device instead of first saving it, @@ -534,7 +534,7 @@ generation has no dependency on the OBCM store. ### 13.5 Attribution `attribution` carries the source dataset's required credit verbatim. Consumers that display terrain -— the map builder, the docs, anything that ships derived rasters — MUST take the string from the +— the web app, the docs, anything that ships derived rasters — MUST take the string from the catalog rather than hard-coding it. A producer MUST NOT publish a terrain block with an empty `attribution`. The producer takes it from the `data/sources.toml` entry whose id is `dataset_id`. diff --git a/specs/obcm-map.md b/specs/obcm-map.md index 3e203eef0b..faad98c5be 100644 --- a/specs/obcm-map.md +++ b/specs/obcm-map.md @@ -1072,8 +1072,8 @@ included, is admissible. #### Canonical way-kind table (normative) `Way Kind = (surface_class << 5) | highway_class`. The packer's single source of truth is -`obc-places/src/routing.rs` (`highway_class` / `surface_class` / `classify`); profile configs and -the web builder key their multipliers by these class names. +`obc-places/src/routing.rs` (`highway_class` / `surface_class` / `classify`); profile configs key +their multipliers by these class names. **Highway class** (5 bits, `0..=31`; `0..=13` assigned, `14..=31` reserved): diff --git a/specs/planner-release.md b/specs/planner-release.md index 1622d05b9f..a00242e571 100644 --- a/specs/planner-release.md +++ b/specs/planner-release.md @@ -8,7 +8,7 @@ of the planner](obc-data.md#planner). - Version: manifest `format` `2`; catalogue `format: 1`; `public/grid.json` `format: 4`. A client refuses a catalogue `format` that it does not know. - Writers: `obc data update` (`host/obc-data`). -- Readers: the web planner (`builder/web/src/lib/planner/release.ts`), the map builder, the tile +- Readers: the web app (`builder/web/src/lib/planner/release.ts`), the tile service ([`planner/tiles`](../planner/tiles/README.md)), `obc data serve`, the companion app. - Related: [offline bundle](planner-offline.md), [route package](route-package.md), [route catalog](route-catalog.md), [snow tiles](planner-snow-tiles.md), [climate @@ -232,9 +232,9 @@ has it. `routes` is the route catalog cell URL template on the tile API origin, `/releases/ID/routes/tiles/{cell}.json`, where `{cell}` is a cell ID `9-X-Y`. The publisher uploads and verifies all release files before the manifest. The catalogue cache -lifetime is 30 seconds. Immutable objects have a one-year cache lifetime. The web planner and the -map builder read the catalogue at page load. The planner uses `active`, unchanged, as its -configuration. The map builder uses its device catalogue. A client refuses a catalogue `format` that +lifetime is 30 seconds. Immutable objects have a one-year cache lifetime. The web app reads the +catalogue at page load. Its planner uses `active`, unchanged, as its configuration. Its map pages +use the device catalogue of `active`. A client refuses a catalogue `format` that it does not know. When a release object returns 404 or no answer, a client reads the catalogue again, once, and retries with the new `active` entry. From de5ce73fbba435b85cd40786e38787aeca0023e5 Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:04:46 +0100 Subject: [PATCH 04/13] docs: the legal pages describe the web app at /plan/ The map builder at /builder/ is gone. Its connections are those of the route planner now, and the rows of local storage that no code writes any more go: the map and scheme configuration, the kept map cells and their consent, the answered firmware notices and the bike profile of the old page. Co-Authored-By: Claude Opus --- docs/content/datenschutz.md | 50 +++++++++++++++---------------------- docs/content/privacy.md | 45 +++++++++++++-------------------- 2 files changed, 37 insertions(+), 58 deletions(-) diff --git a/docs/content/datenschutz.md b/docs/content/datenschutz.md index 58643ed882..23ce5e1e77 100644 --- a/docs/content/datenschutz.md +++ b/docs/content/datenschutz.md @@ -27,10 +27,10 @@ Cookies ein und verwenden keine Analysedienste, Zählpixel, Werbung, extern gela Schriftarten, Social-Media-Plugins oder Fehler-Tracker. Beim Abruf entstehen lediglich die für die Auslieferung und Sicherheit erforderlichen Verbindungsdaten beim Hoster. -Der Kartenbaukasten unter `/builder/` lädt zusätzlich Kartenkacheln und Kartendaten, -prüft nach dem Anschluss eines Geräts auf neue Firmware und verarbeitet ausgewählte -Dateien sowie Gerätedaten lokal im Browser. Der Routenplaner unter `/plan/` sendet -Suchanfragen und Routen an einen eigenen Server. Die Verifikationskonsole ist nur für +Der Routenplaner unter `/plan/` lädt zusätzlich Kartenkacheln und Kartendaten, prüft +nach dem Anschluss eines Geräts auf neue Firmware und verarbeitet ausgewählte Dateien +sowie Gerätedaten lokal im Browser. Er sendet Suchanfragen und Routen an einen eigenen +Server. Die Verifikationskonsole ist nur für freigegebene Maintainer bestimmt. Einzelheiten stehen in den Abschnitten 6 bis 10. ## 3. Hosting über GitHub Pages @@ -71,7 +71,7 @@ Anbieter. Die Website wird ausschließlich über TLS-verschlüsselte Verbindungen (HTTPS) ausgeliefert. -## 6. Verbindungen des Kartenbaukastens +## 6. Verbindungen für die Gerätekarte Bei den folgenden Abrufen wird die IP-Adresse an den jeweiligen Server übertragen. Das ist technisch erforderlich, damit der Server die angeforderten Daten an den @@ -79,8 +79,8 @@ Browser zurücksenden kann. Rechtsgrundlage ist jeweils Art. 6 Abs. 1 lit. f DSG ### 6.1 Kartenkacheln -Die Regionsauswahl im Kartenbaukasten lädt Kacheln von `tiles.openbikecomputer.com`. Das -ist der Cloudflare Worker, der auch den Routenplaner bedient (Abschnitt 7.1). Cloudflare erhält die IP-Adresse +Die Seite für den Kartenbereich im Routenplaner lädt Kacheln von `tiles.openbikecomputer.com`. +Das ist der Cloudflare Worker aus Abschnitt 7.1. Cloudflare erhält die IP-Adresse und die angefragte Kachel. Daraus kann Cloudflare den Kartenausschnitt erkennen. Die Streckendaten selbst werden nicht übertragen. Schriften und Symbole der Karte kommen von `maps.openbikecomputer.com` (Abschnitt 6.3). Builds ohne feste Planereinstellungen lesen @@ -90,7 +90,7 @@ und die Ansicht von Strecken oder aufgezeichneten Fahrten. ### 6.2 Prüfung auf neue Firmware -Nach dem Anschluss eines OpenBikeComputer ruft der Baukasten einmalig die aktuelle +Nach dem Anschluss eines OpenBikeComputer ruft der Routenplaner einmalig die aktuelle Firmware-Beschreibung unter `updates.openbikecomputer.com` ab. Die Auslieferung erfolgt über **Cloudflare R2** der Cloudflare, Inc., 101 Townsend St., San Francisco, CA 94107, USA. @@ -104,8 +104,9 @@ sicherheitsrelevante Aktualisierungen hinzuweisen. Der Katalog, Vorschauen, Zellverzeichnisse und Kartenzellen werden unter `maps.openbikecomputer.com` ebenfalls über Cloudflare R2 ausgeliefert. Der Katalog wird -beim Öffnen des Kartenbaukastens geladen; weitere Dateien werden entsprechend der -Auswahl angefordert. Aus den angefragten Zellen kann Cloudflare den ungefähren +beim Öffnen der Seite für den Kartenbereich geladen und wenn die Seite „Device“ eine +wartende Karte zeigt oder sendet; weitere Dateien werden entsprechend der Auswahl +angefordert. Aus den angefragten Zellen kann Cloudflare den ungefähren gewählten Kartenbereich erkennen. Der verwendete R2-Bucket besitzt **keine EU-Jurisdiktionsbeschränkung**. Cloudflare @@ -125,8 +126,8 @@ Einbindung in die Website zu großen Kartendaten bereitzustellen. ## 7. Routenplaner -Der Routenplaner unter `/plan/` ist eine eigene Anwendung. Er verbindet sich mit drei -Servern. Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO; das berechtigte Interesse liegt +Der Routenplaner unter `/plan/` ist eine eigene Anwendung. Für die Routenplanung +verbindet er sich mit drei Servern. Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO; das berechtigte Interesse liegt in der Bereitstellung des angefragten Planers. Beim Standort gilt Abschnitt 7.2. ### 7.1 Kacheln, Suche und Routenberechnung @@ -192,42 +193,31 @@ nachvollziehbaren, gesicherten Freigabeprozess. Der Server steht bei der Contabo ## 9. Speicherung auf dem Endgerät -Der Hell-Dunkel-Schalter der Website und des Kartenbaukastens sowie die Zeile „Look“ auf +Der Hell-Dunkel-Schalter der Website sowie die Zeile „Look“ auf der Seite „Settings“ des Routenplaners speichern die gewählte Darstellung lokal unter `obc-theme` in `localStorage`. Ohne Auswahl gilt die Browsereinstellung. Der Wert wird nicht an einen Server gesendet. Er bleibt gespeichert, bis die Websitedaten im Browser gelöscht werden. -Die Webanwendung verwendet lokalen Gerätespeicher. Der -Kartenbaukasten nutzt `localStorage` und das *Origin Private File System* (OPFS) des -Browsers. Der Routenplaner nutzt `localStorage` und die Browser-Datenbank *IndexedDB*. Diese Daten bleiben auf dem verwendeten Gerät und werden nicht an den +Die Webanwendung verwendet lokalen Gerätespeicher. Der Routenplaner nutzt +`localStorage`, die Browser-Datenbank *IndexedDB* und das *Origin Private File System* +(OPFS) des Browsers. Diese Daten bleiben auf dem verwendeten Gerät und werden nicht an den Verantwortlichen übertragen. | Daten | Zweck und Dauer | | --- | --- | -| Aktuelle Karten- und Schemakonfiguration | Automatischer lokaler Arbeitsstand, damit eine Bearbeitung einen Reload übersteht; bis zum Ersetzen oder Löschen der Website-Daten. | -| Selbst gespeicherte Skins mit Namen und Farben | Nur nach Betätigung von „Save custom skin“; bis zur Löschung über die vorhandene Löschfunktion oder durch Löschen der Website-Daten. | -| Kartenzellen und Arbeitsdateien im OPFS | Für große Karten während Download und Zusammensetzen erforderlich. Standardmäßig werden die Zellen nach dem Lauf gelöscht. Sortierdateien werden am Laufende entfernt; ältere Ausgabedateien spätestens beim Beginn des nächsten Laufs oder über die Löschfunktion. | -| Optional weiterverwendete Kartenzellen | Nur wenn „Keep downloaded map cells for future builds“ aktiviert wird; bis zum Deaktivieren, bis „Delete stored map data“ gewählt wird, bis Browserdaten gelöscht werden oder eine neue Kataloggeneration die alte ersetzt. | -| Entscheidung über die Wiederverwendung von Kartenzellen | Damit die ausdrücklich gewählte Einstellung bei einem späteren Besuch erhalten bleibt; bis zur nächsten Änderung oder zum Löschen der Website-Daten. | -| Beantwortete Firmware-Hinweise mit Geräte-Seriennummer und angebotener Version | Erst nachdem ein Hinweis geschlossen oder aufgerufen wurde, damit dieselbe Frage für dasselbe Gerät nicht ständig erscheint; höchstens die 32 jüngsten Antworten, bis die Website-Daten gelöscht werden. | +| Selbst gespeicherte Skins mit Namen und Farben | Nur nach Betätigung von „Save“ im Farbeditor der Seite für den Kartenbereich; bis zur Löschung über die vorhandene Löschfunktion oder durch Löschen der Website-Daten. | +| Kartenzellen und Arbeitsdateien im OPFS | Für große Karten während Download und Zusammensetzen erforderlich. Die Zellen und die zusammengesetzte Karte werden nach dem Lauf gelöscht. Sortierdateien werden am Laufende entfernt; Dateien eines abgebrochenen Laufs spätestens beim Beginn des nächsten Laufs. | | Bibliothek des Routenplaners (IndexedDB `obc-library`): Routen und ihre Versionen, Fahrten mit ihren Dateien und Fotos sowie Titelbilder | Der Routenplaner speichert eine Route automatisch während der Planung und eine Fahrt beim Hinzufügen, damit die Bibliothek in diesem Browser bleibt. Zu einem Foto, das einer Fahrt hinzugefügt wird, speichert er eine verkleinerte Kopie mit der Aufnahmezeit oder, wenn die Zeit keinen Ort auf der Fahrt ergibt, mit dem GPS-Ort des Fotos; die Originaldatei speichert er nicht. Eine selbst gespeicherte Sicherungsdatei enthält diese Kopien. Gespeichert bis zum Löschen, bis „Delete all“ auf der Seite „Settings“ gewählt wird oder bis die Website-Daten gelöscht werden. Sie verlässt den Browser nur in einer selbst gespeicherten Sicherungsdatei und als Suchanfrage nach Abschnitt 7.1. | | Entscheidung, die Karte des Routenplaners auf einen gewählten Punkt zu zentrieren (`obc-planner-auto-center`) | Damit die gewählte Einstellung bei einem späteren Besuch erhalten bleibt; bis zur nächsten Änderung oder zum Löschen der Website-Daten. | | Einstellungen des Routenplaners (`obc-settings`): Einheiten, maximale Herzfrequenz und Schwellenleistung | Damit die gewählten Einstellungen bei einem späteren Besuch erhalten bleiben; bis zur nächsten Änderung oder zum Löschen der Website-Daten. Die Werte gehen in eine selbst gespeicherte Sicherungsdatei ein. | -| Gewähltes Fahrradprofil für Routen (`obcm.routeBikeType`) | Damit die gewählte Einstellung bei einem späteren Besuch erhalten bleibt; bis zur nächsten Änderung oder zum Löschen der Website-Daten. | Das kurzfristige Speichern und Auslesen der Arbeitsdaten, das Speichern der Bibliothek des Routenplaners und gewählter Einstellungen sowie das Speichern eines vom -Nutzer ausdrücklich gesicherten Skins oder beantworteten Firmware-Hinweises sind für die +Nutzer ausdrücklich gesicherten Skins sind für die jeweils angeforderte Funktion erforderlich (§ 25 Abs. 2 Nr. 2 TDDDG). Für diese Vorgänge ist keine Einwilligung erforderlich. -Die Wiederverwendung heruntergeladener Kartenzellen bei späteren Builds ist dagegen -optional und standardmäßig ausgeschaltet. Das Aktivieren der deutlich bezeichneten -Option ist die Einwilligung nach § 25 Abs. 1 TDDDG. Sie kann jederzeit durch -Deaktivieren der Option oder über „Delete stored map data“ mit Wirkung für die Zukunft -widerrufen werden. Die Rechtmäßigkeit der bisherigen Speicherung bleibt unberührt. - ## 10. Lokale Verarbeitung von Dateien und Gerätedaten Die Gerätedemo, die Umwandlung ausgewählter Routendateien und das Zusammensetzen der diff --git a/docs/content/privacy.md b/docs/content/privacy.md index 0960332385..011de7f4ac 100644 --- a/docs/content/privacy.md +++ b/docs/content/privacy.md @@ -28,10 +28,9 @@ use no analytics services, tracking pixels, advertising, externally loaded fonts media plugins or error trackers. When you open a page, the host only receives the connection data it needs to deliver the page and to keep it secure. -The map builder at `/builder/` also loads map tiles and map data. It checks for new firmware +The route planner at `/plan/` also loads map tiles and map data. It checks for new firmware after you connect a device. It processes the files you select and the device data locally in -the browser. The route planner at `/plan/` sends search requests and routes to a server of -the controller. The verification console is for approved maintainers only. Sections 6 to 10 +the browser. It sends search requests and routes to a server of the controller. The verification console is for approved maintainers only. Sections 6 to 10 give the details. ## 3. Hosting on GitHub Pages @@ -68,7 +67,7 @@ GDPR in the data processing agreements of the two providers apply. The website is delivered only over TLS-encrypted connections (HTTPS). -## 6. Connections of the map builder +## 6. Connections for the device map For the following requests, your IP address is transmitted to the server concerned. This is technically necessary so that the server can send the requested data back to the browser. @@ -76,8 +75,8 @@ The legal basis in each case is Art. 6(1)(f) GDPR. ### 6.1 Map tiles -The region picker of the map builder loads tiles from `tiles.openbikecomputer.com`. This is -the Cloudflare Worker that also serves the route planner (section 7.1). Cloudflare receives +The area page of the route planner loads tiles from `tiles.openbikecomputer.com`. This is +the Cloudflare Worker of section 7.1. Cloudflare receives your IP address and the requested tile. From this, Cloudflare can see the map area. The route data itself is not transmitted. The map's fonts and symbols come from `maps.openbikecomputer.com` (section 6.3). Builds without fixed planner settings also read the active release from the catalog on that host. @@ -86,7 +85,7 @@ select a region and view routes or recorded rides. ### 6.2 Check for new firmware -After you connect an OpenBikeComputer, the builder requests the current firmware description +After you connect an OpenBikeComputer, the route planner requests the current firmware description once from `updates.openbikecomputer.com`. It is delivered through **Cloudflare R2** of Cloudflare, Inc., 101 Townsend St., San Francisco, CA 94107, USA. @@ -98,8 +97,9 @@ that matter for security. ### 6.3 Map data through Cloudflare R2 The catalog, previews, cell directories and map cells are also delivered through Cloudflare -R2 from `maps.openbikecomputer.com`. The catalog loads when you open the map builder. The -builder requests further files according to your selection. From the requested cells, +R2 from `maps.openbikecomputer.com`. The catalog loads when you open the area page, and when the +Device page shows or sends a map that waits. The route planner requests further files according +to your selection. From the requested cells, Cloudflare can see the approximate map area that you selected. The R2 bucket in use has **no EU jurisdiction restriction**. Cloudflare is therefore not @@ -119,7 +119,8 @@ large to include in the website. ## 7. Route planner -The route planner at `/plan/` is a separate application. It connects to three servers. The +The route planner at `/plan/` is a separate application. For route planning it connects to +three servers. The legal basis is Art. 6(1)(f) GDPR. The legitimate interest is to provide the planner that you requested. Section 7.2 applies to your location. @@ -183,40 +184,28 @@ deleted after seven days, as described there. ## 9. Storage on your device -The light/dark switch of the website and of the map builder, and the row "Look" on the +The light/dark switch of the website, and the row "Look" on the Settings page of the route planner, store your chosen appearance locally in `localStorage` under `obc-theme`. Without a choice, your browser setting applies. The value is not sent to a server. It stays stored until you delete the website data in your browser. -The web application uses local device storage. The map builder -uses `localStorage` and the browser's *Origin Private File System* (OPFS). The route planner -uses `localStorage` and the browser database *IndexedDB*. This data stays on +The web application uses local device storage. The route planner uses `localStorage`, the +browser database *IndexedDB* and the browser's *Origin Private File System* (OPFS). This data stays on the device that you use. It is not transmitted to the controller. | Data | Purpose and duration | | --- | --- | -| Current map and scheme configuration | Automatic local working state, so that an edit survives a reload. Kept until it is replaced or you delete the website data. | -| Skins you save yourself, with names and colors | Only after you press "Save custom skin". Kept until you delete them with the delete function or delete the website data. | -| Map cells and working files in OPFS | Needed for large maps during download and assembly. By default the cells are deleted after the run. Sort files are removed at the end of the run. Older output files are removed at the start of the next run at the latest, or with the delete function. | -| Map cells kept for reuse (optional) | Only if you enable "Keep downloaded map cells for future builds". Kept until you disable the option, until you choose "Delete stored map data", until you delete browser data, or until a new catalog generation replaces the old one. | -| Your choice to reuse map cells | So that the setting you chose is kept at a later visit. Kept until the next change or until you delete the website data. | -| Answered firmware notices, with device serial number and offered version | Only after you close or open a notice, so that the same question does not appear again for the same device. At most the 32 most recent answers. Kept until you delete the website data. | +| Skins you save yourself, with names and colors | Only after you press "Save" in the colour editor of the area page. Kept until you delete them with the delete function or delete the website data. | +| Map cells and working files in OPFS | Needed for large maps during download and assembly. The cells and the assembled map are deleted after the run. Sort files are removed at the end of the run. Files that a stopped run leaves are removed at the start of the next run at the latest. | | Library of the route planner (IndexedDB `obc-library`): routes and their versions, rides with their files and their photos, and cover images | The planner saves a route automatically while you plan it, and a ride when you add it, so that your library stays in this browser. For a photo that you add to a ride, it saves a smaller copy with the time of the photo, or with the GPS place of the photo when the time gives no place on the ride; it does not save the original file. A backup file that you save holds these copies. Kept until you delete it, use "Delete all" on the Settings page, or delete the website data. It leaves the browser only in a backup file that you save, and as a search request under section 7.1. | | Your choice to center the map of the route planner on a chosen point (`obc-planner-auto-center`) | So that the setting you chose is kept at a later visit. Kept until the next change or until you delete the website data. | | Settings of the route planner (`obc-settings`): units, maximum heart rate and threshold power | So that the settings you chose are kept at a later visit. Kept until the next change or until you delete the website data. The values go into a backup file that you save. | -| Chosen bike profile for routes (`obcm.routeBikeType`) | So that the setting you chose is kept at a later visit. Kept until the next change or until you delete the website data. | Saving and reading the working data for a short time, saving the library of the route -planner and chosen settings, and saving a skin or an answered firmware notice that you -explicitly saved are necessary for the function that you requested (§ 25(2) no. 2 TDDDG). +planner and chosen settings, and saving a skin that you explicitly saved are necessary for the function that you requested (§ 25(2) no. 2 TDDDG). These processes need no consent. -Reusing downloaded map cells in later builds is optional and off by default. When you enable -the clearly labeled option, this is your consent under § 25(1) TDDDG. You can withdraw it at -any time with effect for the future by disabling the option or with "Delete stored map data". -The lawfulness of the earlier storage remains unaffected. - ## 10. Local processing of files and device data The device demo, the conversion of selected route files and the assembly of the map run From d0d6ba4d8a4804bf8125bbf2688a799154fcfbc6 Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:18:27 +0100 Subject: [PATCH 05/13] design: give the TrailView build plugins to trailview, and owners to the files that had none vite/stamp-bundle.ts and vite/bundle-version.ts with their declarations go to trailview; only the licence plugin stays in web-foundations. obc-data owns test-support/data and data.css, web-foundations tokens.css, and web-planner the npm files of the browser tests. The rule of web-foundations names the dependency check. Co-Authored-By: Claude Opus --- docs/design/README.md | 5 +++-- docs/design/map.json | 10 +++++----- docs/design/obc-data.md | 2 ++ docs/design/trailview.md | 4 ++++ docs/design/web-foundations.md | 11 +++++++---- docs/design/web-planner.md | 1 + 6 files changed, 22 insertions(+), 11 deletions(-) diff --git a/docs/design/README.md b/docs/design/README.md index 84455aa5df..5c420c19f8 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -83,6 +83,7 @@ flowchart LR s_source_preparation --> s_data_engine s_source_preparation ==> s_map_reading s_trailview ==> s_route_planning + s_trailview -.-> s_web_foundations ``` ## Systems @@ -96,7 +97,7 @@ flowchart LR | [map-assembly](map-assembly.md) | Assembles a device map from published cells. | draft | card-storage, device-link, device-map-baking, foundations, host-runtime, map-reading, map-style, navigation, rendering-display, route-planning, web-foundations | map-style, obc-data, route-planning, web-planner | | [map-style](map-style.md) | Defines how map features look on the device. | draft | map-assembly, web-foundations | map-assembly, web-planner | | [route-planning](route-planning.md) | Lets a rider plan a route on a map, in the browser or on the phone. | draft | library, map-assembly, trailview, web-foundations | map-assembly, obc-data, trailview, trailview-page, web-planner | -| [web-foundations](web-foundations.md) | Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download and the build plugins. | draft | | device-link, map-assembly, map-style, obc-data, route-planning, search, trailview, web-planner | +| [web-foundations](web-foundations.md) | Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download, the colour tokens and the licence notices of the build. | draft | | device-link, map-assembly, map-style, obc-data, route-planning, search, web-planner | ### Data and services @@ -110,7 +111,7 @@ flowchart LR | [routing](routing.md) | Finds a bike route between points. | draft | data-engine, source-preparation | obc-data | | [search](search.md) | Finds places by name. | draft | content, data-engine, web-foundations | obc-data | | [source-preparation](source-preparation.md) | Turns raw external datasets into the prepared sources that products build from. | draft | data-engine, foundations, map-reading | device-map-baking, obc-data, routing | -| [trailview](trailview.md) | Renders a region as an explorable 3-D landscape in the browser. | draft | data-engine, route-planning, web-foundations | obc-data, route-planning, trailview-page, web-planner | +| [trailview](trailview.md) | Renders a region as an explorable 3-D landscape in the browser. | draft | data-engine, route-planning | obc-data, route-planning, trailview-page, web-planner | ### Device diff --git a/docs/design/map.json b/docs/design/map.json index 7eec7c8be9..f4e3f6a95a 100644 --- a/docs/design/map.json +++ b/docs/design/map.json @@ -841,7 +841,7 @@ "repository-tooling" ], "violations": 3, - "lines": 106147, + "lines": 106279, "problems": [ { "rule": "cycle", @@ -888,12 +888,12 @@ "name": "web-foundations", "kind": "system", "area": "Apps", - "purpose": "Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download and the build plugins.", + "purpose": "Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download, the colour tokens and the licence notices of the build.", "status": "draft", "depends_on": [], "test_depends_on": [], "violations": 0, - "lines": 1289, + "lines": 1157, "problems": [] }, { @@ -916,7 +916,7 @@ "repository-tooling" ], "violations": 0, - "lines": 16979, + "lines": 17113, "problems": [] }, { @@ -1698,7 +1698,7 @@ { "from": "trailview", "to": "web-foundations", - "test": false, + "test": true, "undeclared": false }, { diff --git a/docs/design/obc-data.md b/docs/design/obc-data.md index 28cb89b090..b41f9736d8 100644 --- a/docs/design/obc-data.md +++ b/docs/design/obc-data.md @@ -7,6 +7,8 @@ owns: - builder/web/src/data.ts - builder/web/src/lib/data/** - builder/web/src/components/data/** + - builder/web/src/styles/data.css + - builder/web/test-support/data/** - builder/web/tests/browser/data/** - builder/web/tests/browser/playwright.data.config.js depends_on: diff --git a/docs/design/trailview.md b/docs/design/trailview.md index 767c68bea9..097a4c421d 100644 --- a/docs/design/trailview.md +++ b/docs/design/trailview.md @@ -11,6 +11,10 @@ owns: - builder/web/src/plan-timing.ts - builder/web/plan-timing.html - builder/web/scripts/** + - builder/web/vite/stamp-bundle.ts + - builder/web/vite/stamp-version.d.ts + - builder/web/vite/bundle-version.ts + - builder/web/vite/versions.d.ts - builder/web/test-support/trailview/** - builder/web/tests/browser/trailview/** - builder/web/tests/browser/playwright.trailview.config.js diff --git a/docs/design/web-foundations.md b/docs/design/web-foundations.md index b3203a0932..5c74336111 100644 --- a/docs/design/web-foundations.md +++ b/docs/design/web-foundations.md @@ -2,7 +2,7 @@ system: web-foundations kind: system area: Apps -purpose: "Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download and the build plugins." +purpose: "Holds the small parts that the web systems share: the loader of the WebAssembly core, the GPX and FIT files, the theme, the page addresses, the verified download, the colour tokens and the licence notices of the build." owns: - builder/web/src/lib/core/** - builder/web/src/lib/format.ts @@ -13,7 +13,9 @@ owns: - builder/web/src/lib/routes.ts - builder/web/src/lib/routes.test.ts - builder/web/src/lib/router.svelte.ts - - builder/web/vite/** + - builder/web/vite/third-party-licenses.ts + - builder/web/vite/licenses/** + - builder/web/src/styles/tokens.css - builder/web/test-support/bytes.ts - builder/web/test-support/core.ts - builder/web/test-support/fake-caches.ts @@ -32,10 +34,11 @@ This system holds the code that more than one web system uses and that has no pr - [`download.ts`](../../builder/web/src/lib/download.ts) downloads one catalogue object and refuses bytes whose size or SHA-256 differs from the published values. - [`theme.svelte.ts`](../../builder/web/src/lib/theme.svelte.ts) keeps the look (system, light or dark) of each page. - [`routes.ts`](../../builder/web/src/lib/routes.ts) gives the hash address of each page of the web app, and [`router.svelte.ts`](../../builder/web/src/lib/router.svelte.ts) follows the address. Route planning uses them too, so they are not in the shell. -- `vite/` holds the build plugins: the licence notices, the version of a bundle and the bundle of the terrain stamps. Each one imports no local file, because plain Node also loads them. +- [`tokens.css`](../../builder/web/src/styles/tokens.css) adds the colours of the app and the operator page to the theme of the site. +- [`vite/third-party-licenses.ts`](../../builder/web/vite/third-party-licenses.ts) writes the licence notices of a build. It imports no local file, because the native build of search loads it in plain Node. ## Rules that must hold | Rule | Check | | --- | --- | -| This system uses no other system, so each web system can use it with no cycle. | `cycles` in [`cairn.py`](../../tools/cairn/cairn.py), with `depends_on: []` | +| This system uses no other system, so each web system can use it with no cycle. | The dependency rule of `cairn check`: `analyse` in [`cairn.py`](../../tools/cairn/cairn.py) reports an import that `depends_on: []` does not list | diff --git a/docs/design/web-planner.md b/docs/design/web-planner.md index 4589421079..2f178e9291 100644 --- a/docs/design/web-planner.md +++ b/docs/design/web-planner.md @@ -20,6 +20,7 @@ owns: - builder/web/tests/browser/planner/** - builder/web/tests/browser/playwright.planner.config.js - builder/web/tests/browser/serve.py + - builder/web/tests/browser/package*.json depends_on: - device-link - firmware-update From 58baf6838279f39fb5d545ad7d32e7428ed51b13 Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:18:27 +0100 Subject: [PATCH 06/13] web: words that named the map builder Co-Authored-By: Claude Opus --- builder/web/src/components/data/Machine.svelte | 2 +- builder/web/tests/device-smoke/README.md | 2 +- docs/assets/docs.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/web/src/components/data/Machine.svelte b/builder/web/src/components/data/Machine.svelte index ac79a72b4b..78b40e94cb 100644 --- a/builder/web/src/components/data/Machine.svelte +++ b/builder/web/src/components/data/Machine.svelte @@ -121,7 +121,7 @@ {/if}
  • Open Bake, choose a small area, and bake it. A small box takes a few minutes.
  • -
  • Start Serve and open the web planner or the map builder from there.
  • +
  • Start Serve and open the web app from there.
  • Read the Overview: sources on the left, layers in the middle, targets on the right.
  • diff --git a/builder/web/tests/device-smoke/README.md b/builder/web/tests/device-smoke/README.md index f197272530..841160808f 100644 --- a/builder/web/tests/device-smoke/README.md +++ b/builder/web/tests/device-smoke/README.md @@ -40,7 +40,7 @@ noise. | Phase | Evidence | | --- | --- | | `connect` | The device answers `LIST`; its identity strings come over EP0. The catalog is recorded. | -| `upload` | `PUT` through the shipping `sendMapBytes`, the same call the builder's Send makes. | +| `upload` | `PUT` through the shipping `sendMapBytes`, the same call that "Send the map" of the web app makes. | | `verify` | `STATUS`, the catalog entry and a whole `GET` all agree with the bytes sent; every other object on the card is still at its revision, length and CRC. | | `reboot` | `board.py run --preverify` resets the board and streams RTT. The firmware names the object and revision it opened, the box it parsed out of the map header, and the embedded terrain region it mounted. | | `reverify` | The device comes back on the same store with the same object at the same revision, length and CRC. | diff --git a/docs/assets/docs.css b/docs/assets/docs.css index e3c52d3d6b..4f8ae125ab 100644 --- a/docs/assets/docs.css +++ b/docs/assets/docs.css @@ -1,4 +1,4 @@ -/* Reading pages share the builder's palette and the landing page's typography. */ +/* Reading pages share the palette of the web app and the typography of the landing page. */ @import "./theme.css"; @import "./site-header.css"; From 52015bd04b93f32107f4fe19dbd9279e8e6f8a3c Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:18:27 +0100 Subject: [PATCH 07/13] docs: the catalog specs and the firmware diagram name the web app only Co-Authored-By: Claude Opus --- .../diagrams/software-firmware-updates-02.svg | 2 +- specs/obca-assembly.md | 2 +- specs/obcc-catalog.md | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/assets/diagrams/software-firmware-updates-02.svg b/docs/assets/diagrams/software-firmware-updates-02.svg index 40d859ca36..315d8f576f 100644 --- a/docs/assets/diagrams/software-firmware-updates-02.svg +++ b/docs/assets/diagrams/software-firmware-updates-02.svg @@ -17,7 +17,7 @@ Companion (BLE) or web app (USB) - Download a release, or select a local package + A release, or a local file (companion) Local package A file on the computer diff --git a/specs/obca-assembly.md b/specs/obca-assembly.md index 44b569e936..f7ad0b617d 100644 --- a/specs/obca-assembly.md +++ b/specs/obca-assembly.md @@ -596,7 +596,7 @@ one order. The two skins may change the other seven bytes of each record and the and nothing else (§4.7). The hosted catalog has **exactly one** schema: the 14-LOD bikepacking ladder. Hosted "presets" are -therefore skins. Custom schemas are local bakes on the maintainer dev server. +therefore skins. ### 6.3 Lockstep and the bake guard diff --git a/specs/obcc-catalog.md b/specs/obcc-catalog.md index f2f947867e..a9eea6e230 100644 --- a/specs/obcc-catalog.md +++ b/specs/obcc-catalog.md @@ -1,8 +1,7 @@ # OBCC catalog manifest -The JSON contract between the central cell bakery and map-building consumers. The website and the -maintainer dev server read the same catalog, select the same [OBCA](obca-assembly.md) cells, and -feed them to the same assembler. The device does not read OBCC. +The JSON contract between the central cell bakery and map-building consumers. The web app reads the +catalog, selects the [OBCA](obca-assembly.md) cells, and feeds them to the assembler. The device does not read OBCC. - Version: `"schema_version": 3`. Consumers MUST reject any other value before interpreting the rest of the document. @@ -372,8 +371,8 @@ A publish MUST make all referenced content available before replacing the root: A failure before step 4 leaves the previously published root authoritative. An explicit catalog refresh replaces the complete accepted root and its satellite client. It MUST NOT combine objects or -schema bytes from two roots in one assembly. The builder stops and drains old preparation before it -accepts a replacement. It MUST NOT replace the builder during an active device transfer. Refresh +schema bytes from two roots in one assembly. The web app stops and drains old preparation before it +accepts a replacement. It MUST NOT accept a replacement during an active device transfer. Refresh keeps the coverage parts. It resolves them against the new catalog and shows unavailable coverage without dropping parts. Chosen skins remain selected when they are compatible with the new schema. @@ -397,7 +396,7 @@ assembly, seams unify only exact serialized coordinates, and the resulting mount [obca-assembly.md](obca-assembly.md) §4. Every client that assembles a map MUST use the same selection arithmetic, verified cell bytes, skin, -and assembler. Host-specific file saving MUST NOT alter the assembled bytes. +and assembler. A consumer MAY stream assembler output directly to a connected device instead of first saving it, and MUST verify the emitted file's announced length before transfer. A streaming consumer has no @@ -685,7 +684,7 @@ The index is sparse. An absent cell or collection means no content only after th and verifies the index. A fetch, length or digest failure MUST fail the build. A consumer MUST NOT fall back to embedded content after a detached index failure. -The builder selects entries from the selected core-band cell ids. It adds their bytes to the +The web app selects entries from the selected core-band cell ids. It adds their bytes to the selection price and verifies each artifact before assembly. The assembler reads both collections with the same readers as embedded content and verifies the finished map. Each article and photo keeps its source credit in the assembled map. From ab22cf89b350c4eeed73ef38dd129bf3e4b76dcd Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:18:27 +0100 Subject: [PATCH 08/13] docs: the legal pages name the device, TrailView and Wikimedia stores and connections The remembered device, the TrailView data in Cache Storage, the photos of places from Wikimedia, the download of the update package and the device sync of the library get their passages. The version date is 16 November 2026. Co-Authored-By: Claude Opus --- docs/content/datenschutz.md | 31 ++++++++++++++++++++++++------- docs/content/privacy.md | 32 +++++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/docs/content/datenschutz.md b/docs/content/datenschutz.md index 23ce5e1e77..37c417d6cf 100644 --- a/docs/content/datenschutz.md +++ b/docs/content/datenschutz.md @@ -93,7 +93,8 @@ und die Ansicht von Strecken oder aufgezeichneten Fahrten. Nach dem Anschluss eines OpenBikeComputer ruft der Routenplaner einmalig die aktuelle Firmware-Beschreibung unter `updates.openbikecomputer.com` ab. Die Auslieferung erfolgt über **Cloudflare R2** der Cloudflare, Inc., 101 Townsend St., San Francisco, -CA 94107, USA. +CA 94107, USA. Nach Betätigung von „Update“ auf der Seite „Device“ lädt der Routenplaner +auch das Aktualisierungspaket von diesem Host. Die Anfrage enthält weder Seriennummer noch installierte Firmware-Version. Der Vergleich findet lokal im Browser statt. Ohne angeschlossenes Gerät wird die Datei @@ -127,7 +128,7 @@ Einbindung in die Website zu großen Kartendaten bereitzustellen. ## 7. Routenplaner Der Routenplaner unter `/plan/` ist eine eigene Anwendung. Für die Routenplanung -verbindet er sich mit drei Servern. Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO; das berechtigte Interesse liegt +verbindet er sich mit fünf Servern. Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO; das berechtigte Interesse liegt in der Bereitstellung des angefragten Planers. Beim Standort gilt Abschnitt 7.2. ### 7.1 Kacheln, Suche und Routenberechnung @@ -167,6 +168,20 @@ Suche an den Server nach Abschnitt 7.1 gesendet, um Ergebnisse in der Nähe zu o Er wird nicht gespeichert. Die Einwilligung kann jederzeit durch die Browsereinstellung für Standortfreigaben mit Wirkung für die Zukunft widerrufen werden. +### 7.3 Fotos von Orten + +Beim Öffnen des Infofensters eines Ortes mit einem Foto von Wikimedia Commons fragt der +Routenplaner bei `commons.wikimedia.org` nach, ob das Foto unverändert ist. Die Anfrage +enthält die Seitennummer des Fotos auf Wikimedia Commons. Ist das Foto unverändert, lädt der +Browser es von `upload.wikimedia.org`, mit dem Dateinamen des Fotos in der Adresse. Beide +Server betreibt die Wikimedia Foundation, Inc., 1 Montgomery Street, Suite 1600, +San Francisco, CA 94104, USA. Sie erhalten die IP-Adresse, die angefragte Adresse und die +üblichen Anfragedaten des Browsers, etwa die Browserkennung (User-Agent). Ohne ein Infofenster +mit Foto wird nichts abgerufen. Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO; das berechtigte +Interesse liegt darin, das aktuelle Foto eines Ortes mit der richtigen Quellenangabe zu +zeigen. Ergänzend gilt die +[Datenschutzrichtlinie der Wikimedia Foundation](https://foundation.wikimedia.org/wiki/Policy:Privacy_policy). + ## 8. Verifikationskonsole Die Verifikationskonsole unter `releases.openbikecomputer.com` dient den Maintainern des @@ -200,20 +215,22 @@ Wert wird nicht an einen Server gesendet. Er bleibt gespeichert, bis die Website im Browser gelöscht werden. Die Webanwendung verwendet lokalen Gerätespeicher. Der Routenplaner nutzt -`localStorage`, die Browser-Datenbank *IndexedDB* und das *Origin Private File System* -(OPFS) des Browsers. Diese Daten bleiben auf dem verwendeten Gerät und werden nicht an den +`localStorage`, die Browser-Datenbank *IndexedDB*, das *Origin Private File System* +(OPFS) und den *Cache Storage* des Browsers. Diese Daten bleiben auf dem verwendeten Gerät und werden nicht an den Verantwortlichen übertragen. | Daten | Zweck und Dauer | | --- | --- | | Selbst gespeicherte Skins mit Namen und Farben | Nur nach Betätigung von „Save“ im Farbeditor der Seite für den Kartenbereich; bis zur Löschung über die vorhandene Löschfunktion oder durch Löschen der Website-Daten. | +| Daten der 3D-Ansicht TrailView (Cache Storage `trailview-*`): Geländezellen, Hausdaten, Baummodelle und Stempel, die TrailView aus den Kartenkacheln berechnet | Gespeichert, wenn TrailView eine Region darstellt, auch für das Titelbild einer Route oder Fahrt, damit TrailView sie bei einem späteren Besuch nicht erneut berechnet. Jede Art hat eine Größengrenze, zusammen 296 MiB; darüber werden die am längsten nicht genutzten Einträge gelöscht. Die Daten einer anderen Kartenversion oder einer anderen Version von TrailView werden gelöscht, wenn TrailView seinen Speicher öffnet; bis dahin oder bis zum Löschen der Website-Daten. | | Kartenzellen und Arbeitsdateien im OPFS | Für große Karten während Download und Zusammensetzen erforderlich. Die Zellen und die zusammengesetzte Karte werden nach dem Lauf gelöscht. Sortierdateien werden am Laufende entfernt; Dateien eines abgebrochenen Laufs spätestens beim Beginn des nächsten Laufs. | -| Bibliothek des Routenplaners (IndexedDB `obc-library`): Routen und ihre Versionen, Fahrten mit ihren Dateien und Fotos sowie Titelbilder | Der Routenplaner speichert eine Route automatisch während der Planung und eine Fahrt beim Hinzufügen, damit die Bibliothek in diesem Browser bleibt. Zu einem Foto, das einer Fahrt hinzugefügt wird, speichert er eine verkleinerte Kopie mit der Aufnahmezeit oder, wenn die Zeit keinen Ort auf der Fahrt ergibt, mit dem GPS-Ort des Fotos; die Originaldatei speichert er nicht. Eine selbst gespeicherte Sicherungsdatei enthält diese Kopien. Gespeichert bis zum Löschen, bis „Delete all“ auf der Seite „Settings“ gewählt wird oder bis die Website-Daten gelöscht werden. Sie verlässt den Browser nur in einer selbst gespeicherten Sicherungsdatei und als Suchanfrage nach Abschnitt 7.1. | +| Bibliothek des Routenplaners (IndexedDB `obc-library`): Routen und ihre Versionen, Fahrten mit ihren Dateien und Fotos sowie Titelbilder | Der Routenplaner speichert eine Route automatisch während der Planung und eine Fahrt beim Hinzufügen, damit die Bibliothek in diesem Browser bleibt. Zu einem Foto, das einer Fahrt hinzugefügt wird, speichert er eine verkleinerte Kopie mit der Aufnahmezeit oder, wenn die Zeit keinen Ort auf der Fahrt ergibt, mit dem GPS-Ort des Fotos; die Originaldatei speichert er nicht. Eine selbst gespeicherte Sicherungsdatei enthält diese Kopien. Gespeichert bis zum Löschen, bis „Delete all“ auf der Seite „Settings“ gewählt wird oder bis die Website-Daten gelöscht werden. Zu jeder Route und Fahrt, die von einem Gerät kam oder an eines ging, speichert die Bibliothek auch die Kennung der Speicherkarte des Geräts. Sie verlässt den Browser nur in einer selbst gespeicherten Sicherungsdatei, als Suchanfrage nach Abschnitt 7.1 und bei der Synchronisation: Der Routenplaner sendet Routen über USB an das verbundene Gerät (Abschnitt 10), und bevor er eine Route sendet, sendet er ihre Wegpunkte an die Routenberechnung nach Abschnitt 7.1. | | Entscheidung, die Karte des Routenplaners auf einen gewählten Punkt zu zentrieren (`obc-planner-auto-center`) | Damit die gewählte Einstellung bei einem späteren Besuch erhalten bleibt; bis zur nächsten Änderung oder zum Löschen der Website-Daten. | +| Gemerktes Gerät (`obc-device`): Seriennummer des Geräts, Kennung seiner Speicherkarte, Zeitpunkt der letzten Synchronisation, Name und Bereich der Karte auf der Speicherkarte, Anzahl der Routen und belegte Bytes auf der Speicherkarte, Anzahl der am selben Tag übernommenen Fahrten sowie die Kennungen der Fahrten auf dem Gerät, die die Bibliothek nicht übernimmt | Erst nach Betätigung von „Connect“ auf der Seite „Device“, damit die Synchronisation bei einem späteren Besuch mit diesem Gerät arbeitet. Jede Synchronisation aktualisiert die Angaben. Gespeichert, bis ein anderes Gerät oder eine andere Speicherkarte verbunden wird, die sie ersetzt, oder bis die Website-Daten gelöscht werden. „Delete all“ auf der Seite „Settings“ löscht sie nicht. | | Einstellungen des Routenplaners (`obc-settings`): Einheiten, maximale Herzfrequenz und Schwellenleistung | Damit die gewählten Einstellungen bei einem späteren Besuch erhalten bleiben; bis zur nächsten Änderung oder zum Löschen der Website-Daten. Die Werte gehen in eine selbst gespeicherte Sicherungsdatei ein. | Das kurzfristige Speichern und Auslesen der Arbeitsdaten, das Speichern der Bibliothek -des Routenplaners und gewählter Einstellungen sowie das Speichern eines vom +des Routenplaners, des gemerkten Geräts, der TrailView-Daten und gewählter Einstellungen sowie das Speichern eines vom Nutzer ausdrücklich gesicherten Skins sind für die jeweils angeforderte Funktion erforderlich (§ 25 Abs. 2 Nr. 2 TDDDG). Für diese Vorgänge ist keine Einwilligung erforderlich. @@ -286,4 +303,4 @@ beschriebenen Verarbeitungen ändern. --- -*Stand: 1. Oktober 2026* +*Stand: 16. November 2026* diff --git a/docs/content/privacy.md b/docs/content/privacy.md index 011de7f4ac..7c7de7e3db 100644 --- a/docs/content/privacy.md +++ b/docs/content/privacy.md @@ -87,7 +87,8 @@ select a region and view routes or recorded rides. After you connect an OpenBikeComputer, the route planner requests the current firmware description once from `updates.openbikecomputer.com`. It is delivered through **Cloudflare R2** of -Cloudflare, Inc., 101 Townsend St., San Francisco, CA 94107, USA. +Cloudflare, Inc., 101 Townsend St., San Francisco, CA 94107, USA. When you press "Update" on +the Device page, the route planner also downloads the update package from this host. The request contains neither the serial number nor the installed firmware version. The comparison takes place locally in the browser. Without a connected device, the file is not @@ -120,8 +121,7 @@ large to include in the website. ## 7. Route planner The route planner at `/plan/` is a separate application. For route planning it connects to -three servers. The -legal basis is Art. 6(1)(f) GDPR. The legitimate interest is to provide the planner that you +five servers. The legal basis is Art. 6(1)(f) GDPR. The legitimate interest is to provide the planner that you requested. Section 7.2 applies to your location. ### 7.1 Tiles, search and route calculation @@ -159,6 +159,20 @@ location is then sent with every search to the server in section 7.1, to sort re you. It is not stored. You can withdraw your consent at any time with effect for the future in the location permission settings of your browser. +### 7.3 Photos of places + +When you open the card of a place that has a photo from Wikimedia Commons, the route planner +asks `commons.wikimedia.org` whether the photo is unchanged. The request contains the page +number of the photo on Wikimedia Commons. If the photo is unchanged, the browser loads it from +`upload.wikimedia.org`, with the file name of the photo in the address. Both servers are +operated by the Wikimedia Foundation, Inc., 1 Montgomery Street, Suite 1600, San Francisco, +CA 94104, USA. They receive your IP address, the requested address and the usual request data +of the browser, such as the browser identifier (user agent). Without a card with a photo, +nothing is requested. The legal basis is Art. 6(1)(f) GDPR. The legitimate interest is to show +the current photo of a place with its correct credit. The +[privacy policy of the Wikimedia Foundation](https://foundation.wikimedia.org/wiki/Policy:Privacy_policy) +applies in addition. + ## 8. Verification console The verification console at `releases.openbikecomputer.com` serves the maintainers of the @@ -191,19 +205,23 @@ The value is not sent to a server. It stays stored until you delete the website browser. The web application uses local device storage. The route planner uses `localStorage`, the -browser database *IndexedDB* and the browser's *Origin Private File System* (OPFS). This data stays on +browser database *IndexedDB*, the browser's *Origin Private File System* (OPFS) and the +browser's *Cache Storage*. This data stays on the device that you use. It is not transmitted to the controller. | Data | Purpose and duration | | --- | --- | | Skins you save yourself, with names and colors | Only after you press "Save" in the colour editor of the area page. Kept until you delete them with the delete function or delete the website data. | +| Data of the 3-D view TrailView (Cache Storage `trailview-*`): terrain cells, house records, tree models and stamps that TrailView calculates from the map tiles | Saved when TrailView draws a region, also for the cover image of a route or a ride, so that TrailView does not calculate them again at a later visit. Each kind has a size limit, together 296 MiB; past it, the entries that were used least recently are deleted. The data of another map release or of another version of TrailView is deleted when TrailView opens its store. Kept until then or until you delete the website data. | | Map cells and working files in OPFS | Needed for large maps during download and assembly. The cells and the assembled map are deleted after the run. Sort files are removed at the end of the run. Files that a stopped run leaves are removed at the start of the next run at the latest. | -| Library of the route planner (IndexedDB `obc-library`): routes and their versions, rides with their files and their photos, and cover images | The planner saves a route automatically while you plan it, and a ride when you add it, so that your library stays in this browser. For a photo that you add to a ride, it saves a smaller copy with the time of the photo, or with the GPS place of the photo when the time gives no place on the ride; it does not save the original file. A backup file that you save holds these copies. Kept until you delete it, use "Delete all" on the Settings page, or delete the website data. It leaves the browser only in a backup file that you save, and as a search request under section 7.1. | +| Library of the route planner (IndexedDB `obc-library`): routes and their versions, rides with their files and their photos, and cover images | The planner saves a route automatically while you plan it, and a ride when you add it, so that your library stays in this browser. For a photo that you add to a ride, it saves a smaller copy with the time of the photo, or with the GPS place of the photo when the time gives no place on the ride; it does not save the original file. A backup file that you save holds these copies. Kept until you delete it, use "Delete all" on the Settings page, or delete the website data. For each route and ride that came from a device or went to it, the library also keeps the id of the memory card of the device. It leaves the browser only in a backup file that you save, as a search request under section 7.1, and with the device sync: the route planner sends routes over USB to the device that you connected (section 10), and before it sends a route, it sends its waypoints to the route calculation under section 7.1. | | Your choice to center the map of the route planner on a chosen point (`obc-planner-auto-center`) | So that the setting you chose is kept at a later visit. Kept until the next change or until you delete the website data. | +| Remembered device (`obc-device`): the serial number of the device, the id of its memory card, the time of the last sync, the name and the area of the map on the card, the number of routes and the bytes on the card, the number of rides that came from it on the current day, and the ids of the rides on it that the library does not take | Only after you press "Connect" on the Device page, so that the sync works with this device at a later visit. Each sync updates it. Kept until you connect another device or another memory card, which replaces it, or until you delete the website data. "Delete all" on the Settings page does not delete it. | | Settings of the route planner (`obc-settings`): units, maximum heart rate and threshold power | So that the settings you chose are kept at a later visit. Kept until the next change or until you delete the website data. The values go into a backup file that you save. | Saving and reading the working data for a short time, saving the library of the route -planner and chosen settings, and saving a skin that you explicitly saved are necessary for the function that you requested (§ 25(2) no. 2 TDDDG). +planner, the remembered device, the TrailView data and chosen settings, and saving a skin that +you explicitly saved are necessary for the function that you requested (§ 25(2) no. 2 TDDDG). These processes need no consent. ## 10. Local processing of files and device data @@ -268,4 +286,4 @@ change. --- -*Version: 1 October 2026* +*Version: 16 November 2026* From 59a0ecb0baaaac5589a25f092ae6bf83c76db0bf Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:22:26 +0100 Subject: [PATCH 09/13] design: trailview owns fake-caches.ts and no longer depends on web-foundations Co-Authored-By: Claude Opus --- docs/design/README.md | 1 - docs/design/map.json | 13 +++---------- docs/design/trailview.md | 2 +- docs/design/web-foundations.md | 1 - 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/docs/design/README.md b/docs/design/README.md index 5c420c19f8..d6662f3def 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -83,7 +83,6 @@ flowchart LR s_source_preparation --> s_data_engine s_source_preparation ==> s_map_reading s_trailview ==> s_route_planning - s_trailview -.-> s_web_foundations ``` ## Systems diff --git a/docs/design/map.json b/docs/design/map.json index f4e3f6a95a..939f343d0f 100644 --- a/docs/design/map.json +++ b/docs/design/map.json @@ -834,14 +834,13 @@ "purpose": "Renders a region as an explorable 3-D landscape in the browser.", "status": "draft", "depends_on": [ - "data-engine", - "web-foundations" + "data-engine" ], "test_depends_on": [ "repository-tooling" ], "violations": 3, - "lines": 106279, + "lines": 106305, "problems": [ { "rule": "cycle", @@ -893,7 +892,7 @@ "depends_on": [], "test_depends_on": [], "violations": 0, - "lines": 1157, + "lines": 1131, "problems": [] }, { @@ -1695,12 +1694,6 @@ "test": false, "undeclared": true }, - { - "from": "trailview", - "to": "web-foundations", - "test": true, - "undeclared": false - }, { "from": "trailview-page", "to": "route-planning", diff --git a/docs/design/trailview.md b/docs/design/trailview.md index 097a4c421d..778383ea2f 100644 --- a/docs/design/trailview.md +++ b/docs/design/trailview.md @@ -16,13 +16,13 @@ owns: - builder/web/vite/bundle-version.ts - builder/web/vite/versions.d.ts - builder/web/test-support/trailview/** + - builder/web/test-support/fake-caches.ts - builder/web/tests/browser/trailview/** - builder/web/tests/browser/playwright.trailview.config.js - tools/trailview/** - tools/planner_trailview_canopy.py depends_on: - data-engine - - web-foundations test_depends_on: - repository-tooling status: draft diff --git a/docs/design/web-foundations.md b/docs/design/web-foundations.md index 5c74336111..85a326bb9d 100644 --- a/docs/design/web-foundations.md +++ b/docs/design/web-foundations.md @@ -18,7 +18,6 @@ owns: - builder/web/src/styles/tokens.css - builder/web/test-support/bytes.ts - builder/web/test-support/core.ts - - builder/web/test-support/fake-caches.ts depends_on: [] test_depends_on: [] status: draft From 53a89e89d3e7abc42908b49def5246922b0c218b Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:22:26 +0100 Subject: [PATCH 10/13] docs: the legal pages name all fields of the remembered device, the device values of the settings, the five hosts and the address of Wikimedia Co-Authored-By: Claude Opus --- docs/content/datenschutz.md | 11 +++++++---- docs/content/privacy.md | 10 ++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/content/datenschutz.md b/docs/content/datenschutz.md index 37c417d6cf..5c11e29bd8 100644 --- a/docs/content/datenschutz.md +++ b/docs/content/datenschutz.md @@ -128,7 +128,10 @@ Einbindung in die Website zu großen Kartendaten bereitzustellen. ## 7. Routenplaner Der Routenplaner unter `/plan/` ist eine eigene Anwendung. Für die Routenplanung -verbindet er sich mit fünf Servern. Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO; das berechtigte Interesse liegt +verbindet er sich mit fünf Servern: `tiles.openbikecomputer.com` und +`releases.openbikecomputer.com` (Abschnitt 7.1), `maps.openbikecomputer.com` für Schriften, +Symbole und den Gerätekatalog (Abschnitt 6.3) sowie `commons.wikimedia.org` und +`upload.wikimedia.org` (Abschnitt 7.3). Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO; das berechtigte Interesse liegt in der Bereitstellung des angefragten Planers. Beim Standort gilt Abschnitt 7.2. ### 7.1 Kacheln, Suche und Routenberechnung @@ -174,7 +177,7 @@ Beim Öffnen des Infofensters eines Ortes mit einem Foto von Wikimedia Commons f Routenplaner bei `commons.wikimedia.org` nach, ob das Foto unverändert ist. Die Anfrage enthält die Seitennummer des Fotos auf Wikimedia Commons. Ist das Foto unverändert, lädt der Browser es von `upload.wikimedia.org`, mit dem Dateinamen des Fotos in der Adresse. Beide -Server betreibt die Wikimedia Foundation, Inc., 1 Montgomery Street, Suite 1600, +Server betreibt die Wikimedia Foundation, Inc., 1 Sansome Street, Suite 1895, San Francisco, CA 94104, USA. Sie erhalten die IP-Adresse, die angefragte Adresse und die üblichen Anfragedaten des Browsers, etwa die Browserkennung (User-Agent). Ohne ein Infofenster mit Foto wird nichts abgerufen. Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO; das berechtigte @@ -226,8 +229,8 @@ Verantwortlichen übertragen. | Kartenzellen und Arbeitsdateien im OPFS | Für große Karten während Download und Zusammensetzen erforderlich. Die Zellen und die zusammengesetzte Karte werden nach dem Lauf gelöscht. Sortierdateien werden am Laufende entfernt; Dateien eines abgebrochenen Laufs spätestens beim Beginn des nächsten Laufs. | | Bibliothek des Routenplaners (IndexedDB `obc-library`): Routen und ihre Versionen, Fahrten mit ihren Dateien und Fotos sowie Titelbilder | Der Routenplaner speichert eine Route automatisch während der Planung und eine Fahrt beim Hinzufügen, damit die Bibliothek in diesem Browser bleibt. Zu einem Foto, das einer Fahrt hinzugefügt wird, speichert er eine verkleinerte Kopie mit der Aufnahmezeit oder, wenn die Zeit keinen Ort auf der Fahrt ergibt, mit dem GPS-Ort des Fotos; die Originaldatei speichert er nicht. Eine selbst gespeicherte Sicherungsdatei enthält diese Kopien. Gespeichert bis zum Löschen, bis „Delete all“ auf der Seite „Settings“ gewählt wird oder bis die Website-Daten gelöscht werden. Zu jeder Route und Fahrt, die von einem Gerät kam oder an eines ging, speichert die Bibliothek auch die Kennung der Speicherkarte des Geräts. Sie verlässt den Browser nur in einer selbst gespeicherten Sicherungsdatei, als Suchanfrage nach Abschnitt 7.1 und bei der Synchronisation: Der Routenplaner sendet Routen über USB an das verbundene Gerät (Abschnitt 10), und bevor er eine Route sendet, sendet er ihre Wegpunkte an die Routenberechnung nach Abschnitt 7.1. | | Entscheidung, die Karte des Routenplaners auf einen gewählten Punkt zu zentrieren (`obc-planner-auto-center`) | Damit die gewählte Einstellung bei einem späteren Besuch erhalten bleibt; bis zur nächsten Änderung oder zum Löschen der Website-Daten. | -| Gemerktes Gerät (`obc-device`): Seriennummer des Geräts, Kennung seiner Speicherkarte, Zeitpunkt der letzten Synchronisation, Name und Bereich der Karte auf der Speicherkarte, Anzahl der Routen und belegte Bytes auf der Speicherkarte, Anzahl der am selben Tag übernommenen Fahrten sowie die Kennungen der Fahrten auf dem Gerät, die die Bibliothek nicht übernimmt | Erst nach Betätigung von „Connect“ auf der Seite „Device“, damit die Synchronisation bei einem späteren Besuch mit diesem Gerät arbeitet. Jede Synchronisation aktualisiert die Angaben. Gespeichert, bis ein anderes Gerät oder eine andere Speicherkarte verbunden wird, die sie ersetzt, oder bis die Website-Daten gelöscht werden. „Delete all“ auf der Seite „Settings“ löscht sie nicht. | -| Einstellungen des Routenplaners (`obc-settings`): Einheiten, maximale Herzfrequenz und Schwellenleistung | Damit die gewählten Einstellungen bei einem späteren Besuch erhalten bleiben; bis zur nächsten Änderung oder zum Löschen der Website-Daten. Die Werte gehen in eine selbst gespeicherte Sicherungsdatei ein. | +| Gemerktes Gerät (`obc-device`): Seriennummer des Geräts, Kennung seiner Speicherkarte, Zeitpunkt der letzten Synchronisation, Name, Objektkennung und Bereich der Karte auf der Speicherkarte, Kennungen und Versionen der Farben (Kartenstile) einer von diesem Browser gesendeten Karte, Anzahl der Routen und belegte Bytes auf der Speicherkarte, Anzahl der am selben Tag übernommenen Fahrten sowie die Kennungen der Fahrten auf dem Gerät, die die Bibliothek nicht übernimmt | Erst nach Betätigung von „Connect“ auf der Seite „Device“, damit die Synchronisation bei einem späteren Besuch mit diesem Gerät arbeitet. Jede Synchronisation aktualisiert die Angaben. Gespeichert, bis „Connect“ mit einem anderen Gerät betätigt wird oder eine Synchronisation eine andere Speicherkarte findet, die sie ersetzt, oder bis die Website-Daten gelöscht werden. „Delete all“ auf der Seite „Settings“ löscht sie nicht. | +| Einstellungen des Routenplaners (`obc-settings`): Einheiten, maximale Herzfrequenz und Schwellenleistung | Damit die gewählten Einstellungen bei einem späteren Besuch erhalten bleiben. Die Synchronisation schreibt auch die maximale Herzfrequenz und die Schwellenleistung, die eine Fahrt vom Gerät mitbringt, wenn kein Wert gesetzt ist oder der gesetzte Wert älter als die Fahrt ist; bis zur nächsten Änderung oder zum Löschen der Website-Daten. Die Werte gehen in eine selbst gespeicherte Sicherungsdatei ein. | Das kurzfristige Speichern und Auslesen der Arbeitsdaten, das Speichern der Bibliothek des Routenplaners, des gemerkten Geräts, der TrailView-Daten und gewählter Einstellungen sowie das Speichern eines vom diff --git a/docs/content/privacy.md b/docs/content/privacy.md index 7c7de7e3db..513783d6b5 100644 --- a/docs/content/privacy.md +++ b/docs/content/privacy.md @@ -121,7 +121,9 @@ large to include in the website. ## 7. Route planner The route planner at `/plan/` is a separate application. For route planning it connects to -five servers. The legal basis is Art. 6(1)(f) GDPR. The legitimate interest is to provide the planner that you +five servers: `tiles.openbikecomputer.com` and `releases.openbikecomputer.com` (section 7.1), +`maps.openbikecomputer.com` for fonts, symbols and the device catalog (section 6.3), and +`commons.wikimedia.org` and `upload.wikimedia.org` (section 7.3). The legal basis is Art. 6(1)(f) GDPR. The legitimate interest is to provide the planner that you requested. Section 7.2 applies to your location. ### 7.1 Tiles, search and route calculation @@ -165,7 +167,7 @@ When you open the card of a place that has a photo from Wikimedia Commons, the r asks `commons.wikimedia.org` whether the photo is unchanged. The request contains the page number of the photo on Wikimedia Commons. If the photo is unchanged, the browser loads it from `upload.wikimedia.org`, with the file name of the photo in the address. Both servers are -operated by the Wikimedia Foundation, Inc., 1 Montgomery Street, Suite 1600, San Francisco, +operated by the Wikimedia Foundation, Inc., 1 Sansome Street, Suite 1895, San Francisco, CA 94104, USA. They receive your IP address, the requested address and the usual request data of the browser, such as the browser identifier (user agent). Without a card with a photo, nothing is requested. The legal basis is Art. 6(1)(f) GDPR. The legitimate interest is to show @@ -216,8 +218,8 @@ the device that you use. It is not transmitted to the controller. | Map cells and working files in OPFS | Needed for large maps during download and assembly. The cells and the assembled map are deleted after the run. Sort files are removed at the end of the run. Files that a stopped run leaves are removed at the start of the next run at the latest. | | Library of the route planner (IndexedDB `obc-library`): routes and their versions, rides with their files and their photos, and cover images | The planner saves a route automatically while you plan it, and a ride when you add it, so that your library stays in this browser. For a photo that you add to a ride, it saves a smaller copy with the time of the photo, or with the GPS place of the photo when the time gives no place on the ride; it does not save the original file. A backup file that you save holds these copies. Kept until you delete it, use "Delete all" on the Settings page, or delete the website data. For each route and ride that came from a device or went to it, the library also keeps the id of the memory card of the device. It leaves the browser only in a backup file that you save, as a search request under section 7.1, and with the device sync: the route planner sends routes over USB to the device that you connected (section 10), and before it sends a route, it sends its waypoints to the route calculation under section 7.1. | | Your choice to center the map of the route planner on a chosen point (`obc-planner-auto-center`) | So that the setting you chose is kept at a later visit. Kept until the next change or until you delete the website data. | -| Remembered device (`obc-device`): the serial number of the device, the id of its memory card, the time of the last sync, the name and the area of the map on the card, the number of routes and the bytes on the card, the number of rides that came from it on the current day, and the ids of the rides on it that the library does not take | Only after you press "Connect" on the Device page, so that the sync works with this device at a later visit. Each sync updates it. Kept until you connect another device or another memory card, which replaces it, or until you delete the website data. "Delete all" on the Settings page does not delete it. | -| Settings of the route planner (`obc-settings`): units, maximum heart rate and threshold power | So that the settings you chose are kept at a later visit. Kept until the next change or until you delete the website data. The values go into a backup file that you save. | +| Remembered device (`obc-device`): the serial number of the device, the id of its memory card, the time of the last sync, the name, the object id and the area of the map on the card, the ids and the versions of the colours (map styles) of a map that this browser sent, the number of routes and the bytes on the card, the number of rides that came from it on the current day, and the ids of the rides on it that the library does not take | Only after you press "Connect" on the Device page, so that the sync works with this device at a later visit. Each sync updates it. Kept until you press "Connect" with another device, or a sync finds another memory card, which replaces it, or until you delete the website data. "Delete all" on the Settings page does not delete it. | +| Settings of the route planner (`obc-settings`): units, maximum heart rate and threshold power | So that the settings you chose are kept at a later visit. The device sync also writes the maximum heart rate and the threshold power that a ride from the device gives, when no value is set or the set value is older than the ride. Kept until the next change or until you delete the website data. The values go into a backup file that you save. | Saving and reading the working data for a short time, saving the library of the route planner, the remembered device, the TrailView data and chosen settings, and saving a skin that From dd3fc0cf3ea9150d763f756d8acedd5745c1c135 Mon Sep 17 00:00:00 2001 From: timohueser Date: Sun, 15 Nov 2026 23:26:00 +0100 Subject: [PATCH 11/13] web: move the icon into lib/ui, so the shared web parts are one system PlannerIcon.svelte is now lib/ui/Icon.svelte; 48 imports point to the new path, and nothing else changes. lib/ui goes from route-planning to web-foundations, which then still uses no other system. Co-Authored-By: Claude Opus --- builder/web/src/components/TopBar.svelte | 2 +- builder/web/src/components/data/Bake.svelte | 2 +- builder/web/src/components/data/BakeArea.svelte | 2 +- builder/web/src/components/data/DataApp.svelte | 2 +- .../src/components/planner/CompareScreen.svelte | 2 +- .../src/components/planner/DateCalendar.svelte | 2 +- .../src/components/planner/DateStepper.svelte | 2 +- builder/web/src/components/planner/DayRow.svelte | 2 +- .../src/components/planner/DrawerTitle.svelte | 2 +- .../web/src/components/planner/Itinerary.svelte | 2 +- .../src/components/planner/LayerInspect.svelte | 2 +- .../web/src/components/planner/LayerMenu.svelte | 2 +- .../web/src/components/planner/MapCallout.svelte | 2 +- .../components/planner/MapOverlayDetails.svelte | 2 +- .../web/src/components/planner/NightNode.svelte | 2 +- .../src/components/planner/OpeningHours.svelte | 2 +- .../web/src/components/planner/PlaceRow.svelte | 2 +- .../src/components/planner/PlanLibrary.svelte | 2 +- .../web/src/components/planner/PlannerApp.svelte | 2 +- .../src/components/planner/PlannerProfile.svelte | 2 +- .../src/components/planner/PlannerQuery.svelte | 2 +- .../src/components/planner/PlannerSelect.svelte | 2 +- .../components/planner/QueryAreaPicker.svelte | 2 +- .../web/src/components/planner/QueryChip.svelte | 2 +- .../web/src/components/planner/QueryKinds.svelte | 2 +- .../src/components/planner/QueryResults.svelte | 2 +- .../web/src/components/planner/RouteList.svelte | 2 +- .../src/components/planner/SignedRoutes.svelte | 2 +- .../web/src/components/planner/StopCard.svelte | 2 +- .../web/src/components/planner/StopPicker.svelte | 2 +- .../planner/TrailViewConditions.svelte | 2 +- .../components/planner/TrailViewControl.svelte | 2 +- .../components/planner/TrailViewProfile.svelte | 2 +- .../components/planner/TrailViewWindow.svelte | 2 +- .../web/src/components/planner/TripBar.svelte | 2 +- .../web/src/components/planner/TripRow.svelte | 2 +- .../src/components/planner/VersionsMenu.svelte | 2 +- builder/web/src/components/route/Detail.svelte | 2 +- builder/web/src/components/route/Facts.svelte | 2 +- builder/web/src/components/route/Photos.svelte | 2 +- builder/web/src/components/route/RouteMap.svelte | 2 +- builder/web/src/components/route/Rows.svelte | 2 +- builder/web/src/lib/covers/Cover.svelte | 2 +- builder/web/src/lib/planner/layers/data-layer.ts | 2 +- .../PlannerIcon.svelte => lib/ui/Icon.svelte} | 0 builder/web/src/lib/ui/Segmented.svelte | 2 +- builder/web/src/lib/ui/Window.svelte | 2 +- builder/web/src/pages/Area.svelte | 2 +- builder/web/src/pages/Device.svelte | 2 +- builder/web/src/pages/home/Search.svelte | 2 +- docs/design/README.md | 6 +++--- docs/design/map.json | 16 +++++----------- docs/design/route-planning.md | 1 - docs/design/web-foundations.md | 4 +++- docs/design/web-planner.md | 2 +- 55 files changed, 61 insertions(+), 66 deletions(-) rename builder/web/src/{components/planner/PlannerIcon.svelte => lib/ui/Icon.svelte} (100%) diff --git a/builder/web/src/components/TopBar.svelte b/builder/web/src/components/TopBar.svelte index 25d07be5ee..cfc414d003 100644 --- a/builder/web/src/components/TopBar.svelte +++ b/builder/web/src/components/TopBar.svelte @@ -1,5 +1,5 @@