Skip to content

5.1 The editor: web and desktop builds

The Tempo editor (also called Tempo’s GUI or the path editor) is one React app in gui/ that ships as a static web site and as a Tauri desktop app. Read this chapter before changing the editor’s build, its platform bridge, the desktop shell, persistence, or the robot code it writes. Screen layout and visual rules are in the GUI design guide and the editor design system.

Source layout

PathOwns
gui/package.jsonLauncher scripts: dev, check, test, build, serve, desktop, icons. Holds the Tauri CLI as a dev dependency.
gui/scripts/build.mjsRuns the web build and assembles gui/dist/ with the license files.
gui/scripts/serve.mjsStatic HTTP server for dist/ on port 8080 (PORT overrides), with application/wasm typing.
gui/scripts/desktop.mjsTauri CLI launcher that sets TAURI_APP_PATH and TAURI_FRONTEND_PATH.
gui/scripts/generateIcons.mjsRegenerates desktop/icons/ from assets/brand/tempoIcon.svg.
gui/web/The React app: src/, Vitest tests, browser scripts, vite.config.ts, vendordepsPlugin.ts.
gui/desktop/The Tauri shell, a separate Cargo package (tempo-path-editor) with its own Cargo.lock.
gui/wasm/web/The generated planner package (wasm.js, wasm_bg.wasm). Ignored by git.
gui/dist/The assembled bundle that both targets serve. Ignored by git.

What code sync does for a team is on the Export robot code docs page. The editor README, gui/README.md, covers robot constants.

What each web/src folder owns

Paths are relative to gui/web/src/.

FolderOwns
main.tsxEntry. Initializes the main-thread wasm module, then loads bootstrap.tsx (the workspace) or tutorial/bootstrap (a practice frame, ?practice=1).
bootstrap.tsxDisplay and zoom setup, workspace import recovery, the planner worker, store hydration in a fixed order, and the React mount.
app/App, AppShell, EditorShell, the router (router.ts, screen persistence), quick switch, leave guards, recent documents.
features/One folder per area: paths, autos, poses, packs, robot, robotCode, home, bindings, settings, colors, keybinds, sync, updates. Each keeps its screens, store, domain helpers, tests and styles together.
canvas/Field drawing and input shared by the path, auto, pose and pack canvases: field/, input/ (hit tests, drags, snapping), path/ (trajectory, playback, event art), robot/ (footprint and swerve art), view/ (camera, viewport, field key).
components/Shared primitives (Button, Icon, InfoHint) and the form, layout, navigation, outline, inspector, panel, math and code groups.
code/Source generation and parsing shared by every feature: codegen.ts, emit.ts, autoIr.ts, the readers lowerComposer.ts and lowerSetlist.ts, dialect.ts, wpilibNames.ts.
planner/The wasm worker (plannerWorker.ts), its client (WasmWorkerBackend.ts), request builders, preview scheduling and caches, coreAuthoring.ts.
workspace/Persistence (persist.ts), the workspace file (workspace.ts, workspaceIo.ts), the project store, undo history, hydration, and the activity realm (activity.ts).
platform/Everything that differs between browser and desktop: tauriBridge.ts, projectPicker.ts, saveFile.ts, uiZoom.ts, displayColor.ts.
tutorial/The guided course: lessons, the coach, goals, the practice workspace and the practice robot project.
units/Display units, quantity parsing, and the storage precision applied to documents (documentPrecision.ts, precision.ts).
vocabulary/The two name sets (code names and Simple names) chosen in App Settings.
styles/tokens.css, primitives.css, themes and fonts. scripts/check-css-layers.mjs checks the cascade layers of the built CSS.
icons/SVG icons and their index.
test/Vitest setup and shared test helpers (setup.ts, paths.ts, fakeDesktop.ts, stubToolchains.ts).

The planner: one wasm build for both targets

The editor plans with the Rust core compiled to WebAssembly from rust/wasm. The Tauri shell does not link tempo-core and the desktop app runs the same worker inside its webview, so browser and desktop previews come from identical code. planner/createPlanner.ts states the rule in its comment.

Building the package

