No description
  • TypeScript 96.2%
  • CSS 3.6%
Find a file
amayakase f8f7557da4
Some checks failed
Quality checks / check (push) Has been cancelled
Rename Minimap tab to Editor
Updates the main view tab label in the renderer from “Minimap” to “Editor” and adjusts smoke tests to use the new accessible button name. This keeps UI wording consistent while preserving existing navigation behavior.
2026-10-10 15:22:20 +02:00
.github/workflows Bootstrap RideHUD milestone 1 foundation 2026-10-07 18:32:04 +02:00
docs Persist playhead in saved projects 2026-10-10 14:05:58 +02:00
fixtures Add heart rate GPX metric support 2026-10-08 00:11:17 +02:00
schemas Persist playhead in saved projects 2026-10-10 14:05:58 +02:00
scripts Add deterministic MapLibre minimap MVP 2026-10-07 19:01:49 +02:00
src Rename Minimap tab to Editor 2026-10-10 15:22:20 +02:00
tests Rename Minimap tab to Editor 2026-10-10 15:22:20 +02:00
themes Add portable theme packages and HUD theming 2026-10-07 21:50:20 +02:00
tools Add video export with FFmpeg 2026-10-07 20:28:00 +02:00
.gitignore Add deterministic PNG export pipeline 2026-10-07 19:54:43 +02:00
AGENTS.md Docs 2026-10-07 18:13:45 +02:00
index.html Allow HTTP map and geocode endpoints 2026-10-10 13:08:14 +02:00
LICENSE Initial commit 2026-10-07 18:06:38 +02:00
MANIFEST.txt Docs 2026-10-07 18:13:45 +02:00
package-lock.json Add video export with FFmpeg 2026-10-07 20:28:00 +02:00
package.json Add video export with FFmpeg 2026-10-07 20:28:00 +02:00
playwright.config.ts Bootstrap RideHUD milestone 1 foundation 2026-10-07 18:32:04 +02:00
PROMPT.md Docs 2026-10-07 18:13:45 +02:00
README.md Persist playhead in saved projects 2026-10-10 14:05:58 +02:00
tsconfig.json Bootstrap RideHUD milestone 1 foundation 2026-10-07 18:32:04 +02:00
tsconfig.main.json Bootstrap RideHUD milestone 1 foundation 2026-10-07 18:32:04 +02:00
vite.config.mts Bootstrap RideHUD milestone 1 foundation 2026-10-07 18:32:04 +02:00
vitest.config.mts Bootstrap RideHUD milestone 1 foundation 2026-10-07 18:32:04 +02:00

RideHUD — GPX Overlay Renderer

YouTube thumbnail overlays

Import a ride and open YouTube thumbnail to compose a static, north-up outline of the whole cleaned, privacy-kept route. Adjust position, size, line width, color, opacity and soft radial edge fade. Load a PNG/JPEG/WebP reference photo or footage still to judge composition; it is preview-only and must be reselected after leaving the workspace. Export thumbnail PNG saves a transparent 1280 × 720 route overlay through a native save dialog. Place it over your still in your image editor. This route-outline mode works offline and includes no basemap cartography. Settings save under optional scene.thumbnail, independently of the animated HUD. Recording gaps and segment boundaries remain disconnected; the playhead has no effect on the thumbnail. Existing projects retain defaults until explicitly edited.

RideHUD is a desktop tool that turns a GPX track into a polished, customizable, game-style telemetry overlay for video editing.

The tool is deliberately not a video editor. It does not replace DaVinci Resolve. Its job is to render transparent overlays driven by GPX telemetry so the resulting footage can be layered over GoPro or other camera footage in Resolve.

The visual centerpiece is a highly customizable, vector-based minimap inspired by modern open-world game HUDs: heading-up camera, forward bias, route styling, dynamic zoom, smooth motion, custom cartography, and a fixed rider marker.

Core principles

  • GPX-first: all animation is driven by GPX time.
  • Deterministic rendering: final output is rendered frame-by-frame, never screen-recorded.
  • Web-native customization: HUD widgets use HTML/CSS/SVG/Canvas where practical.
  • Vector map rendering: use MapLibre-style vector cartography, not baked OSM raster tiles.
  • No paid dependency required for the core workflow.
  • DaVinci Resolve remains responsible for video editing, audio, grading, cuts, and synchronization.
  • Preserve source data: never destructively modify the imported GPX.
  • Separate raw telemetry, cleaned telemetry, derived telemetry, camera state, and widget presentation.

The reference implementation assumes:

  • Desktop shell: Electron
  • Language: TypeScript
  • UI: React, Svelte, or another TypeScript web UI framework
  • Map renderer: MapLibre GL JS
  • Rendering/export support: FFmpeg / ffprobe
  • GPX parser: any well-maintained XML/GPX parser
  • Project format: JSON
  • Styling: CSS + MapLibre style JSON
  • Charts/graphs: SVG or Canvas
  • Test runner: Vitest/Jest + Playwright

Do not hard-pin dependency versions in architecture code unless required by compatibility.

