Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .claude/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
"cwd": "builder/web",
"port": 5173
},
{
"name": "web-builder-desktop",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev", "--", "--mode", "desktop", "--port", "5173"],
"cwd": "builder/web",
"port": 5173
},
{
"name": "data-page",
"runtimeExecutable": "tools/obc",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bake.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Bake

# Build catalog cells once, centrally, so the website and desktop app can select,
# download, and assemble the same verified inputs.
# Build catalog cells once, centrally, so the website can select, download, and
# assemble the same verified inputs.
#
# ── READ THIS BEFORE ADDING A COUNTRY TO THE MATRIX ────────────────────────────────
#
Expand Down
165 changes: 6 additions & 159 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ name: CI
# board crate; its job adds a flash-size guard against the 32 KB slot.
# * obc-builder-bridge is a workspace library and the builder's shared WASM core.
# The wasm-bridges job gates its production size and hands the same bytes to frontend jobs.
# * obc-desktop (#906) is the third excluded + standalone crate: a Tauri app, so it brings a
# platform webview with it (WebKitGTK on Linux) and would otherwise put those headers in
# every renderer test's way. The shell embeds the frontend, so both halves are built there.
# The planner artifact verifier also needs the locked Node reader dependencies.
# It is the only **three-OS matrix** in this file because it is the artifact a user installs.
# * `--locked` everywhere so a stale Cargo.lock (any of the four) fails CI.
# * `--locked` everywhere so a stale Cargo.lock (any of them) fails CI.

on:
workflow_call:
Expand Down Expand Up @@ -208,9 +203,6 @@ jobs:
echo "::group::obc-boot (workspace-excluded)"
cargo fmt --check --manifest-path firmware/obc-boot/Cargo.toml || rc=1
echo "::endgroup::"
echo "::group::obc-desktop (workspace-excluded)"
cargo fmt --check --manifest-path builder/desktop/Cargo.toml || rc=1
echo "::endgroup::"
exit $rc

# Blocking clippy on the host workspace: -D warnings from day one (the baseline is clean).
Expand Down Expand Up @@ -673,10 +665,6 @@ jobs:
run: cargo deny --manifest-path firmware/obc-boot/Cargo.toml --all-features --config tools/licenses/deny.toml check
- name: cargo-deny (obc-sensor-sim)
run: cargo deny --manifest-path firmware/obc-sensor-sim/Cargo.toml --all-features --config tools/licenses/deny.toml check
# The desktop shell is the one artifact a *user* installs, so its tree is the
# one where a bad licence or a live advisory matters most.
- name: cargo-deny (obc-desktop app)
run: cargo deny --manifest-path builder/desktop/Cargo.toml --all-features --config tools/licenses/deny.toml check
# deny.toml skips the repository's own crates, so it cannot see obc-data reach one.
- name: obc-data depends on no GPL crate
run: python3 tools/check_obc_data_licence.py
Expand Down Expand Up @@ -1000,9 +988,8 @@ jobs:

# The web builder's Svelte frontend: type-check, unit tests, production builds.
#
# One source tree, three hosts (#895): `npm run build` is the local FastAPI one,
# `build:web` the static hosted site and `build:desktop` the Tauri shell. All three
# are built here — a host that stops compiling is otherwise invisible until someone
# One source tree, two hosts: `npm run build` is the local FastAPI one and
# `build:web` the static hosted site. Both are built here — a host that stops compiling is otherwise invisible until someone
# tries to ship it. The *contents* of the web bundle (no job polling, no style
# editor) are asserted by vitest, which builds and inspects the emitted chunks.
#
Expand All @@ -1029,8 +1016,7 @@ jobs:
with:
name: obc-builder-bridge-pkg
path: builder/web/src/lib/core/pkg
# The device the USB suites run against. The desktop-frontend job does not download it: that
# job only builds the shipped bundle, which must not contain this package at all.
# The device the USB suites run against. The shipped bundle must not contain this package.
- uses: actions/download-artifact@v4
with:
name: obc-flat-device-pkg
Expand All @@ -1048,7 +1034,7 @@ jobs:
run: |
rm -f "$RUNNER_TEMP/web-builder-junit.xml"
npm run test:components -- --reporter=default --reporter=junit --outputFile="$RUNNER_TEMP/web-builder-junit.xml"
- name: production builds (dev + web + desktop hosts)
- name: production builds (dev + web hosts)
run: npm run build:all
# naga is the WGSL front end of Firefox; Chrome's Tint compiles the same files in the TrailView smoke.
- name: Cache the WGSL validator
Expand Down Expand Up @@ -1133,145 +1119,6 @@ jobs:
path: .artifacts/web-builder/
if-no-files-found: error

desktop-frontend:
needs: [selection, wasm-bridges]
if: contains(fromJSON(needs.selection.outputs.jobs), 'desktop-frontend')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions/download-artifact@v4
with:
name: obc-builder-bridge-pkg
path: builder/web/src/lib/core/pkg
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: builder/web/package-lock.json
- name: Build the desktop bundle
working-directory: builder/web
run: |
npm ci
npm run build:desktop
- uses: actions/upload-artifact@v4
with:
name: obc-desktop-frontend
path: builder/web/dist/desktop
retention-days: 1

desktop:
needs: [selection, desktop-frontend]
if: contains(fromJSON(needs.selection.outputs.jobs), 'desktop')
runs-on: ${{ matrix.os }}
env:
# Baked into packaged apps; a runtime variable can still override it for a
# maintainer testing an unpublished tree.
OBC_CATALOG_URL: ${{ vars.OBC_CATALOG_URL }}
strategy:
# One platform's failure must not hide another's.
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
slug: linux-x86_64
exe: obc-desktop
- os: macos-latest
slug: macos-arm64
exe: obc-desktop
- os: windows-latest
slug: windows-x86_64-msvc
exe: obc-desktop.exe
defaults:
run:
# Git Bash on the Windows runner, so the shared steps below are one script
# rather than three. Nothing here needs a Windows-native shell.
shell: bash
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source_sha || github.sha }}
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
workspaces: builder/desktop
key: desktop-${{ matrix.slug }}
# wry's Linux backend. macOS and Windows need nothing extra — which is most of
# why Tauri was chosen over Electron (#906) — but Linux wants WebKitGTK.
- name: Install the Linux webview deps
if: runner.os == 'Linux'
uses: ./.github/actions/apt-install
with:
packages: libwebkit2gtk-4.1-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libgtk-3-dev librsvg2-dev
# The bundle the shell embeds, built once on Linux by `desktop-frontend` and
# unpacked here. It is byte-identical on all three runners — a Vite build of the
# same sources — so building it per-platform was three runs of `npm ci` and
# three Node toolchains for one output. Landing it at the path tauri.conf.json's
# `frontendDist` names is the whole integration; nothing here runs npm, and the
# `beforeBuildCommand` in that file is never executed (there is no Tauri CLI in
# this repo — see the note above about `custom-protocol`).
- uses: actions/download-artifact@v4
with:
name: obc-desktop-frontend
path: builder/web/dist/desktop
# Order matters. `cargo test` never produces the plain binary — even with
# --all-targets it builds bins as *test harnesses*, a different artifact — so the
# `build` below is a full codegen + link either way. Running it first means the
# normal lib it produces is already there for `test` to link against, instead of
# `test` building one set of artifacts and `build` starting a second.
- name: "obc-desktop: clippy"
working-directory: builder/desktop
run: cargo clippy --release --all-targets --locked -- -D warnings
- name: "obc-desktop: build (release)"
working-directory: builder/desktop
run: cargo build --release --locked
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest@0.9.143
- name: "obc-desktop: test"
id: desktop-tests
working-directory: builder/desktop
env:
NEXTEST_PROFILE: ci
run: |
rm -f target/nextest/ci/junit.xml
cargo nextest run --release --locked --config-file ../../.config/nextest.toml --no-tests fail
- name: Upload native desktop test results
if: ${{ !cancelled() && (steps.desktop-tests.outcome == 'success' || steps.desktop-tests.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: desktop-tests-${{ matrix.slug }}-${{ github.run_attempt }}
path: builder/desktop/target/nextest/ci/junit.xml
if-no-files-found: error
# Recorded so an accidental native dependency or bundling regression is visible.
- name: "obc-desktop: record the artifact size"
working-directory: builder/desktop
run: |
bytes=$(wc -c < "target/release/${{ matrix.exe }}")
echo "| ${{ matrix.slug }} | $bytes bytes |" >> "$GITHUB_STEP_SUMMARY"
- uses: actions/upload-artifact@v4
with:
name: obc-desktop-${{ matrix.slug }}
path: builder/desktop/target/release/${{ matrix.exe }}
retention-days: 7
# macOS ships two architectures and this crate is built on the Apple-silicon
# runner, so cross-build the Intel slice to keep a future universal bundle open.
#
# Push events only: a second target triple is build-only insurance, not a
# correctness gate on the app anyone runs.
- name: "obc-desktop: the macOS Intel slice (build-only)"
if: runner.os == 'macOS' && github.event_name == 'push'
working-directory: builder/desktop
run: |
rustup target add x86_64-apple-darwin
cargo build --release --locked --target x86_64-apple-darwin
file target/x86_64-apple-darwin/release/obc-desktop

planner-search:
needs: selection
if: contains(fromJSON(needs.selection.outputs.jobs), 'planner-search')
Expand Down Expand Up @@ -1333,7 +1180,7 @@ jobs:
# publishes no plan, which fails this gate rather than silently passing.
ci:
if: always()
needs: [selection, guards, cairn, fmt, clippy, test, ui-snapshots, builder-python, embedded, boot, device, deny, wasm, wasm-bridges, docs, ios-unit, ios-app, ios-release, web, web-browser, desktop-frontend, desktop, verification, planner-search]
needs: [selection, guards, cairn, fmt, clippy, test, ui-snapshots, builder-python, embedded, boot, device, deny, wasm, wasm-bridges, docs, ios-unit, ios-app, ios-release, web, web-browser, verification, planner-search]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ jobs:

# VITE_SITE_BASE makes the builder's links to the docs and the landing relative:
# they are siblings inside this artifact, so naming them by absolute URL would be
# the one place a domain move still bit us. Left unset everywhere else (dev
# server, desktop app), where the site genuinely is somewhere else.
# the one place a domain move still bit us. Left unset everywhere else (the dev
# server), where the site genuinely is somewhere else.
- name: Build the static map builder
working-directory: builder/web
env:
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,13 @@ builder/web/test-support/flat-device/pkg/
# virtualenv + the optional local maps drop. The tooling itself (everything in
# tools/ except obc.local) is committed.
tools/obc.local
# Planner tile settings for a local desktop build (see builder/desktop/README.md).
# Local Vite settings of the web builder.
builder/web/.env.local
.venv/
/maps/
# Web builder frontend: dependencies + the Vite build output (CI builds it).
# The dev host builds into builder/server/static/dist/ (what the FastAPI server
# mounts); the static-web and desktop hosts into builder/web/dist/<host>/ — see
# #895. Both entries must keep matching vite.config.ts's outDirs: when they
# mounts); the static-web host into builder/web/dist/web/. Both entries must keep matching vite.config.ts's outDirs: when they
# drifted apart, `npm run build` wrote to an unignored path and 640 KB of bundle
# got committed by accident (and the server mounted nothing).
builder/web/node_modules/
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The goal for this codebase is to make this a robust and extendable open source m

The layout table is in [README.md](README.md#repository-layout). The root Cargo workspace lists
its crates in `Cargo.toml`. Keep device-reachable dependencies in `firmware/`.
The nRF54L board image, the bootloader, the Tauri desktop app and the sensor simulator are standalone Cargo roots; build
The nRF54L board image, the bootloader and the sensor simulator are standalone Cargo roots; build
and test them from their own directories. The nearest README has the surface's setup;
`companion-ios/README.md` is the iOS on-ramp.

Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ members = [
"sim/phone/host",
"sim/desktop",
"sim/web-demo",
# Product bridges. obc-desktop carries its own [workspace].
# Product bridges.
"planner/service",
"builder/wasm",
]
# obc-fw-nrf54l is a standalone board crate (own target + .cargo/config.toml, own empty
# [workspace]); it's built on its own, not as part of this host workspace (which builds its
# members for the host target). obc-boot, obc-desktop and obc-sensor-sim carry their own
# members for the host target). obc-boot and obc-sensor-sim carry their own
# [workspace] tables, which excludes them automatically for the same reason.
exclude = ["firmware/obc-fw-nrf54l"]
resolver = "2"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ over BLE and USB. The custom PCB and enclosure are still under development. KiCa
| `host/` | Host tools, map bakers, fixtures, and test support |
| `planner/` | Router, build tools, service, search, and tile worker |
| `sim/` | Desktop, web and phone simulators, host core, replay, feeder and benchmarks |
| `builder/` | Web and desktop builder, Rust/WASM core, USB transport, presets, and server |
| `builder/` | Web builder, Rust/WASM core, USB transport, presets, and server |
| `companion-ios/` | SwiftUI companion app and shared iOS package |
| `specs/` | Normative binary, wire, and vector contracts |
| `fixtures/` | Scenario registry, source provenance, and fixture builders |
Expand All @@ -159,7 +159,7 @@ over BLE and USB. The custom PCB and enclosure are still under development. KiCa
| `tools/` | The `obc` command, repository tools, and verification console |

`Cargo.toml` lists the root workspace crates. The nRF54L board image,
bootloader, Tauri desktop app, and sensor simulator are standalone Cargo roots. The
bootloader, and sensor simulator are standalone Cargo roots. The
[architecture guide](https://openbikecomputer.com/docs/software/architecture/) explains the boundaries.

## Other open bike computers
Expand Down
6 changes: 3 additions & 3 deletions builder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""The map builder.

`app/` is the Svelte UI, shared by all three of its hosts — the static web
tier, the Tauri desktop app, and the FastAPI dev server in `server/` (see
`app/vite.config.ts`: one frontend, three hosts). None of them packs anything
`app/` is the Svelte UI, shared by its two hosts — the static web tier and
the FastAPI dev server in `server/` (see `app/vite.config.ts`: one frontend,
two hosts). None of them packs anything
itself: they drive the native `obc-pack` packer (`host/obc-pack`) to build
OpenStreetMap extracts into `.obcm` maps for the OBC firmware.

Expand Down
5 changes: 0 additions & 5 deletions builder/desktop/.gitignore

This file was deleted.

Loading
Loading