rust/wasm is its own Cargo workspace (an empty [workspace] in rust/wasm/Cargo.toml) that depends on tempo-core by path, and its release profile uses opt-level = "s", LTO and panic = "abort". Build it from the repository root with Rust 1.97.1, the wasm32-unknown-unknown target and wasm-pack 0.15.0:

Shell
wasm-pack build rust/wasm --target web \
  --out-dir "$PWD/gui/wasm/web" --release -- --locked

scripts/build.mjs refuses to run when gui/wasm/web/wasm.js is missing. Rebuild the package after any change under rust/core or rust/wasm because a stale package plans with old code.

The production package is built without the conformance feature, and planner/wasmPackage.test.ts fails if conformance_source_fingerprint is exported so a package built with that feature is caught. The fingerprint and its inputs are described in Pins and API surfaces. The wasm gate runs fmt, clippy and the crate’s tests (with and without conformance), builds web and nodejs packages, and runs rust/wasm/tests/wasmPreviewParity.mjs against a native dump from the preview_parity test (Building and testing).

Loading it

Vite resolves @pkg to gui/wasm/web (web/vite.config.ts). The module is initialized twice:

  1. main.tsx calls init({ module_or_path: wasmUrl }) on the main thread before any store loads. Synchronous queries then use that instance (authoring_query through planner/coreAuthoring.ts and route_join_query in features/autos/flowJoins.ts), and a failed init renders a reload prompt.
  2. WasmWorkerBackend starts plannerWorker.ts as a module worker, and the worker initializes its own instance through retryingBoot, which drops a failed start so the next request retries. It handles the ops plan, pack, packLoad, planRouted and warmUp, using PackHandle, plan_preview_with_waypoints, plan_preview_routed_with_waypoints, parse_pack and start_routed_preview.

Routed previews run in bounded steps (RoutedPreviewJob.step), so a cancel can take effect between steps. bootstrap.tsx warms the worker after first paint when the project has no paths. The worker needs no SharedArrayBuffer, so the web host needs no COOP/COEP headers.

In Vitest, test/setup.ts loads wasm_bg.wasm with initSync, so unit tests plan with the real package and fail when it is missing.

State, persistence and the workspace file

Each area keeps a zustand store (useProjectStore, useRobotStore, usePackStore, usePoseStore, useBindingsStore, useSettingsStore, useColorStore, useKeybindStore). bootstrap.tsx hydrates them in this order: robot, colors, settings, code tracking, keybinds, project, packs, bindings, poses. Poses come after paths because older projects convert linked waypoints into poses. Undo history is a snapshot stack per document store (workspace/history.ts, HISTORY_LIMIT = 100), and the pack editor keeps its own snapshot history of 80 entries (features/packs/packEditorStore.ts).

workspace/persist.ts writes every record twice:

  • Browser storage: localStorage under a dotted key such as tempo.paths.v2.
  • Desktop file: when isTauri(), the same JSON goes to a file such as tempo-paths-v2.json through the write_file command. A relative name resolves under the app data directory (resolve_path in desktop/src/lib.rs), which refuses .., roots and drive prefixes.

On load, the desktop file wins and localStorage is the fallback. persistChecked writes the desktop file before the browser copy, and loadPersistedChecked refuses to replace a file that exists but cannot be parsed. File writes are queued in order (writeOrdered).

RecordKeyDesktop file
Pathstempo.paths.v2tempo-paths-v2.json
Autostempo.autos.v2tempo-autos-v2.json
Folderstempo.folders.v1tempo-folders-v1.json
Robottempo.robot.v3tempo-robot-v3.json
Game packs and active packtempo.packs.v3, tempo.packs.active.v1tempo-packs-v3.json, tempo-pack-active-v1.json
Posestempo.poses.v1tempo-poses-v1.json
Commands and sensorstempo.bindings.v1tempo-bindings-v1.json
Settingstempo.settings.v2tempo-settings-v2.json
Colors, keybindstempo.colors.v1, tempo.keybinds.v1tempo-colors-v1.json, tempo-keybinds-v1.json
Code trackingtempo.codeTracking.v1tempo-code-tracking-v1.json
Workspace import journaltempo.workspace-import.v1tempo-workspace-import-v1.json