Documentation map

  • AGENTS.md — instructions for Codex and implementation guardrails
  • PROMPT.md — suggested first prompt for starting the build
  • docs/00-product-spec.md — scope, user stories, non-goals
  • docs/01-architecture.md — modules and data flow
  • docs/02-gpx-processing.md — parsing, repair, smoothing, derived metrics
  • docs/03-minimap-renderer.md — map camera, styling, route rendering
  • docs/04-widget-and-theme-system.md — widgets, CSS, themes, extensibility
  • docs/05-editor-ui.md — desktop UX and editing workflow
  • docs/06-render-export-pipeline.md — deterministic frame export and alpha
  • docs/07-project-file-format.md — project persistence
  • docs/08-testing-and-quality.md — test strategy and acceptance criteria
  • docs/09-roadmap.md — phased implementation
  • docs/10-open-questions.md — choices intentionally left open
  • docs/11-codex-task-breakdown.md — implementation tickets for Codex
  • docs/12-route-detector.md — OSM route analysis, cues and future detections
  • schemas/project.schema.json — initial project schema
  • schemas/theme.schema.json — initial theme schema

App settings

Open App settings in the top toolbar to configure the shared Overpass endpoint, reverse-geocoding API URL template and vector TileJSON URL. Settings persist in Electron's user-data directory as app-settings.json and apply to every project. Save settings commits validated URLs; Cancel leaves the current settings intact. Overpass defaults to the public endpoint and geocoding defaults to disabled. Configure existing custom provider URLs here once; legacy project URL fields no longer select providers and are omitted on the next explicit project save. Downloaded OSM snapshots, location responses, attribution and formatting remain in the project. An export freezes the global tile URL when it starts.

Running Milestone 9

Requires Node.js 22.12+ and npm. From the repository root:

npm ci
npm run setup:electron
npm run dev

dev builds and launches the desktop app; restart it after source changes. npm start launches an existing build. The default minimap uses a bundled custom MapLibre vector style with free OpenFreeMap tiles. GPS review retains the offline raw/cleaned SVG view. PNG sequences, MP4 and transparent MOV export are available from Export overlay.

Use Import GPX (or try fixtures/clean_city.gpx), then scrub the ride timeline. Use Play / Pause to preview at 1×, 2×, 5× or 10× speed. Scrubbing or jumping to a marker pauses playback. Playback stops at the finish; Play there restarts from zero. Saving a project stores the current playhead; reopening restores it with playback paused. Older projects start at zero. Importing a ride or changing its privacy range resets the playhead and pauses. Playback speed is a preview setting and does not affect saved project data or export timing. The overview shows raw distance, duration, point count, segments, and source UTC start time. Import warnings are expandable. Segment gaps and recording outages over 30 seconds hold the last position and are marked uncertain. The outage threshold is persisted as processing.maxInterpolationGapSeconds. Raw distance never includes the jump between segments, but includes straight-line estimates across outages within a segment. Descending timestamps are rejected, duplicates are reported, and malformed points are excluded with warnings. GPX files must use UTF-8; unsupported encodings are rejected rather than silently rewritten. The original XML stays unchanged.

Save / Save as writes a version-one .ridehud.json validated against schemas/project.schema.json, plus a sibling .assets directory containing the unchanged GPX snapshot. Move the JSON and its assets directory together. Paths are relative, content hashes detect changed sources, and Locate GPX restores a missing matching source. Unknown project properties are preserved. Opening a project never rewrites it; files are replaced atomically on explicit save.

npm run typecheck
npm test
npm run test:smoke
npm run check

The smoke test launches actual Electron, drives import/scrubbing/save/reopen and missing-source recovery, and saves a screenshot under test-results/. Native dialogs are stubbed in the test; check their appearance manually on your OS. Windows CI runs the same checks. No separate Playwright browser download is needed for Electron smoke tests.

Implementation boundaries:

  • src/core/gpx: immutable raw parsing and import diagnostics.
  • src/core/geo, src/core/telemetry: SI math, summary and deterministic sampling.
  • src/core/project: schema validation and version migration entry point.
  • src/main: native dialogs, source snapshots, atomic persistence and safe IPC.
  • src/shared: typed, narrow preload API.
  • src/map: independent offline route projection.
  • src/renderer: React shell and ride-relative scrubber.

Milestone 2 adds deterministic cleaned telemetry, centered speed smoothing, windowed circular heading smoothing, low-speed heading freeze, sustained stop detection, confidence scores and reviewable spike repairs. The processing panel exposes thresholds in SI units; setting a smoothing window to zero disables it. The coral route shows raw data and the mint route shows enabled repairs. Jump to an issue and disable its repair to compare. Raw distance remains in the overview; cleaned distance and playhead distance exclude repaired spikes.

Automatic interpolation requires both impossible-speed legs and a short return with large absolute distances and detour ratio. Acceleration and heading reversal are recorded as corroborating reasons. Short runs of up to five points are supported; long gaps and segment boundaries are never automatically repaired. Defaults target cycling and should be adjusted for other activities.

Processing algorithm version 1, settings, repair evidence and enabled decisions are persisted on save. Earlier version-one projects use explicit engine defaults without rewriting their files on open. Repaired samples have confidence 0.8; unrepaired suspicious points have lower confidence and recording gaps have zero. Stops and heading are evaluated on a fixed one-second grid augmented by GPX times, so seeking and frame order cannot change the result. Stop boundaries therefore have up to one second of analysis resolution. The minimap consumes this cleaned telemetry; export uses this same cleaned telemetry.

