Skip to content

Plan trips of one to two months: the planner screen and the bike computer limits #3652

Closed
7 of 7 issues completed

Description

@timohueser

Status: done

TL;DR

Goal: A rider plans a trip of 15 to 64 riding days in the web planner on a big screen, sees the whole trip and one week in detail, sees the line of a 64-day trip in seconds, not in half a minute, and sends the trip to the bike computer as one route per day, in two parts above 32 days.

Problem: At 32 and 64 days the height profile, the day list and the map cannot be read, the map of a 64-day cycling trip is quiet only after 31.4 s, one point far from a road stops the whole trip, and the web planner sends a trip as one route, which the bike computer cannot hold above about 1,500 km (cycling) or 1,000 km (hiking).

Decision: From 15 riding days, a strip of all days stands above the profile, and a window of 7 calendar days on it (the week in focus) chooses what the day list, the profile, the map and the night search show in detail. Up to 14 riding days, the screen does not change. The planner sends the route requests of a long plan two at a time; a point far from a road is left out with a note, and a leg with no legal path becomes a gap. The web planner sends a multi-day trip as one route per riding day plus a trip object, as the phone does; a trip of 33 to 64 riding days goes as two trips ("parts") of at most 32 days. A day route that the rider deleted on the bike computer goes again only when its file changes. The web planner and the phone keep a route point at each change that the 3 m dead band of the climb books (and, as today, at bends and surface changes), so the climb stays exact with 25 to 37 % fewer points. The planner allows 64 riding days.