A bumped version suffix comes with a migration from the previous key (for example LEGACY_ROBOT_KEY in features/robot/robotStore.ts).

The open screen is the exception. app/router.ts keeps it in sessionStorage under tempo-screen and writes no desktop file, so a reload returns to the same screen and a newly started app or tab opens on Home.

Workspace files

A workspace file is the portable project. It is WorkspaceBundle in workspace/workspace.ts (format: "tempo-workspace", version: 2) with paths, autos, robot, path limits, bindings, packs, folders, poses and, when code tracking is included, codeTracking. workspaceIo.ts exports it as a download named tempo-workspace-<date>.json and imports a picked file, and both paths work in the browser and in the Tauri webview. An import writes a journal first (WORKSPACE_JOURNAL_KEY), and recoverWorkspaceImport in bootstrap.tsx finishes or reports an interrupted import before anything else hydrates. Saved documents are quantized on load (units/documentPrecision.ts) and the grid is listed in the README’s Authoring section.

Activity realms

workspace/activity.ts holds one of three activities: workspace, suspended or practice. The practice realm (the tutorial frame) never hydrates or persists the workspace, and save and loadPersisted return early outside workspace. A generation counter lets async writes detect that the realm changed under them (workspaceCurrent).

Browser and desktop differences

The same dist/ serves both targets. Vite builds with base: "./", so every asset, worker chunk and wasm URL is relative and the bundle runs from the Tauri asset protocol or any static host. Native features are switched at runtime and never at build time.

The bridge

tauri.conf.json sets app.withGlobalTauri: true, and platform/tauriBridge.ts reads window.__TAURI__.core.invoke. The web app does not import @tauri-apps/api. The bridge exports:

  • desktopHost(): the editor runs in the desktop app, including a practice frame inside it.
  • isTauri(): desktop file features are on. In the practice realm this is true only while a lesson holds a practice project.
  • invoke(cmd, args): forwards to the shell. In the practice realm it reaches the host page’s bridge and allows only PRACTICE_COMMANDS and PRACTICE_SETUP, with any root argument inside the practice folder.
  • writeFile, readFile, openExternalUrl.

platform/uiZoom.ts and platform/displayColor.ts read window.__TAURI__ directly, outside the practice guard, because zoom and display colour are device settings.

Feature table

Every runtime branch on isTauri(), desktopHost() or window.__TAURI__ outside tests falls under one of these rows (paths relative to gui/web/src/).

FeatureBrowserDesktopSource
Workspace persistencelocalStorage onlyJSON files in the app data directory, localStorage as recovery copyworkspace/persist.ts, app/router.ts (persistScreen)
Saving generated code from a Code viewDownloadWritten into the configured code folderplatform/saveFile.ts
Choosing the robot folder and autos fileFile System Access API (showDirectoryPicker, showOpenFilePicker); the folder handle is kept in IndexedDB tempo-project-picker; unavailable browsers get an errorNative dialog through pick_codebase_path, absolute pathsplatform/projectPicker.ts
Robot Code page: write, Live update, setup guide, Gradle and vendordep offersShows generated files to copyReads and writes project files, offers the setup guide once with no folder setfeatures/robotCode/RobotCodeScreen.tsx, codeProject.ts, projectSync.ts, projectFacts.ts
Code sync and read-back of edits made outside TempoOff (“Writing robot code requires the desktop app.”)Onfeatures/sync/codeSync.ts, features/sync/liveUpdate.ts, features/robotCode/readBack.ts
Existing definitions in the autos fileNoneRead from the configured filecode/useExistingDefinitions.ts
Command and sensor discovery from robot codeOffScans the project in the workspace realmfeatures/bindings/BindingDiscovery.tsx
Robot constants fileSection hiddenReads connected Java, Python or C++ constants files and refreshes bound propertiesfeatures/robot/RobotConstants.tsx, features/robot/constantStore.ts, features/robot/RobotConfig.tsx
Deploying the game pack into the robot projectOffCompares and writes game.toml in the deploy folderfeatures/packs/deployPack.tsx
Update checkNoneStartup check unless App Settings turns it off; Updates section in General settingsfeatures/updates/updateCheck.ts, features/settings/GeneralSettings.tsx
Donation linkNormal link in a new tabOpened in the system browser through open_external_urlapp/AppShell.tsx (DonateLink)
Robot-project lessonNot listedListed; uses a practice robot projecttutorial/lessons.ts (lessonAvailable), tutorial/TutorialHost.tsx, bootstrap.tsx
Page zoom (Ctrl/Cmd with =, -, 0, wheel)The browser’s own zoomStepped through Chromium’s levels and stored by the shellplatform/uiZoom.ts, desktop/src/zoom.rs
Colour match with the browserNothingRoot filter applied when the shell sets browserColorFilterplatform/displayColor.ts, desktop/src/display_facts.rs

Workspace import and export, game-pack files and every authoring screen work the same on both targets. “Deploy” in the editor means writing the game pack into the robot project’s deploy folder, and the editor does not run a robot deploy.

The desktop shell

desktop/src/main.rs calls app_lib::run() and selects the Windows GUI subsystem in release builds. desktop/src/lib.rs builds the app:

  1. On Linux, sets WEBKIT_DISABLE_DMABUF_RENDERER=1 unless already set, then picks the GDK backend and GTK theme (linux_display.rs).
  2. Registers tauri_plugin_dialog and tauri_plugin_updater, and the managed state PracticeProject and PendingUpdate.
  3. In setup, removes stale practice folders, creates the main window from its config entry ("create": false in tauri.conf.json), restores zoom, and adds tauri_plugin_log in debug builds.
  4. On exit, drops the practice project.

create_main_window probes the Wayland compositor (wayland_surface.rs), chooses server-side decorations on KWin, and injects window.__TEMPO_DISPLAY__ before page scripts run. build.rs exports four display symbols from the Linux executable for WebKitGTK (display_link.rs).

The app identifier is org.tempofrc.patheditor, the executable name is the Cargo package name tempo-path-editor, and the window is 1280x820 titled “Tempo Path Editor”. The CSP is null.

Commands

editor_commands! in lib.rs lists every command once, and the same list feeds tauri::generate_handler and the test every_registered_command_is_reachable_from_the_main_webview, which fails if a command is missing from the ACL. Permissions are in desktop/permissions/editor.toml (allow-editor-commands, allow-open-external-url) and granted by desktop/capabilities/default.json and donate.json to the main window.

CommandModulePurpose
write_file, read_filelib.rsPersistence files (relative names under app data) and absolute-path saves
read_code_file, write_code_file, create_code_filecode_sync.rsRead and write a source file under a robot folder
list_code_files, list_folder_entriescode_sync.rsList sources by extension, list a folder to a depth
list_code_backups, read_code_backup, restore_code_backupcode_sync.rsBackups kept by changed writes
read_deploy_pack, write_deploy_packcode_sync.rsgame.toml in src/main/deploy/tempo/ (Gradle) or deploy/tempo/ (RobotPy, python: true)
pick_codebase_pathpath_picker.rsNative folder or file dialog; expands ~
set_practice_lesson, create_practice_project, remove_practice_project, pick_practice_folder, open_practice_filepractice_project.rsThe tutorial’s practice robot project
open_external_urlexternal_link.rsOpens one of two allow-listed HTTPS URLs (the donation page and the releases page)
ui_zoom, set_ui_zoomzoom.rsZoom level stored in ui-zoom.json
display_factsdisplay_facts.rsWhether the page applies the colour filter
check_update, install_updateupdater.rsRelease updates
smoke_reportlib.rsVerdict from the CI launch probe

The code-sync commands share one set of rules. A root must be absolute, a source path must be relative with no .., and the canonical file must stay inside the canonical root (resolve_source). write_code_file takes expected_contents and refuses when the file on disk differs, so an edit made outside Tempo is never overwritten silently. Writes go through a temporary file and a rename, files above 4 MiB are refused (MAX_SOURCE_BYTES), a global WRITE_LOCK serializes them, and each changed write keeps a backup under code-sync/backups/ in the app data directory, three per file (KEPT_BACKUPS). create_code_file never replaces an existing file.

While a practice project exists, guard_root and guard_write confine every robot-file command, write_file with an absolute path included, to the practice folder, and backups go to .tempo-backups inside it. test/fakeDesktop.ts reproduces these rules for Vitest.

The updater

plugins.updater in desktop/tauri.conf.json holds the minisign public key (pubkey) and one endpoint, https://github.com/TempoFRC/Tempo/releases/latest/download/latest.json. bundle.createUpdaterArtifacts: true makes the build emit a .sig beside each bundle and, on macOS, the .app.tar.gz the updater installs.

desktop/src/updater.rs:

  • check_update returns None in debug builds, whose version is the placeholder 0.1.0. Otherwise it asks the plugin and reports { version, installs }.
  • installs is true only for copies the updater replaces in place: the NSIS install (an uninstall.exe beside the exe), an AppImage ($APPIMAGE set), and the macOS .app. The portable exe and the .deb report the version and the page links to the releases page.
  • install_update downloads, verifies, installs and restarts.

The page side is features/updates/updateCheck.ts (one check per launch, skipped in the browser, in practice frames and when checkUpdates is off) and UpdateNotice.tsx.

Signing uses the repository secrets TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PASSWORD. scripts/desktop.mjs checks for the key on build, and without it prints a notice and passes --config {"bundle":{"createUpdaterArtifacts":false}}, so a local build still bundles but unsigned. A release build fails without the key.

Commands for development and testing

The prerequisites are Node 24 (.node-version), Python 3 (vite.config.ts runs tools/packs/sync-bundled-pack.py on every start to regenerate features/packs/bundledData.ts), the wasm toolchain above, and for desktop work the platform’s Tauri system packages.

TaskCommand (from gui unless noted)
Installnpm ci && npm ci --prefix web
Dev server, browsernpm run dev (Vite on port 1420, strict)
Dev window, desktopnpm run desktop -- dev (runs scripts/build.mjs first)
Type-checknpm run check
Unit testsnpm test (Vitest, jsdom)
Production bundlenpm run build (needs wasm/web/), then npm run serve
Desktop bundlenpm run desktop -- build
Desktop iconsnpm run icons
Shell unit tests (no workflow runs them)cargo test --manifest-path gui/desktop/Cargo.toml (repository root)

web/package.json’s build runs tsc -b, vite build with two inputs (index.html and tutorial.html), and scripts/check-css-layers.mjs. scripts/build.mjs then copies web/dist to dist/ and adds LICENSES/LICENSE-MIT, LICENSE-APACHE and core-math.txt. The desktop bundle carries the same three files through bundle.resources.

Browser tests

The scripts in web/tests/ and web/scripts/ drive Chromium against a running editor, through playwright-core or the module named by TEMPO_PLAYWRIGHT_MODULE. No workflow runs them.

ScriptChecksMain variables
tests/editor.ui.mjs (npm run test:ui in web/)Authoring flows across screensTEMPO_EDITOR_URL, TEMPO_EDITOR_CHROMIUM_PATH, TEMPO_EDITOR_SCREENSHOTS
tests/units.ui.mjsUnits columns at desktop and phone widthssame
tests/biasDrag.ui.mjs, tests/waypointDrag.ui.mjsDrags at frame pace and at 1 kHz; replans while draggingTEMPO_EDITOR_URL, TEMPO_EDITOR_BROWSER=webkit for the waypoint drag
scripts/tutorial-novice.mjs and the other tutorial-*.mjsThe guided course end to endTEMPO_TUTORIAL_URL, TEMPO_CHROMIUM_EXECUTABLE
scripts/flash-timing-browser.mjs, code-view-play-browser.mjs, code-resume-browser.mjsCommand flash timing, Code view playback, code resumeTEMPO_EDITOR_URL or TEMPO_TUTORIAL_URL

Desktop smoke test

With TEMPO_SMOKE_TEST set, the shell injects a probe after page load that waits up to 15 s for #root to gain a child and reports through smoke_report. The exit codes are 0 for rendered, 1 for loaded but nothing mounted, and 2 for nothing loaded before the watchdog (TEMPO_SMOKE_TIMEOUT_MS, default 60000). TEMPO_SMOKE_LOG appends the verdict to a file, which Windows release builds need because they have no console. Without the variable the probe and smoke_report do nothing.

Desktop bundles

npm run desktop -- build (from gui) builds the host platform’s bundles (bundle.targets: "all"). The editor gate in front of a bundle build is the release wasm, scripts/build.mjs, npx tsc --noEmit and Vitest with TEMPO_CORE set to the checkout, where setlistApiParity.test.ts and facingParity.test.ts must run without skips. A release build stamps the version through --config and gives the MSI the numeric part only.

OSBundlesLaunch check
Linux.deb, .rpm, AppImage, built on Ubuntu 22.04 for its glibc and WebKitGTK floorAppImage with --appimage-extract-and-run and the installed .deb under Xvfb
WindowsMSI, NSIS -setup.exe, plus the bare exe as portableSilent MSI install, then the installed and portable exes
macOS.app, .dmg, .app.tar.gz with --target universal-apple-darwinDMG mounted, lipo checks both slices, the arm64 slice runs

The AppImage and the host’s Wayland libraries

linuxdeploy’s GTK plugin copies the build host’s libwayland-* into the AppImage’s usr/lib. A user’s Mesa EGL driver then loads against that copy. Ubuntu 22.04 ships libwayland 1.20 and Mesa 26 (Ubuntu 26.04) needs wl_display_create_queue_with_name from 1.23, so the driver fails to load and WebKit aborts with Could not create default EGL display: EGL_BAD_PARAMETER before the page loads. On 2026-11-04 the 1.0.0-rc.1.post27 AppImage failed this way in an ubuntu:26.04 container both under Xvfb and on an AMD GPU (radeonsi, headless weston with Xwayland). Without the bundled libwayland-* it opened in both, and under Xvfb on Ubuntu 22.04.

A release AppImage has those libraries removed after tauri build: the squashfs is repacked behind the original AppImage runtime with the original compression, and the updater .sig is written again with tauri signer sign. Every desktop that runs GTK 3 has libwayland-client, so the host copy is always present.

macOS signing is ad hoc (signingIdentity: "-"), so a downloaded app may need approval in System Settings > Privacy & Security.

Robot code generation

The editor writes Java, Python and C++ for WPILib 2026 or 2027, chosen on the Robot Code page (settings.defaultLang, settings.wpilibYear, DEFAULT_WPILIB_YEAR = "2026").

OutputGenerator
A path’s Composer chaingeneratePathCode and genComposerExpr in code/codegen.ts
An auto’s Setlist definitionsbuildAutoCodegenIr (code/autoIr.ts) -> generateRoutineSource in code/codegen.ts
One document with its regions, for Code viewsemitDocumentCode in code/emit.ts
Robot configuration and the setup filefeatures/robot/code/robotCodegen.ts, robotSetupCode.ts; setupFileSource in features/robotCode/projectFiles.ts
The configure call shown to copyconfigureSnippet in features/robotCode/configureCall.ts
Poses classposeConstants, posesFile in features/poses/PoseCodeMode.tsx
Autos file and project filesautosFileCode in features/sync/syncPayload.ts; robotProjectFiles in features/robotCode/projectFiles.ts; workspaceRobotFiles in features/robotCode/workspaceFiles.ts

Year differences are in code/wpilibNames.ts, keyed by 2026 names, and its Java table matches java/wpilib2027Imports.tsv. Python for 2027 imports every wpimath class from wpimath and writes snake_case members (PYTHON_MEMBERS). A connected project whose pyproject.toml pins RobotPy 2027.0.0a6 or earlier keeps camelCase (robotpyNames, fed by projectFacts.ts). A generated autos class takes every robot-code name its body uses as a constructor or factory parameter (features/robotCode/autosClass.ts). Those are Library’s commands and sensors, and the typedNames of the sync payload (the typed End when names and the waypoint commands Library does not list). Generation refusals are GenerationIssues (code/generation.ts) and path checks are collected in features/paths/pathChecks.ts.

Code is also read back. lowerComposer.ts and lowerSetlist.ts parse the emitted subset back into documents, and dialect.ts maps every language’s spelling to one vocabulary. Code mode and desktop read-back depend on this round trip, and the draft-hold rules are in GUI design: Code surfaces. How commands and sensors get their code names is in ending early and robot actions.

Tests against the bindings

test/paths.ts sets repoRoot to TEMPO_CORE or the repository root. Most of these tests read the real binding sources or the shared fixtures through it:

  • code/setlistApiParity.test.ts: every Setlist method an emitter can produce is declared in the Java, Python and C++ wrapper sources.
  • planner/facingParity.test.ts: routed wasm previews keep a face-point heading aimed at its target. It reads only the planner package, and the CI parity guard requires it to run.
  • features/robot/code/modulePresetParity.test.ts: the Robot screen’s swerve presets and wheel treads against tests/fixtures/api/swerveModules.json, the table the bindings check too, and the gear enums in SwerveModules.java, swerve_modules.py and SwerveModules.h.
  • features/autos/flowJoins.test.ts: tests/fixtures/sequencing/routeJoins.json, the connecting-drive decisions the bindings share.
  • code/autoCommands.test.ts: refusals in the words of tests/fixtures/api/setlistMessages.json.
  • Others read tests/fixtures/api/bias.json, rotationLocks.json, setlistLinks.json, fractionBasis.json, mirroredHeadings.json, defaultAngularLimits.json, routeBounds.json, driveModel.json and authoringRefusals.json.
  • code/exportParity.test.ts: recorded hashes of generated source per language and year.
  • code/speedPresets.runtime.test.ts: builds cpp/build/libtempo.a with CMake and compares preset limits with the runtime’s.
  • features/robot/motorModels.test.ts: the motor table in features/robot/deriveConstraints.ts has WPILib’s DCMotor values of every release in tests/fixtures/api/motorPresets.json. A stated 12 V speed uses the models of the connected project’s GradleRIO or RobotPy version (projectDriveMotor), and the alpha-8 Kraken X60 models apply only to a project on alpha-8 or later.
  • features/robotCode/robotProjectBuild.test.ts: fuzzed projects pasted into skeleton robot projects and built with javac, g++ or clang++, and python3. A missing toolchain skips its language (test/stubToolchains.ts). The Tempo and WPILib names are stand-ins, so the build fails on placement and on a name robot code never declared, not on a wrong API call. The 2027 Python stand-in has only the modules, wpimath names and class members of test/robotpy2027Names.json.
  • code/robotpyNames.test.ts: every Python file generated for 2027 imports and calls only names in test/robotpy2027Names.json, for each recorded RobotPy release. web/scripts/record-robotpy-names.py prints one release’s entry from an installed RobotPy, and a new alpha is recorded with it.
  • features/robotCode/autosClass.test.ts: the generated autos class declares every command and condition name its body passes.
  • code/wpilibCppHeaders.test.ts: compiles generated C++ against real WPILib headers when TEMPO_WPILIB_CPP_HEADERS_2026 or _2027 is set (frontend checks).

web/scripts/reserved-names.mjs regenerates features/bindings/reservedNames.generated.ts from the API surface files tests/fixtures/api/{java,python,cpp}.txt and Python’s keywords, and reservedNames.test.ts fails when the two disagree. A binding rename that the editor emits fails editor tests, so the emitter and the reader get fixed in the same change.

Vendordep descriptors in the build

web/vendordepsPlugin.ts serves virtual:tempo-vendordeps. It reads tempoBaseVersion, tempoVendordepUuid and the wpilib2027Bundles rows from java/build.gradle, then loads matching descriptors from java/dist/vendordep*/ (TEMPO_VENDORDEP_DIST overrides the folder). A descriptor whose file name, uuid or version disagrees is left out with a build warning. The robotpy-tempo version comes from python/pyproject.toml, TEMPO_WHEEL_VERSION, or python/dist-wheels/VERSION. features/robotCode/vendordep.ts uses them to add a vendordep or the robotpy-tempo requirement to a project.

The guided course

Home > Learn opens the course in a practice frame (main.tsx with ?practice=1) that never touches the workspace. The robot-project lesson exists only on desktop, where create_practice_project makes a throwaway robot project under the app cache directory (practice-projects/) and every file command is confined to it. The step model, practice workspace, session boundary and the tutorial-novice.mjs validation are in the guided editor course, and the lesson map is in the curriculum.

esc

Loading search...