Milestone 3 — Minimap MVP

Rich OSM cartography and inspector

The right-hand minimap inspector groups Camera & movement, Map detail & landmarks, Shape & route appearance, and Map source & attribution. Camera controls stay visible by default; advanced groups expand on demand. Reset camera restores explicit camera defaults without changing layout or map detail. Minimal, Balanced and Detailed map presets provide starting points; individual toggles remain editable and participate in Undo/Redo and project persistence.

The vector basemap distinguishes woodland, grassland and farmland, residential and industrial land use, waterways, cycleways/footpaths/tracks, bridge sections, and subdued dashed tunnel sections. Buildings can be hidden, flat or extruded. Woodland uses a subtle decorative canopy pattern, not invented tree locations. Labels, general POIs and railways remain independently selectable.

For actual mapped trees, tree rows, traffic lights, pedestrian/railway crossings, gates/bollards/barriers, drinking water, toilets, shelters, benches and bicycle repair stations, open Map detail & landmarks → Download OSM details. This downloads cartography directly from Overpass, independently of Route detector. Node features retain their mapped coordinates; amenity areas use their OSM bounds center. Tree canopies use mapped crown diameter (6 m default, 1–50 m display clamp) and leaf type where present. Tree rows are drawn as canopy strips, with no inferred individual spacing. Signal symbols show infrastructure, never live signal state. Small features appear at close zoom with collision-managed upright icons.

Download explicitly sends positions around the cleaned, kept ride to the configured Overpass endpoint (default https://overpass-api.de/api/interpreter). Coverage radius defaults to 1,500 m and can be set to 100–5,000 m. Increase it for wide zooms, large forward bias and pitch; details outside the downloaded corridor are absent. Privacy cuts should be set before downloading. Previously saved snapshots are retained until refreshed or removed, including after privacy changes; remove/refresh them before sharing.

Downloads are cancellable, split into requests of at most 12 coverage positions, spaced 1.5 seconds apart, and bounded to 45 seconds and 16 MB per response. Incomplete/failing requests never replace the last complete snapshot. Limits are 2,000 coverage positions, 100,000 features and 300,000 saved geometry vertices. Provider failures require an explicit retry. Save the project to retain downloaded details; reopening/exporting never downloads them. Saved details render offline even with the online basemap disabled. The online basemap still needs tiles.

Validation includes schema/style checks, OSM parsing, dateline and segment coverage, legacy project compatibility, and Electron pixel toggles, save/reopen offline, failure retention, snapshot removal and repeated identical PNG exports. Automated downloads use synthetic OSM responses; live provider coverage remains external.

The Minimap view renders muted vector roads, water, parks and buildings with grey traveled and mint remaining routes. The SVG rider points upward in heading-up mode and rotates with heading in north-up/fixed modes. Camera controls include a 35 m forward bias, fixed/dynamic zoom, and separate position, bearing and zoom damping. Heading-up uses the camera's filtered rider pose to keep the marker steady while the world moves beneath it. GPS review retains the exact telemetry marker for source/repair inspection.

Defaults: zoom 16, clamps 13–18, speed zoom factor 0.06 per m/s, damping constants 0.35 / 0.65 / 1.2 seconds. Setting a damping constant to zero disables it. Camera evaluation simulates a fixed 20 Hz grid over an eight-time-constant lookback (minimum one second); seeking, preview frame rate and export range cannot alter the state at a given time. Route layers never bridge segments or long outages.

Choose rectangle, rounded or circle; edit normalized x/y/width/height. The canvas keeps its project aspect ratio, and circles stay circular when the window resizes. These settings are stored under scene.minimap; existing version-one projects use defaults without being rewritten on open. Unknown map properties are retained.

Map labels toggles street/place names; Points of interest toggles named POIs and markers, including stations where available. Both default to off, are saved with the project, and apply to preview and export. Street names and POIs appear from zoom 14; place names from zoom 8. Coverage depends on the vector source. Enabled labels use OpenFreeMap's free Noto Sans glyph service. Disable these options or the online map for offline route-only rendering. Train tracks is enabled by default and can be toggled independently. Railways appear from zoom 10, with sleeper marks from zoom 14, where the vector source provides them. The choice is saved with the project and applies to exports.

App settings accepts an HTTP or HTTPS OpenMapTiles-compatible TileJSON URL and attribution. Disable Online vector map for a route-only offline minimap. Unavailable/slow sources show a warning while route, telemetry and project save/open remain usable; toggle the source to retry. Remote tiles can change, so deterministic pixel checks use route-only mode. Offline tile packages and route-complexity zoom remain later milestones.

The build bundles MapLibre's worker into a local blob for Electron's file-based renderer; it never downloads runtime scripts. The CSP permits HTTP and HTTPS tile requests and that worker while retaining renderer isolation. Map styling lives in src/map/style.ts, independently of HUD CSS and telemetry.

Validation: 41 unit tests cover existing telemetry plus camera math, angular wraparound, zoom clamps, seek/frame-order determinism, route progress, repaired geometry, outages and older project loading. Two Electron smoke tests cover pixel-equivalent repeated seeking, controls, save/reopen, source failure and offline recovery. A live OpenFreeMap check also rendered the custom vector style.

Full MVP definition

The first usable release should:

  1. Import a GPX file.
  2. Display its route.
  3. Detect and repair obvious GPS spikes without modifying the source.
  4. Scrub through the GPX timeline.
  5. Render a polished heading-up minimap with smooth camera motion.
  6. Show at least speed and distance widgets.
  7. Allow layout and visual customization.
  8. Save and reopen a project.
  9. Export a transparent overlay at a chosen resolution and frame rate.
  10. Produce deterministic output: the same project and frame time must produce the same frame.

Everything else is secondary.

Camera pitch (0–60°) and a 3D buildings toggle are available in the minimap controls and saved with projects. Try 40° with heading-up and forward bias. Existing projects retain 0°/flat defaults. Buildings use source render heights and bases, with a 3 m fallback when height is missing; their subdued translucent style keeps the route readable. No new tile provider is required.

Milestone 4 — HUD editor

The checkerboard canvas now has a layer list and context-sensitive inspector. Drag any implemented component from the Components palette onto the canvas, or click its palette button to add it. Each metric includes its container. Dragging Minimap places/reveals the existing single map. Select a layer or click it on the canvas, drag it, and resize from any of its four edges or four corners. Transforms use normalized coordinates and stay inside the canvas. Snapping aligns edges, centers and matching widths/heights within six preview pixels, with visible guides and a fallback 1% grid; hold Alt to bypass it. Choose landscape 1080p/4K or vertical 1080p without rebuilding your layout.

Layers can be hidden, locked and raised/lowered. Metric widgets can be duplicated or removed and expose metric/imperial units, 0–3 decimals and an accent color. The minimap retains its camera, source, shape and layout controls. One minimap per scene is supported. Unsupported widget types are retained with a placeholder.

Undo/Redo covers scene edits, including minimap settings, transforms, layer actions, canvas changes and presets. Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z (or Ctrl/Cmd+Y) work outside form fields. Each drag/resize is one history entry; history is capped at 100 edits and resets on project replacement. Timeline seeking is independent.

Save a named composition under Layout presets, then apply it to restore its widget instances, placement and metric styles. Presets live in the project JSON; applying one preserves canvas dimensions and minimap camera/source settings. The built-in RideHUD layout rearranges existing widgets. Theme packages are available in Milestone 6. Older projects receive a virtual minimap layer without rewriting files on open; the layer is materialized on scene editing. Unknown fields survive.

Validation: strict TypeScript and build pass; 46 unit tests and three Electron smoke tests pass. The HUD smoke exercises drag/resize, undo/redo, units, locking, visibility, presets, vertical resolution, deterministic values and save/reopen. The vertical editor screenshot was inspected. Native dialogs remain stubbed in smoke tests; final overlay export is described below.

GPX privacy cuts

Use GPX privacy cuts to keep a start/end range in original ride seconds, or scrub to a safe intersection and choose Cut start at playhead / Cut end at playhead. The route, GPS review, camera and telemetry use only recorded points within that inclusive range. Boundaries snap inward to recorded samples; no point is interpolated from excluded locations. Time and distance restart at zero at the first retained point. Reset cuts restores the complete ride. Ranges need at least two points with different timestamps.

Cuts are persisted in source.privacyTrim (startSeconds, nullable endSeconds). Older projects keep the complete track. Export trimmed GPX writes a separate GPX with retained coordinates, elevation, UTC timestamps and segment boundaries. It omits track names, waypoints, metadata and extensions to avoid leaking private locations through ancillary fields. The original GPX is never overwritten. Projects and their assets still contain the complete original track; share the trimmed GPX rather than the project when protecting private endpoints.

Milestone 5 — Deterministic export

Choose Export overlay to open the PNG sequence settings. Set full-canvas width/height, kept-ride start/end seconds, rational frame rate and 1×/2×/4× supersampling. Standard rates are 24/25/30/50/60 and 30000/1001 or 60000/1001; the numerator/denominator fields support custom rates up to 240 fps. The range is end-exclusive: ten seconds at 60 fps produces exactly 600 frames, timestamped 0 through 599/60. Last-used settings are persisted on explicit project save.

Export freezes the current project and renders in a dedicated sandboxed offscreen window. Every frame independently samples telemetry and evaluates the existing finite-lookback camera at start + index × denominator / numerator. The editor remains usable. Metric preview and export share their Canvas painter; maps use the independent MapLibre surface, including route progress, rider and masks. Editor selection handles, checkerboard and source-status captions are omitted.

The destination receives a new unique ridehud- directory, containing frame-00000000.png onward and export-log.json with settings, progress and outcome. Frames are RGBA PNGs with a transparent canvas; the minimap and widget panels retain their intended backgrounds. Supersampled surfaces are downsampled before encoding. Render surfaces are limited to 64 megapixels and 16384 pixels per side; reduce dimensions or supersampling if the requested surface exceeds these limits.

Compact PNG holds stores one PNG per consecutive unchanged interval plus frame-holds.jsonl. Each line names the image, global startFrame and integer frameCount; use the rational FPS and range start in export-summary.json to place and hold it. This requires manual image holds in your NLE and is not a directly importable numbered sequence. It applies only to PNG export.

Normal sequences and video staging reuse identical frames with hard links where supported, retaining every numbered filename while sharing image storage. Link limits or unsupported filesystems fall back to ordinary PNG writes. Copying or archiving a linked sequence may expand its size. Reuse compares exact final RGBA pixels and skips repeated PNG compression/transfer; telemetry, camera and paint still evaluate every frame, so a stopped ride with a moving clock is not frozen. Video sections each start with their own image and never link across sections. Logs report reusedFrames and linkedFrames separately.

Cancel preserves completed frames. Errors also preserve completed frames and record the reason in the log. Map export waits for idle at each evaluated state; source errors or a 20-second readiness timeout fail the job. Disable Online vector map for route-only offline export. Remote cartography can change between runs; pixel determinism is verified with the offline route source.

Validation: strict TypeScript/build, 60 unit tests and six Electron smoke tests pass. Export tests cover a 600-frame sequence, rational timing over two hours, range equivalence, alpha, 2× metric/4× minimap supersampling, identical repeated map PNGs, profile persistence, cancellation and map-source failure logs. Native folder dialogs are stubbed in smoke tests. Resolve import and live remote map export require manual validation. Bounds-only output is available in Milestone 9.

Video output

Under Export overlay, choose a format:

  • PNG sequence: lossless transparent frames; remains the default.
  • MOV / ProRes 4444: a video with alpha for compositing. Files can be large.
  • MOV / Animation: lossless QuickTime Animation with 8-bit RGBA alpha.
  • MP4 / H.264: an opaque video with your chosen background color (black by default). MP4 requires even dimensions. Use MOV or PNG when you need transparency.

All formats use the same exact frame times, range, normalized composition and supersampling. Video renders bounded sections (five seconds by default), encodes each section and joins the encoded sections without a second lossy encode. PNGs are removed after their section is successfully encoded unless Keep rendered PNG frames is enabled. Encoding begins before the full ride has rendered. Sectional rendering controls section duration and 1–3 independent render workers. One FFmpeg process runs at a time, overlapping with other render workers. See Milestone 9 below for staging bounds and recovery semantics.

Successful video output is overlay.mp4 or overlay.mov inside the new export folder. export-log.json records settings/progress/outcome; export-summary.json includes resolution, frame clock, codec, crop placement and section statistics. Sections have individual encoder logs and manifests under sections/. Final encoding-log.txt, verification-log.txt and container-validation.json describe assembly and verification. The final video is published atomically only after its compressed packet count and rational timestamps pass verification. Cancel terminates every render worker and FFmpeg, removes partial videos and keeps completed encoded sections plus any remaining PNGs. Closing the app waits for cleanup and final metadata. Already retired PNGs are represented by their encoded sections; they are not recreated on failure or cancellation.

Video currently supports Windows x64. FFmpeg is installed into the app's npm dependencies by npm ci; no PATH installation is used. ffmpeg-static 5.3.0 / FFmpeg 6.1.1 is pinned, and the executable is checked against tools/ffmpeg-manifest.json with SHA-256 before every video export. Installation needs network access; exports work offline once installed. A missing or changed binary produces an actionable error while PNG export stays available. Preserve the package's GPL license and source/build information when distributing the bundled executable.

Video validation decodes H.264, ProRes 4444 and QuickTime Animation containers. It checks exact 30000/1001 times across five-section boundaries, opaque MP4, partial ProRes alpha and lossless Animation RGBA equality against every reference PNG. DaVinci Resolve import on your system still requires manual verification; codec decoding and alpha checks do not establish NLE compatibility.

Milestone 6 — Themes

The layer panel offers Night and Dawn themes, rider icon selection, and editable HUD variables. Changes participate in scene Undo/Redo. Existing explicit widget accent colors take precedence; Use theme accent removes that override. Themes change presentation only, preserving telemetry, layout and map sources.

Import theme / Export theme exchange a single portable .ridehud-theme.json package. The manifest includes id, name, version (1), variables, mapStyle paint overrides keyed by bundled layer ID, and icons.rider (chevron, diamond or bicycle). See themes/dawn.ridehud-theme.json and schemas/theme.schema.json. The selected package is embedded under scene.themePackage; saving and reopening does not depend on the imported file. Older projects receive Night defaults without rewriting their files on open. Unknown manifest/project fields survive load and save.

The stable variables are --hud-text, --hud-muted, --hud-accent, --hud-panel, --hud-border, --hud-radius, --hud-shadow, --route-traveled and --route-remaining. Colors use #RRGGBB or #RRGGBBAA; radius and shadow blur use pixel lengths. Variables are scoped to the HUD canvas and consumed by the shared Canvas painter for exported metrics. Additional declarative variables are retained. Map paint supports static colors, opacity, line widths, circle sizes and label halos for the bundled cartography. Sources and optional map layers remain project settings. This first package format embeds variables, paint and built-in vector icon choices; arbitrary CSS, external font assets, custom SVG files and whole external MapLibre styles are not imported.

In unpackaged development builds, Development hot reload checks the last imported package every second. Edit that JSON in your editor to update the preview. Invalid edits show an error and keep the last valid snapshot. Reload is opt-in, stops when making manual theme edits or switching themes, and never changes a running export's frozen snapshot. Packaged builds do not read development files.

Validation includes strict TypeScript/build, theme normalization and rejection, older-project compatibility, map styling/source isolation, and Electron tests for import/export, icon swapping, hot reload, invalid-file recovery, persistence and repeated offline themed PNG equality. Native file dialog appearance and live remote tile rendering remain manual checks.

Milestone 7 — Ride visuals and simpler workspace

The component library now includes elevation, gradient, a whole-ride elevation profile, recent speed, route progress, Next stop and Ride section. Every component uses the same pure time evaluator and Canvas painter in preview and PNG/video export. New components find free space beside the map. Units and colors remain presentation settings; saved layouts, undo/redo, visibility and locking work with all the new components.

Use Minimap → Selected component for a large preview with the component's original aspect ratio and map framing. This does not alter the saved layout. Full overlay returns to composition. Position and size use percentages with sliders and exact entry. Camera sliders have clear units; detailed motion and map source settings are expandable. Theme, saved-layout, privacy and GPS diagnostic panels are collapsed by default. Export has a dedicated workspace with familiar frame-rate and quality choices; rational custom rates remain under an advanced panel. Export settings survive switching tabs.

Ride graphs & stops shows large elevation and recent-speed graphs. Scrub to an interesting location, name it, and choose Add stop here. Stops appear as minimap dots, timeline buttons and the Next stop component. To label a climb or other section, set its start at the playhead, scrub ahead, and set its end. Rename, remove or jump to markers from this view. Overlapping sections use the first matching entry in the saved list. Sections are start-inclusive and end-exclusive. Stops are considered upcoming through their exact timestamp.

Marker times in scene.rideMarkers refer to the original untrimmed ride. Privacy cuts filter stops and clip sections to the kept ride without moving the original anchors. Markers outside the kept ride remain in the project but do not appear in the exported overlay. Older projects default to an empty marker list; unknown marker properties and unsupported widgets remain preserved.

Elevation is a centered five-sample average across four seconds. Gradient uses a 30 m centered horizontal-distance window, requires at least 20 m of travel and continuous elevation, and shows an unavailable value above 40% absolute grade. These explicit defaults live in core/telemetry/visuals.ts. Missing elevation, segment boundaries and uncertain outages remain gaps rather than invented data. Elevation profiles use a ride-time axis with approximately 1,500 samples plus exact outage breaks. Recent speed defaults to 60 seconds, adjustable from 5–600 seconds, with 120 intervals plus outage breaks. Route progress uses cleaned cumulative distance. All values are independent of playback or frame order.

Validation: strict TypeScript and production build, 74 unit tests and eight Electron smoke tests. The new smoke adds every component, creates markers and a section, inspects the large preview, saves/reopens and compares repeated exported PNG pixels. Existing checks cover import/repair, camera seeking, transforms, privacy cuts, real PNG/video output, alpha and themes. Native dialogs remain stubbed; importing the resulting overlays in Resolve still requires manual QA.

Milestone 8 — Advanced map behavior

Open Advanced map behavior in the minimap inspector. Route complexity zoom widens the dynamic view before turns; corner anticipation rotates toward the future route. Both use a cleaned route distance window (200 m by default), stop at segment/outage boundaries, cache on a one-second grid and interpolate between entries. Complexity is accumulated absolute bearing change divided by 180°, clamped to 0–1; its zoom factor is measured in zoom levels. Generic telemetry sources without cleaned geometry use at most 120 seconds of future samples.

Speed look ahead adds speed × seconds to the base forward bias, capped by Maximum look ahead (200 m default). Hold position and heading anchors detected stops on the fixed one-second analysis grid, removes bias and eases to Stopped zoom (16 default). Resuming motion uses the existing independent damping controls. North-up and fixed-bearing modes retain their chosen orientation. These policies remain functions of ride time and produce identical frames after seeking or starting a range export.

New camera effects default to zero/off and stop behavior defaults to Follow telemetry, preserving existing project framing. Look-ahead is adjustable from 10–1000 m, complexity zoom from 0–4 levels, speed look ahead from 0–20 seconds, maximum bias from 0–2000 m and corner anticipation from 0–1. Settings are validated, saved with the scene, and participate in scene undo/redo.

Route speed gradient optionally colors cleaned route edges blue / mint / coral at 0 / 7.5 / 15 m/s (values outside that range clamp). Colors interpolate in speed space; each GPX edge has one color. Traveled edges are dimmer and thinner, while remaining edges retain full brightness. Recording gaps are never connected. Disable the option to use the selected theme's traveled/remaining colors.

Soft edge fades rectangle, rounded and circle minimaps into transparency. The range is 0–0.5 of each dimension (zero preserves hard edges). Preview uses CSS masks; export uses equivalent Canvas alpha gradients on an isolated minimap layer before supersampling downscale. Other layers and opaque backgrounds remain intact. The fade includes the rider, compass, border and map attribution; project caption and editor selection controls remain outside it.

Validation: strict TypeScript, production build, 84 unit tests and nine Electron smoke tests. New tests cover corners, speed bias clamps, stopped pose/resumption, uncertain gaps, subsecond segment breaks, dateline behavior, seek/range equality, validation/legacy defaults, persistence, gradient geometry and actual soft-alpha PNG export. The smoke checks repeated PNG equality with 2× supersampling. Remote cartography can still change; deterministic pixel tests use offline mode. Native dialogs and Resolve import remain manual checks.

Milestone 9 — Export polish and sectional rendering

Resolve preset applies common 1080p60 PNG/ProRes alpha, 4K30 ProRes alpha or 1080p30 lossless Animation settings. Presets retain your ride range, crop and section policies, reset supersampling to 1× and remain fully editable. Select the frame rate that matches your Resolve timeline. ProRes 4444 and QuickTime Animation are decoded/alpha-tested here; actual Resolve import is not yet verified.

Crop to visible widgets exports one stable rectangle around all visible, nonzero-opacity widgets. Framing and normalized layout use the full export canvas; only the final pixels are cropped. Padding defaults to 8 px (0–256 adjustable), with at least 2 px for borders and additional padding for theme shadows. Circle bounds use their actual diameter. MP4 crop sizes expand to even dimensions. No visible widgets produces an explicit validation error. Cropping saves PNG and video storage; render-surface limits still apply to the full composition.

export-summary.json provides the output size, top-left position on the full canvas and center offset in pixels (x right, y up). In Resolve, use a matching canvas and frame rate, disable automatic resizing for cropped clips, preserve 1:1 scale, then apply the supplied center offset. Choose straight/unmatted alpha for transparent PNG/MOV sources and check edges over contrasting backgrounds. The summary also records the codec, alpha mode, rational FPS, first/last ride timestamps, exact count/duration, supersampling, map dependency and job outcome.

Sectional video rendering rounds section length up to an integer number of frames. Settings range from 0.1–60 s and default to 5 s. Each frame keeps its global index/time, so seeking, section size, parallelism and export start do not change telemetry or camera evaluation. Completed sections may encode out of order; final assembly always uses original frame order. H.264 disables B-frames, and stream-copy assembly reconstructs packet PTS/DTS/duration from global indices, avoiding accumulated concat-duration rounding at fractional rates. Every final container passes packet count and timestamp validation before publication.

Parallel sections default to 1; choose 2 or 3 for independent hidden renderers that can overlap rendering and encoding. Each worker holds at most one section and waits for encoding/PNG cleanup before claiming another. With frame retention off, PNG staging is bounded by workers × frames per section (or the whole clip if shorter). For example, five-second sections at 60 fps use up to 300 PNGs with one worker or 600 with two. The UI and summary show the bound and measured peak. Encoded section videos also consume space until final assembly; the final container temporarily duplicates their compressed size, then chunk videos are removed. More workers can improve throughput but use more GPU memory and staging space; speedup is not guaranteed on a shared GPU.

The effective worker count is limited so aggregate full-canvas supersampled surfaces stay within 64 megapixels. Chromium, map surfaces and extra composition buffers need additional memory; reduce workers/quality if resources are tight. One verified app-local FFmpeg process runs at a time. Keeping PNG frames explicitly retains the entire sequence and therefore disables the bounded-disk benefit.

Cancellation/failure preserves completed encoded sections, their global frame range manifests and remaining PNGs, while removing incomplete video containers and unfinished PNG writes. Work is not resumed automatically; section manifests make retained outputs reviewable. The job waits for all workers and the encoder before another export can start. A PNG cleanup error stops the job to prevent staging from growing without bounds. Successful exports remove chunk videos but retain their small diagnostic logs and manifests.

Validation: strict TypeScript/build, 95 unit tests and eleven Electron smoke tests. New coverage includes range partitioning, fractional clocks, partial last sections, memory caps, out-of-order completion, encoder serialization, sibling failure, abortable pending frame calls, crop math, presets, saved settings, recovery logs, five-section codec timing, bounded staging, early cleanup and byte-identical serial/parallel lossless RGBA frames. Cropped PNGs match the corresponding full-canvas region exactly. Native dialogs and Resolve import remain manual QA; remote tile contents can still change between independent rendering workers.

Reverse geocode component

Add Reverse geocode from Components. Configure an HTTP or HTTPS JSON GET endpoint in App settings with {lat} and {lon} placeholders, then choose Look up at playhead. This explicitly sends that coordinate to the configured provider. HTTP supports self-hosted Nominatim instances, including localhost and LAN servers. No lookup runs on playback, seeking, project open or export. Requests have a 15-second timeout, a 1 MB response limit and no redirects. Manual requests can run consecutively without a fixed cooldown. Provider-specific authentication can use URL query parameters; custom headers, POST APIs and OAuth are not supported. URL keys are stored in the local app-settings file.

Open Configure location label in the inspector for a large configuration dialog. Browse saved locations and response fields, build an ordered fallback chain, and preview the label before saving. Cancel discards configuration edits. Choose a nested scalar field from the returned JSON, or write literal text with fields such as {address.road}, {address.city} or Near {features[0].properties.name}. Dot paths and numeric array brackets work; {$} selects a scalar root. Missing/null/object fields become empty strings. Use ordered alternatives such as {address.city|address.town|address.village} to select the first non-empty scalar value. Missing, null, whitespace-only, object and array values are skipped; zero and false remain valid values. Configure fallback text and provider attribution in the same dialog.

Look up additional playhead positions to create location changes. Each saved JSON response is anchored to original ride time and its label holds until the next lookup; before the first lookup the fallback appears. Results are project-local, participate in undo/redo and survive save/reopen and privacy cuts. Editing the API URL affects future lookups; existing labels remain until removed or replaced. Preview and exports paint the same saved labels without a geocoding network request. Follow the selected provider's usage, attribution and privacy terms.

Heart rate from Garmin GPX TrackPointExtension/hr (including gpxtpx:hr) is available as a Heart rate component in bpm. Readings interpolate linearly between adjacent recorded points; missing readings, segment gaps and outages show —. The default is zero decimal places. GPS repairs preserve sensor readings; original GPX and extensions remain unchanged. Preview and export use the same telemetry and painter.

Consistent telemetry panels and graph display

Telemetry panels share theme background, border, radius, shadow and accent styling in preview and export. Speed, ride distance, heart rate, gradient and elevation can switch between Numeric value and Graph in the component inspector. Graphs support Recent distance (5 km by default, configurable from 0.1 to 100 km) and Full ride, with a playhead on the full profile. The horizontal axis uses cleaned ride distance. Missing sensor values and recording gaps break the line. Graphs sample at 301 fixed times plus gap/missing-elevation boundaries, independently of FPS. Existing speed-history and elevation-profile components retain their previous ranges until a new graph range is selected. Display settings persist with the project and participate in undo/redo.

Route detector

Open Route detector to explicitly analyze the current kept, cleaned ride with OSM. Review roundabouts, traffic lights, junction turns and bends; jump to detections, change cue text or disable events. Add Route cue from the Minimap component library for an along-route distance countdown (300 m look ahead by default). Analysis and review decisions save with the project and work offline in preview/export. Cleanup or privacy changes mark analysis stale until reanalyzed. Fetching is cancellable and sends the ride corridor to the chosen HTTPS Overpass provider. Reanalysis replaces review edits.

See Route detector for defaults, confidence/coverage limits, persistence, validation and future exit numbers, forks, crossings, surfaces and offline matching. This is recorded-ride annotation; map matching is heuristic and cues should be reviewed.

OSM downloads use short sequential route sections with visible progress, bounded retry/backoff for busy providers and a ten-minute in-memory section cache. Retry after a failed download reuses recently completed sections; saved analysis is replaced only when the entire download succeeds.

Configure the full Overpass interpreter URL in App settings. It is shared with Route detector and OSM detail downloads and persists separately from projects. HTTP and HTTPS instances (including localhost/LAN) are supported without URL credentials or fragments. Prefer HTTPS for remote servers. Redirects are rejected; failures never switch providers automatically. Vector tiles and reverse geocoding are separate settings.

Gather ride locations

In the Location component inspector, open Gather & browse locations. Choose Sampling interval (ride seconds): 20 seconds by default, or 5–3600 seconds. Gather all locations samples the cleaned, privacy-kept ride in original-time coordinates. Recording gaps and segment boundaries stay disconnected; uncertain samples are skipped. This is a batch analysis, independent of preview playback.

API requests are serial with user-configurable spacing (1.2 seconds by default). Set zero for no added delay, or choose any non-negative spacing for your server. The dialog shows the lookup count and minimum request-time estimate. The provider configured in App settings is frozen for the job. Follow its usage limits; a five-second ride interval can produce many requests on a long ride. No gathering starts automatically on open, playback or export.

Progress, cancellation, resume and Apply results remain visible below the app toolbar after leaving the inspector. Each completed full JSON response is checkpointed in the user-data location-job.json file. Failed or cancelled jobs retain partial results. Interrupted jobs require explicit resume on reopening; resume uses the original job's provider and sampled ride. One job is retained at a time; starting a new job replaces that local checkpoint, while already applied project data stays intact. Jobs allow up to 10,000 samples and 32 MB total data.

Consecutive samples merge into start/end time ranges using Merge identity template, independent of changing coordinates and house numbers. By default this compares road, city/town/village and country code. The first field (normally road) must exist; unknown roads, recording gaps, different localities and separate visits remain separate. Providers with another schema need an appropriate identity template. Boundaries are estimates at the chosen sampling resolution; equal road names are not proof of the same physical road. Add distinguishing fields as needed.

Every original response, sampled coordinates and time remain in the range's observations. The overlay formats the first response in each range; start/end bounds prevent labels extending across an unqueried gap. Legacy manual labels retain their hold-until-next-lookup behavior. The locations modal shows 12 ranges per page with pagination above and below, plus a full-response browser. Apply results replaces the target component's locations only when the original ride/cleanup/privacy signature matches. It participates in scene Undo/Redo. Save the project to persist the applied data; saved locations render offline.

Conditional location template sections

Wrap a field and its punctuation in [[...]] to show the section only when every field inside resolves to a non-empty scalar. For example:

{address.road}[[, {address.neighbourhood}]][[, {address.city|address.town|address.village}]]

Without a neighbourhood this produces Canal, Amsterdam; with one it produces Canal, Centre, Amsterdam. Fallback keys work inside optional sections. Missing, blank, null and structured values suppress the section; zero and false count as data. Use separate, non-nested sections for independent fields. The field builder includes a checkbox to insert a conditional comma automatically. Existing literal punctuation remains unchanged, so wrap the relevant parts of existing templates.