Rejected:

  • Weeks that fold in the list (direction A) and a day table (direction C): the owner chose B.
  • Small fixes before the new screen: the owner chose the screen first. The faults that the screen does not replace are their own small step (Planner: rest-day column and "Show whole route" fixes #3715).
  • Keep the routed legs of a stored plan in the library: a 64-day cycling plan has 320,557 line points with heights, times and road facts, so each stored plan grows by tens of megabytes; every new routing package makes the stored legs wrong; and it helps only a second open. Two requests at a time help every full route, in one file.
  • Halve a failing request down to the single bad leg: about 6 rounds of failing requests. The service names the point or the leg in its error instead (one field).
  • A 3 m step for the web planner only (a parameter of points_to_obcr): it adds a parameter to an API that the phone shares, for no gain; the phone's route files get smaller in the same way.
  • A WebAssembly export for the trip object: a TypeScript writer of about 20 lines, pinned by specs/vectors/trip-v3.bin as the phone's Swift writer is, needs no bridge change and no size budget.
  • A random trip key kept in the browser: it dies with its stored entry, and a reversed loop keeps it. A key derived from the plan survives both.
  • Raise the device limits (64 days per trip, more menu routes, longer routes): the owner chose two parts and no firmware change.
  • A strip for every trip: the owner wants no added complexity for 1 to 14 days.
  • A done marker of the complete parts: with it, a new name or any other change makes all deleted days again, and they need their room. A CRC for each sent day keeps them out (Planner: 64 riding days, sent to the bike computer as two parts #3713).
  • A paint expression on the week range for the map: for a data-driven paint change, MapLibre lays out and loads the whole trip source again. A feature state of each day sends no line data (Planner map: the week in colour, the rest of a long trip quiet #3714).

Systems: route-planning, web-planner, library, routing (an error field of the route service), navigation (the obc-route converter), simulators (sim/phone/host, the converter that the iOS app links), planner search (the line limit of the search contract, the fix)
Contracts: specs/route-api.md Errors (a point or leg field), specs/obcr-route.md §5 (a point where the 3 m dead band books a change), specs/planner-plan.md (days 1 to 64), specs/library-backup.md (the browser state sent, SentRoute), planner/search/query/contract.json (the line limit in one place). The trip object (specs/ble-interface.md §7.7) and the route file layout do not change.
Size: L (7 systems, a stored browser state changes) — an epic of 7 steps and one fix, 8 pull requests, about 3,000 changed lines.

Facts

Checked on origin/develop 90bb591, and on origin/claude/planner-ux-merge-develop-2 edce9c0 (the head of #3338 with the develop merge of #3662) where it says so.

Screen:

  • The planner limit is 32 riding days: maxRidingDays in builder/web/src/lib/planner/editor.ts:12. At the limit the + of the day count is disabled and says nothing (builder/web/src/components/planner/DayCount.svelte:38).
  • Day colours repeat every 4 riding days (builder/web/src/lib/planner/day-colors.ts:2-7).
  • The profile of a multi-day trip draws, for each day, the area and the line of the whole route and clips them to the day (builder/web/src/components/planner/PlannerProfile.svelte:240 and :254), again for each piece between rest columns. For the 32-day cycling plan, each such path is 5.76 M characters. A 64-day cycling plan opened in headless Chromium with the route service and the dev page under one 3 GB memory cap was killed twice by the cap on this PC; with each day drawing only its own slice, the same run passed.
  • The profile switch "Map view / Whole route" (PlannerProfile.svelte:194) shows the stretch of the map or the whole route.
  • The day list shows all days, or only the open day (builder/web/src/components/planner/Itinerary.svelte:52). Each day uses about 170 px.
  • The planner searches places to sleep for every night that is not pinned (nightWindows, builder/web/src/lib/planner/stops.ts:82-88, used at PlannerApp.svelte:264). Each search request carries the whole simplified trip line (builder/web/src/lib/planner/search/types.ts:70-73). The town search refuses a line of more than 20,000 points (planner/search/validation.mjs); the simplified line of the 64-day cycling plan has 28,065. proposeNights chains: the window of night N uses the proposals of the nights before it (stops.ts:130-150). The proposals live only in the page (PlannerApp.svelte:272-274).
  • The map day colours are a color property of the trip source, and each change sets the whole source again (builder/web/src/components/planner/PlannerMap.svelte:228-230, :572).
  • The map cannot show more than the region: maxBounds: config.bounds (PlannerMap.svelte:453). So "Show whole route" cuts a route that fills the region on a wide map.
  • planner: less text, clear controls, a night picker that follows the stay kinds, no route alternatives (#3286) #3338 deletes route options and the day labels of the profile, puts the trip totals into the title row of the elevation drawer, shows the route notes as one row ("41 things to check"), puts the start date, the day count and the kinds of night place at the top of the day list, and makes the profile plot higher (edce9c0, seen in the pictures).

Routing:

  • A run of routed legs goes out in requests of at most 63 legs (MAX_REQUEST_POINTS 64, routing.ts:132; chunks, builder/web/src/lib/planner/route-legs.ts:58), one after the other, because each one is pinned to the road position where the one before ended (route-legs.ts:100-103).

  • The route service answers busy when a request waits more than 1 s for a worker (QUEUE_WAIT, planner/service/src/http.rs:24); the planner tries a busy request again after 1 s, at most twice (route-legs.ts:54). gpx-import.ts:49 shapes lines one at a time.

  • no_snap (a point more than 1 km from a usable road) knows the point (Error::NoSnap(index), planner/service/src/lib.rs:98-101), but the answer gives it only in the message text. The planner then shows no line at all.

  • A train or bus after night N is a transfer leg that starts riding day N + 1 (trainAfter, editor.ts:572, :592); calculateLine keeps it in the line as a straight segment of 0 s. The phone starts such a day after the transfer (companion-ios/.../OBCDomain/TripLine.swift:113-114).

  • Measurement, 64-day cycling plan (3,909 km, 6 requests, 320,557 line points), median of 3 loads, dev page, headless Chromium on the GTX 1660, local route service with 2 workers, terrain run active, one 3 GB cap at nice 19: first line on the map 25.7 s, map quiet 31.4 s. Route requests 9.0 s, profile 6.7 s, night search 7.4 s. With the profile slices and no night search: map quiet at 11.1 s.

  • Experiment for this design (throwaway edits, tools/exp.py and tools/speed.mjs of the design folder; same plan, machine and service, 1920 × 1080; time from the navigation start to the first map idle after the line is set; profile slices; night search only for nights 1 to 7; the search answered each request at once with an error, so no answer was proposed):

    Route requests Map quiet with the line, 3 loads Requests
    One after the other, as today 12.5 s (11.9, 12.5, 12.8) 6
    Two at a time, unpinned; a leg that does not join its neighbour goes out again, pinned to both 7.8 s (7.7, 7.8, 8.2) 9

    In every load, 3 of the 5 joins between the 6 requests landed on another road position. Real night search answers were not measured: each answer runs proposeNights, a new day split, list, profile and map. Both rows also had the night search of the first week only, which is Planner: a strip of all days and a week in focus for trips of 15 days or more #3712's change.

  • Experiment with only the two-at-a-time change (and the profile slices, which change memory only; night search of every night, search off; 3 loads; terrain run active): from the first route request to the last answer 9.2 s (8.4, 9.2, 9.4) one after the other, 5.1 s (4.9, 5.1, 6.2) two at a time with 9 requests; map quiet 21.1 s and 14.4 s.

Bike computer:

  • The web planner sends a plan as one route, nights and stops as waypoints (builder/web/src/lib/device-sync/route.ts:25-41), and keeps one device object for each plan (SentRoute, builder/web/src/lib/library/records.ts:145; sync.ts:148). These read that object: sync.ts:105-116 (leaving), sync.ts:132-134 (the target of a put, the copies of other plans), sync.ts:157-161 (lost objects), pages/routes/state.ts:19, pages/Device.svelte:100, pages/Area.svelte:94. A sent value that fails isSent reads as no value (library/store.ts:419-422); a backup with such a value fails as "damaged" (library/backup.ts:46). These tests seed the old form: src/lib/library/store.test.ts:86, tests/browser/planner/device.test.js:66, routes.test.js:35, route-rows.test.js:78 and :310. "Do not send" only takes a plan out of waiting (pages/Route.svelte:103, pages/routes/SelectedCard.svelte:51).

  • The phone sends a trip as one route per day with no waypoints, then a trip object; it skips a day whose CRC is unchanged and replaces a changed day by its object id (companion-ios/.../OBCTransport/Codecs/TripDayRoutes.swift, .../Transfer/TripUploadPlanner.swift).

  • The phone encodes each route and trip day through RouteObjectCodec.encode → obc_format_route_encode → obc_route::convert::points_to_obcr (sim/phone/host/src/route_codec.rs:130), in the staticlib that the iOS app links (sim/phone/host/Cargo.toml:7-9). The web bridge uses the same function (builder/wasm/src/convert_web.rs:34). It keeps a point at each height change of 1 m (ele_keep_m, firmware/obc-route/src/convert.rs:263, :304); keep_elevation_detail (convert.rs:319) sets the step.

  • The trip object (§7.7, write_trip, firmware/obc-route/src/trip.rs:168, vector specs/vectors/trip-v3.bin) holds a key, a name of at most 48 bytes, a start date and one route object id per day. The device reads at most 32 days of it (MAX_TRIP_DAYS, firmware/obc-route/src/trip.rs:24), keeps at most 16 trips (MAX_TRIPS, firmware/obc-app/src/trip.rs:28) and at most 64 routes in its menu: the newest 64 route ids win (firmware/obc-fw-nrf54l/src/flat_store.rs:1651, firmware/obc-storage/src/flat/catalog_read.rs:30-40). The device's own routes count: one built trip day at a time and temporary directions (FLAG_BUILT_DAY, FLAG_TEMPORARY, firmware/obc-formats/src/obcr.rs:26-30). A trip day whose route is not in the menu does not resolve.

  • The device files a trip upload from the cable as from the phone (flat_store.rs:1253-1255). It keeps trip progress by key: a re-upload with the same key keeps it; fewer days drop the progress of the removed days (firmware/obc-app/src/trip.rs:292-300). §7.7: "A re-upload of the same trip writes the same key"; "Reversing a trip makes a new trip with a new key".

  • The next trip day comes from the trip of the latest progress record (next_trip_day, obc-app/src/trip.rs:261); a ride stores its trip key (TripRef, :272). The device dates day k as start date + k until the rider rides (:384-389).

  • specs/planner-plan.md:34: days is an integer from 1 to 32. The phone opens no .obcplan file; PlannerPlan.maxDays (32, companion-ios/Packages/OBCKit/Sources/OBCDomain/PlannerPlan.swift:235) limits only the plans that the phone makes (:164, :241).

  • A trip object may list a route that is gone (§7.7: "Dangling refs are tolerated on read"); the device skips that day, and the later days keep their numbers (firmware/obc-app/src/trip.rs:103-118). The card never gives an object id twice (firmware/obc-storage/src/flat/store.rs:1403-1407).

  • Points of real routed lines, model of the shipped converter (tools/daypoints.py of the design folder), days of equal length:

    Plan Today (1 m), points/km 3 m from the dead-band reference (Route files: keep a point at each 3 m height change (web planner and phone) #3710), points/km Largest day route, today → Route files: keep a point at each 3 m height change (web planner and phone) #3710
    Cycling, 32 days, 1,972 km 42.8 26.9 3,518 → 2,186
    Cycling, 64 days, 3,916 km 40.9 26.2 3,531 → 2,168
    Hiking, 32 days, 716 km 67.8 50.9 2,176 → 1,680
    Hiking, 64 days, 1,448 km 63.0 46.3 2,469 → 1,688

    A plain 3 m step from the last kept point loses up to 26 m of climb on a day; the rule of Route files: keep a point at each 3 m height change (web planner and phone) #3710 keeps it exact (table in Route files: keep a point at each 3 m height change (web planner and phone) #3710).
    A route file holds 65,281 points (specs/obcr-route.md §5): the limits of a trip are its 32 days and the 64 menu routes, not the points.

Other work on the same files: #3338 (the planner tidy-up) and #3662 are merged into develop; #3712 to #3715 are checked against develop 1bbced3.

The screen

Built on #3338. Sizes on 1440 × 900 with the layout of #3338: top bar 48 px, trip bar 56 px, side panel 360 px, map 1072 × 462 px, elevation drawer 260 px, status line 38 px.

1 to 14 riding days. No strip, no week: the screen of #3338, with the "Map view / Whole route" switch.

15 to 64 riding days.

  • Strip. A row of 40 px under the title row of the drawer: bars of 28 px and a line of day numbers of 12 px. The drawer is 40 px higher, the map 40 px lower (422 px). One slot for each calendar day over the width of the drawer (1024 px): 32 px a slot at 32 days, 16 px at 64, 2 px between slots. The bar of a riding day has a height in proportion to its riding time (4 to 26 px; the longest day of the trip is 26 px). Outside the week the bars are quiet (--ink-faint mixed 45 % into --panel), inside they have their day colour. A rest day is a slot with a 6 px square outline at the bottom. Under the bars: the number of every 7th day, or its date with a start date. The "Map view / Whole route" switch is gone.
  • The week in focus. Always 7 calendar days, rest days included (a strip has 15 days or more). A frame of 2 px in --amber with a light amber fill. A plan opens on days 1 to 7. The week is page state. After every change of the trip (undo, fewer days) the week is clamped into the trip; a plan that drops under 15 days and grows again keeps its start day, clamped.
  • How the week moves. A click on a slot makes the day the 4th day of the week (clamped). A drag moves the week with the pointer, one day at a time. The strip is one focusable slider ("Days 36 to 42"): arrows one day, Page Up and Page Down 7 days, Home and End. The mouse wheel over the strip: one day a step. ‹ and › in the week header: 7 days. When the rider opens a day (a day row, a night or a quiet line on the map, a night badge) or a search result lies outside the week, the week moves the least that puts it inside.
  • Pointer on a slot outside the week. A tip of one line over the slot: "Day 45 · 57.5 km · 3h 57m · ↑ 1,441 m". The day lights up on the map in its colour, 6 px wide. The map and the week do not move.
  • Day list. Above the rows, a week header of 36 px that stays on top while the list scrolls: ‹, "Days 36–42" in bold, the distance and climb of the week, ›. Then only the rows of the week: days, nights, rest days and the + between days; the Start row only with day 1 in the week, the Finish row only with the last day. The rows are the rows of planner: less text, clear controls, a night picker that follows the stay kinds, no route alternatives (#3286) #3338.
  • Profile. The riding days of the week, from the start of the first to the end of the last, over the full plot (964 px, about 138 px a day). As in planner: less text, clear controls, a night picker that follows the stay kinds, no route alternatives (#3286) #3338, no day labels: the days have their colours and the nights their badges, with the night before the week at the left edge. The distance ticks count from the trip start. A day end drags as today. The height scale is the scale of the whole trip. An open day shows that day. The surface row shows the week.
  • Rest day. A column of 64 px after its night, as today, but only over the plot, never over the ticks and the surface row. The night badges keep their numbers, as in the day list and on the map: a night has the number of the day that ends there, so after a rest day 11 the numbers run 10, Rest, 12. When the week starts with a rest day, its column is the left edge of the plot. This also holds for trips of 14 days or fewer.
  • Map. Each feature of the trip source has its riding day as its id. The look of a day is a feature state: the days of the week have their colours, the other days are a line of 2.5 px in a quiet colour, and the day of the tip is lit in its colour, 6 px wide. A week step and the tip send no line data to the map. Night marks outside the week become 10 px dots with no number (a class on the marker); shaping points and stops outside the week are hidden. Start and Finish keep their marks. A click on a dot opens its night, as a click on a night mark does; a click on a quiet line opens its day, as a day row does. Neither changes the plan. One fit rule: the map fits the week only after the rider moves the week with the strip or ‹ ›, when the week rests, and only when the week's line is not inside the padded view. An opened day or night, or a move of the map by the rider, cancels the fit. A plan opens on the whole trip.
  • Totals and warnings. As planner: less text, clear controls, a night picker that follows the stay kinds, no route alternatives (#3286) #3338 shows them (totals in the drawer title, notes as one row). From 33 riding days one quiet line under the trip settings: "Goes to the bike computer in 2 parts".
  • Night search. Only for the nights of the week and the night before it (at most 8 nights, 16 requests), and only when the week rests (300 ms after the last change of the week; during a strip drag, 300 ms after the drag ends). Proposals exist only for these nights; every other night shows its even day end. So the day ends of a week never depend on which weeks the rider looked at before. The finder keeps its 40 recent answers, so a step back costs no search.
  • Show whole route. Fits the whole trip and does not move the week. The map may show up to one region size outside the region on each side; the planner still opens on the region as today.
  • Day count at the limit. At 64 the + looks off (aria-disabled, it keeps the focus). A press writes "64 riding days is the most a trip can have" in the status line.
  • A point far from a road (no_snap). The planner routes through its neighbours without it and shows the existing note "Route passes 1.2 km from the selected point — no accessible path", now with Show (routeGaps measures from the line to the point).
  • No legal path between two points (no_path). That leg is a gap: a dashed straight line, as trip-gap draws today, and the note "No legal path between 2 points". Its straight length counts in the distance; it adds no time and no climb. GPX and FIT export write the gap as a straight segment.

Mock-ups on #3338: long-trips-design-sheet.webp (design folder /media/timo/OSM1/tmp/explore-3506/long-trips-design/).

The bike computer

What goes. A plan of one riding day: one route, as today. A plan of 2 or more riding days: one route for each riding day ("day route") and one trip object for each part. Riding days 1 to 32 are part 1, days 33 to 64 part 2. A rest day has no route.

Day ends. From the stored plan only: planView(trip, line).days with no proposals, so pinned nights, moved day ends (splits), else the even day end. The device cuts a day exactly where the planner shows a kept or moved night. At a night that is still a suggestion, the planner shows the suggested town, but the device cuts at the even day end, up to half a day away; the rider keeps the night to send the town.

A day route. The line from the start to the end of the day, with interpolated end points (height interpolated, surface of the segment). A day that starts with a transfer starts after it, as the phone cuts; a transfer inside a day stays a straight segment. Waypoints: the stops of the day, distances from the day start, at most 32. Name: "Day k ‹place›": k is the position of the day in its part (1 to 32), the number the device shows; the place is the label of the pinned night point; with no pinned night, and for the last day of the trip, "Day k". At most 48 bytes, cut on a character boundary, never inside "Day k". After a rest day or in part 2 the device number is not the planner's calendar number (planner day 12 after one rest day is "Day 11"; day 36 is "Day 4" of part 2).

A trip object. Written by tripObject() in TypeScript, pinned by specs/vectors/trip-v3.bin. Key: FNV-1a 64 of "‹plan id›|‹id of route point 1›|‹id of route point 2›|‹part›" (0 becomes 1). It stays while the plan keeps its first two points: a moved start keeps its id. Any reversal, also of a loop, changes the order of the points and so the key, as §7.7 asks; a new point right after the start changes it too. The key needs no storage. Name: the plan name, with " 1/2" or " 2/2" at the end when there are two parts, inside 48 bytes. Start date: days since 1970 of the calendar day of the part's first riding day, or 0. Days: one whole day for each day route.

Progress. A send with the same key keeps the progress on the device; a part with fewer days drops the progress of the removed days. A new key starts empty.

Gaps block the send. A line with a no_path gap does not go: the plan stays in waiting, and the report says "“Alps” waits: 1 leg has no legal path. Change it in the planner." A point left out for no_snap does not block: the line is complete without it. A leg that the rider drew or made straight goes as today.

Stored state. As merged with #3711: SentRoute is { key, card, days: string[], trip: string | null, tripKey: string | null } (library/records.ts:147-153); an empty string in days is a day with no object on the card; allOnCard needs a key and no empty slot. #3713 makes it { key, card, days: string[], crcs: number[], gone: string[], trips: string[], tripKeys: string[] }: trips and tripKeys hold one trip object and one stored key for each part; crcs[i] is the CRC-32 of the file of day i as last put or found on the card; gone holds the day ids that the last listing of the card did not hold, and days keeps them. allOnCard then needs only this card and a key. Each id is written right after its put or removal; an entry of another card counts as no entry.

One sync of a plan in waiting, as merged with #3711 (sendRoute, device-sync/sync.ts:263-350): the gap check; the day routes; the entry (entryOn), which takes this library's trip object by an entry's id or by a stored or current key and never touches a route that a foreign trip lists; the copies of lost puts; for a one-day plan, the removal of its trip and days 2 and later; the room of the menu (64 routes, 16 trips), with the surplus days removed first when the new days need their room; then each day (skip by length and CRC, replace in place, or create), the stored trip key, the trip object, and the removal of the surplus days. #3713 first removes the trip objects of the parts that the plan no longer has, then runs these steps for part 1, then part 2, and removes the surplus days after all parts. Part 1's new routes count against part 2's room (card.count). A part whose days are all left out (below) is skipped. A part that does not fit stops the plan with "Part 2 of “Alps” waits: the bike computer has room for 2 more routes, it needs 8. Remove ridden or unused routes on the bike computer."

Days that the rider deleted on the bike computer (#3713). A day whose route is gone from the card, and whose new file has the CRC in crcs, is left out: no put, no room, and its trip object lists its old id. A changed day goes again with a new id, so only what changed takes room.

Walk: a 40-day trip, 30 other routes on the device. Sync 1: part 1 needs 32, room 34: it goes (62 routes). Part 2 needs 8, room 2: it waits. The rider rides days 1 to 20 and deletes those 20 day routes on the device (42 routes). Sync 2: days 1 to 20 are left out; days 21 to 32 and "Alps 1/2" did not change. Part 2 needs 8, room 22: it goes (50 routes). No route of the rider leaves the menu. The plan shows "On the device". A later change of a stop in day 5 makes day 5 again with a new id (51 routes), and "Alps 1/2" is replaced in place with that id and the old ids of the other deleted days.

A send that stops halfway (cable out): the entry holds every id that a put finished; the plan stays in waiting. The next sync skips finished days by CRC, takes a copy of a lost answer, and sends the rest. A second sync of an unchanged, complete plan sends nothing.

Removal and lost objects (#3711, with the day rule of #3713). A plan in leaving (deleted): the sync removes its trip objects, then its days, the last first. At the end of a sync, gone gets the day ids that the card no longer holds; a gone day does not change key. A trip object that is gone while a day of its part is on the card empties its slot and key, so the next send makes it again. An entry with no object left on the card goes. So a plan whose ridden days the rider deleted shows "On the device", and "Send to device" is off, because a send puts nothing. After a change of the plan, a send puts only what changed. When nothing of the plan is left on the bike computer, the plan is not on the device, and a send puts all of it again. Nothing goes again by itself.

Old entries. A sent value of an older form (also the one-part form of #3711) fails isSent and reads as empty; backup.ts drops a state value that fails its check, so an old backup still loads. The routes of old entries stay on the device as single routes until the rider deletes them there; they count in the room check.

On the device. Two trips, "Alps 1/2" (days 1 to 32) and "Alps 2/2" (days 33 to 64), each with its own progress and "Trip to go". When part 1 is done, the device does not go on to part 2 by itself: the rider opens "Alps 2/2" in the trip menu. The rest of a short day 32 is not joined to day 33. The journal shows the rides as two trips. With a full menu (a 64-day trip and nothing else), the device's own built day or directions push the oldest route out of the menu, which is day 1 of part 1.

Plan

#3709, #3710, #3711 and #3715 are merged. #3712 is built and reviewed. The search fix has no sub-issue: it is one small pull request (Mode: fix) and lands before #3713. #3713 follows #3712, #3711 and the search fix; #3714 follows #3712 and #3715. #3713 and #3714 can be built at the same time. Each step is one pull request, and each merges alone. Each sub-issue holds its files, cases, tests, checks and the owner's check.

Files

Done when

Limits

  • 1 to 14 riding days: the screen does not change, except the rest column and the map bounds (Planner: rest-day column and "Show whole route" fixes #3715). A plan of 2 to 14 days now goes to the device as a trip, and a bad point now gives a note or a gap.
  • The elevation profile stays the timeline of the trip.
  • No firmware change, no new route file format, no new trip object version.
  • The device knows no rest days: until the rider rides, it dates a day after a rest day one day early.
  • On the device, day numbers count the riding days of a part; the planner counts calendar days.
  • A trip in parts: each part has its own progress and "Trip to go"; the device does not go on from part 1 to part 2 by itself; the journal shows two trips.
  • A 64-day trip needs all 64 menu routes; the device's own built day then pushes day 1 of part 1 out of the menu.
  • A night that is still a suggestion reaches the device as the even day end.
  • A day route that the rider deleted on the bike computer goes again only when its file changes, or when nothing of the plan is left there. To have deleted days back, he deletes the plan's trips on the bike computer and sends the plan again. A plan whose ridden days he deleted shows "On the device" with nothing to send.
  • A new routing data release can change the file of every day. The next send after any change of the plan then makes the deleted days again, and they need their room.
  • The entry knows one card: a send to another bike computer and back makes the deleted days again on the first one.
  • Routes sent before this change are no longer known to the planner; they stay on the device as single routes.
  • The phone makes plans of at most 32 days, as today.
  • The web planner is for big screens; no phone-width work.

Out of scope

  • A way for the phone to send part 2 of a web trip.
  • New long-trip features (day length in place of day count, season check, resupply gaps).

As built

The seven steps and one fix are merged: #3709 (pull request #3719), #3710 (#3718), #3711 (#3727), #3715 (#3733), #3712 (#3735), the search fix (#3736), #3714 (#3738) and #3713 (#3739). Differences from the first plan:

  • Search. The place search took the line of a long trip through a fix of its own: searchLine thins the line until it has at most the service's limit of points, and the limit lives once in the search contract. No request cuts the line to a part of the trip.
  • Night numbers. The night badges keep their numbers (10, Rest, 12); the mock-up's "10, Rest, 11, 12" is not built.
  • Show whole route. The map may show one region size around the region, and a position outside the region is not a place for a click or a drag.
  • The map. The look of a riding day is a feature state on the existing layers; a week step and the tip send no line data to the map. Where two days share a road, a press takes the day in colour.
  • Deleted days. No done marker: the planner stores a CRC for each sent day, and a day that is gone from the card and unchanged is left out.
  • Day ends. A day end within 1 mm of a line point snaps to the nearer point, so that an unchanged day keeps its file.

Measured on the development PC, each as its pull request states it: the route requests of the 64-day cycling plan take 4.4 s (gate 6.0 s; before 9.2 s); the 32-day plan with town answers is ready after 9.0 s (gate 10.4 s; before 14.7 s); the 64-day plan with town answers after 10.9 s (gate 12.5 s; before, 25.7 s to the first line and no town answers); a week step on the map settles in 0.4 s with no line data sent.

Open, by the owner's decision to merge first and test later: his checks on the real bike computer for #3710 (the climb of a phone trip and of a web route before and after), #3711 (a 10-day trip as a trip; a changed day; a deleted trip; a deleted day) and #3713 (a 40-day trip as two trips; progress kept; deleted days stay gone; his own routes stay in the menu). The steps are in the owner briefs of the pull requests. A fail reopens that step.

Found on the way and not part of this change: #3740 (a pointer move over the map of a long trip costs 60 to 70 ms).

Activity

  1. timohueser commented on Nov 18, 2026

    @timohueser
    OwnerAuthor

    Owner answers (2026-11-18)

    The owner on the brainstorm: the concept is "really good", "definitely the right direction".

    1. Screen direction: B, the strip of all days with a window of about one week in focus.
    2. Order: the new screen first, not the small fixes.
    3. Long route on the bike computer: one route per day, as the phone does, plus the 3 m height step.
    4. A trip of 33 to 64 days: it goes as two parts; no firmware change.
    5. Planner limit: 64 days now.
    6. Feature ideas: none for now; the screen and the bike computer first.
    7. Measure where the time of a 64-day trip goes before the design: yes. His note: "what 20 seconds?" The answer he got: a 64-day cycling trip of 3,909 km took 20 s from opening the plan to its first route, and 6.2 s for one change, on the development PC with the local route service.

    Nothing of this is built. The next step is the design of direction B and of the day routes from the web planner (cairn design), after the measurement of answer 7.

  2. timohueser commented on Nov 19, 2026

    @timohueser
    OwnerAuthor

    Measurement: where the time of a 64-day plan goes

    Cycling, 64 days, 3,909 km, 6 route requests, 320,557 line points. From "page starts to load the stored plan" to "first routed line drawn on the map", median of 3 loads:

    Part Time What happens
    Page start 0.5 s code and plan load
    Route requests 9.0 s 6 requests of 63 legs, one after the other; search in the service is 99 % (answer building 12 ms, JSON 2.5 ms, 1.07 MB compressed in total)
    Join the legs 0.1 s
    Profile drawing 6.7 s each of the 64 days draws the whole route and hides the rest: 1,442 M path characters, two frames of about 4.8 s in the graphics process
    Night place search 7.4 s 126 searches at once, each with the whole line (search off in this setup, so probably more in real use)
    Map line and other page work 2.1 s
    First line on the map 25.7 s the day list is complete at 16.1 s (the earlier "20 s"), the map is quiet at 31.4 s

    What grows with what: route time grows with the number of legs and the length of each leg (about 4 ms per 4.7 km hiking leg, 25 ms per 10.7 km cycling leg). The profile grows with days × line points; the night search with the number of nights. Hiking 32 days: 3.4 s, cycling 32 days: 9.8 s, hiking 64 days: 10.4 s.

    Biggest parts and simple fixes:

    1. Route requests (35 %): keep the routed legs of a stored plan (about −9 s on each later open), or send the requests at the same time (about 9 s → 3 s with 4 workers). Not tested.
    2. Night place search (29 %): search only the nights in view (the week window of B). Experiment: −7.4 s.
    3. Profile drawing (26 %): each day draws only its own part. Experiment: first line 25.6 → 19.2 s, map quiet 31.4 → 19.3 s.

    With both page experiments (not committed), the first line came at 11.0 s. Conditions: development PC with the terrain run active, dev page, headless Chromium on the GTX 1660, local route service with 2 workers, everything under one 3 GB cap at nice 19.


    Generated by Claude Code

  3. timohueser commented on Nov 19, 2026

    @timohueser
    OwnerAuthor

    The design is in the issue body now (Status: designed). It passed two reader tests (critic and readiness) and one plan review; their findings are fixed in the text. The mock-ups are drawn into the planner of #3338, on which the screen parts are to be built. Four questions are with the owner: the base for the screen parts, part 2 when the bike computer is full, the bar height in the strip, and the other days on the map. No sub-issue is open and nothing is built before his approval.


    Generated by Claude Code

  4. timohueser commented on Nov 19, 2026

    @timohueser
    OwnerAuthor

    The owner approved the plan ("Approve, all picks"): the screen parts are built after the planner tidy-up (#3338) is merged, and the bike computer and speed parts start now; part 2 waits when the bike computer is full, and the rider frees room by deleting ridden days; the bars of the strip show riding time; the other days are thin grey lines and small night dots on the map. Status: approved.


    Generated by Claude Code

  5. timohueser commented on Nov 20, 2026

    @timohueser
    OwnerAuthor

    Three of the seven steps are merged: #3709 (pull request #3719), #3710 (#3718) and #3711 (#3727).

    Open checks of the owner on the real bike computer (he decided to merge first and test everything with the bike computer later):

    A fail of a step reopens that step.


    Generated by Claude Code

  6. timohueser commented on Nov 20, 2026

    @timohueser
    OwnerAuthor

    Closed in the backlog cleanup: all 7 steps are merged (#3719, #3718, #3727, #3735, #3736, #3733, #3738, #3739). The owner's checks on the bike computer (#3710 climb within 1 m, the six steps of #3711, a trip in two parts #3713) are now in the acceptance checklist #1978. As the comment of 11-20 says, a failed check reopens its step. #3740 (pointer cost on a long trip) stays open on its own.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions