5.2 GUI app and design guide
Tempo’s React editor authors paths, autos, and game packs. This guide covers
its screens, visual rules, and robot-code workflow. The
capability inventory links implementations and tests and
the editor README has setup commands. Source
paths below are relative to gui/web/ unless stated otherwise.
Scope
The app draws paths on the season field, composes Setlists, configures robot
physics, and edits game packs. Saved poses, command links, and boolean suppliers
are shared across documents. Browser and Tauri desktop use the same
tempo-core planner through a WebAssembly worker.
Preview describes the configured plan, so command bodies and physical tracking are tested in the robot project.
Path and auto titles are editable in the shared header. Enter commits a trimmed nonempty name, Escape cancels, and blur commits. Names participate in document undo/redo without changing IDs or discarding unsaved edits. An invalid active code draft holds renaming and every other edit outside the code until it is repaired (see Code surfaces).
Selected path waypoints and rotation targets have a curved rotation handle outside the bumper footprint. A selected saved waypoint has a handle on a dashed ring outside it. Dragging previews the heading immediately and saves on release. Shift snaps to 15-degree increments and Escape cancels. Each path rotation is one undo step. Face-point targets retain their mode and their aim point rotates around the selected position. Saved-pose rotations update linked paths once on release.
The Avoid zone and Keep-in tools draw a rectangle from the press to the release.
The Speed zone tool covers every leg from the press’s leg to the release’s,
since a speed zone spans whole legs. A click that does not drag places the
tool’s default, a 2 m square or a span around the click. A keep-in goes on the
leg nearest the press, and a drawn one replaces the keep-in that leg had. With
Select, a press near a zone’s center moves it (a move cursor and tooltip mark
the spot). A selected rectangle shows corner and edge grips, a square corner
grips that resize it about its center, and a circle one rim grip for its radius.
A speed zone’s grips sit on its band. The middle moves it a leg at a time
and grips just inside each end set its first or last leg. Pack-zone references
have no grips. Waypoints, rotation targets, their handles and event chips take a
press first. Rectangle corners, edges and moved centers align with waypoints as
a waypoint drag does, with Ctrl or Cmd inverting the snap setting. Shift keeps
the tool and Escape cancels. Each drag is one undo step
(canvas/input/zoneDrag.ts, features/paths/zoneEdits.ts).
Mirroring reflects authored coordinates across the same-alliance field centerline, so a route keeps its alliance. The path header’s action reflects the whole document: waypoints, rotation targets, and zone geometry. Terrain and field-rule references are remapped to their left/right counterparts in the game pack. A reference with no counterpart, or a keep-in that cannot be expressed after reflection, stops the operation and names what is missing. Reflected waypoints that came from a saved waypoint become custom coordinates, so no other path moves. The Position section’s action reflects only the selected waypoints, position and heading. It leaves leg settings and saved waypoints alone. Both are one undo step.
Home cards share current routed plans keyed by path, pack, robot, alliance, and effective extension inputs. The cache key determines route freshness. Autos preview in the first path’s frame. Opposite-alliance paths transform into it without mutating saved paths, and neutral paths stay fixed. Empty cards show the field, and pending or failed plans leave the route hidden.
Auto previews predict Setlist connecting drives from the authored poses by the
rule the robot applies (see wrappers.md). The
core’s route_join_query (rust/wasm/src/lib.rs, over
tempo_core::route_join) compares the next path’s start with the previous
path’s end against the arrival tolerance of that path’s last waypoint, 5 cm and
3 degrees without an Arrive within. It compares headings only where the previous
path ends on a static heading and the next one’s first waypoint names one
(features/autos/flowJoins.ts). A path that misses that tolerance, or that
follows a step with unknown robot position, gets a connecting drive planned in
that path’s alliance and avoid settings at default limits.
Joins carry speed where the robot’s do
(wrappers.md). A path step right after
another in one sequence, with no command between their legs, ends moving where
the query’s flow rule says the core ends it moving (AutoRuntime::flow_into).
Its plan asks for flow_out, the turn cap and the next drive’s request, and
ends at the speed the plans on both sides negotiate. The next path, or the
connecting drive to its start where the route ends past the moving handover
distance, plans from that plan’s exit as its entry. A connecting drive ends
moving into its route the same way. Such plans are keyed by the step
(runPlanKey), the connection (connectorKey), or, for a nested auto’s first
route entered from a drive at one of the places the auto runs, the step at that
place (placedRunKey). They are planned one after another along the chain
(features/autos/flowPlanning.ts), and a placed route’s chain inside the auto
is placed with it. Which steps link is linksAsRouteStep alone, the bindings’
rule (tests/fixtures/api/setlistLinks.json). A link reaches into and out
of nested autos and sequence groups. Whether a crossing’s heading ends a join at
rest is the core’s crossing_heading_stop, which the join query reads from the
legs on both sides. A command before a route’s first leg keeps the drive to its
start from flowing into it, but one before the whole run does not. A join whose
negotiated exit falls to rest gets the drive to the next start the binding’s
test at rest asks for (FlowLink.restConnection). The routes after it plan
from that drive. Joins flow with no game pack too, and their drives plan on the
empty field the routed planner loads then. The first path never connects, and a
nested auto connects at its own step. The step’s row marks every connection. A
connection from a known end is drawn on the field (dashed, or an arc for a turn
in place) and counted in the timeline. One from an unknown pose is neither
drawn nor timed. Gaps do not block export, but mixing flipping and
never-flipping paths remains an error. Both sides of a Check join from where the
robot is when the check runs. The preview goes on from the Yes side. The
connecting drive after a Check that moves the robot is marked predicted
(RouteConnection.predicted). The field image remains visible while game-pack
overlays stay hidden.
The auto page replans a drive when its inputs change: the path in the preview
frame, or a connecting drive’s endpoints and destination settings. Changes to
the planner, robot, pack, preview alliance, or default limits invalidate every
drive, as does Try again (features/autos/planMemo.ts). Failed plans are retried
on the next pass.
An unsaved path can supply its current plan through setLivePlan, and
pushLivePlan transforms it into the preview frame. livePaths also supplies
the edited path so its incoming and outgoing connections follow edits before
autosave. Validation and code generation still read saved paths.
Both pages defer requests to the next task (planner/nextTask.ts), combining
edits made in one task. createPreviewScheduler keeps one active pass and one
waiting pass, and each new request replaces the waiting one. The Paths page also
aborts the active request. Once no callers remain the backend cancels it in
the worker. Routed planning runs in bounded steps (start_routed_preview), so
the worker can read cancellation between steps. Completed groups remain
cached for the next request.
An auto pass submits all drive requests together and commits the results with
one setPlans store update and timeline rebuild. Edits during the pass queue
another pass with the latest inputs. Results for a different auto, alliance
frame, pack, or workspace are discarded. After 5 s a stalled pass releases its
slot. A waiting pass supersedes it, and if none is waiting its results can still
commit when they arrive. The backend stops sharing its pending requests so a
later pass can retry requests the worker never answered.
Dragging a path replans its occurrences with their individual footprints and all
affected connections. The preview and timeline update during the drag, but the
toolbar does not label these passes as updating. WasmWorkerBackend caches up
to 64 routed requests against the loaded pack, pending or completed. Pending
requests can evict completed plans, and failed requests are removed. Repeated
requests share pending work or completed results, including between the path
editor and auto page. Loading a pack clears the cache.
Opening a project with paths warms the worker through its normal plan requests.
For an empty project, warmUp runs after first paint and plans around the
shipped field’s hub using a separate pack handle to warm the planning code.
Planning includes each bumper’s thickness measured from the drivetrain origin. Path and auto previews share those bounds and invalidate cached plans when a side changes. Rounded and chamfered bumper corners use conservative square bounds in the GUI. Invalid frame or bumper dimensions cannot produce a checked preview, and geometry-only previews omit obstacle-clearance checks.
Users
The users are FRC students and mentors using laptops during development and competition. Controls need to remain readable on small screens and usable with a keyboard. Labels must make sense without prior knowledge of Tempo’s APIs.
Primary jobs
- Draw paths and inspect planned motion and preview diagnostics.
- Compose paths and commands into an auto.
- Export generated Java, Python, or C++ source, and use supported Code-mode edits as another authoring surface.
- Share physical robot configuration, named poses, and command and sensor links across documents.
The fixed GUI style uses Inter and the dark/gold palette. The shared editable-color Tempo SVG supplies branding and icons. The docs site also uses Inter, with its own layout and type scale. This guide covers common controls, compact forms, responsive field layouts, and code-highlighting rules.
Runtime and source boundaries
Paths in this table are relative to gui/web/src/.
| Area | Responsibility | Source |
|---|---|---|
| Entry and storage | Recover imports, hydrate stores, initialize the worker, and mount React | main.tsx, workspace/persist.ts, workspace/workspace.ts |
| Planner | Routed path planning through a module worker | planner/WasmWorkerBackend.ts, planner/plannerWorker.ts |
| Feature modules | Screens, document state, validation, and feature-specific source generation | features/paths/, features/autos/, and the other features/ groups |
| Shared source tools | Parse and generate the supported authoring subset; retain code-editing buffers | code/, components/code/ |
| Shared binding registry | Stable command references, migrations, and persistence | features/bindings/, workspace/hydrateBindings.ts |
| Screen patterns | Editor shell, common fields, disclosures, syntax rendering, and outlines | app/EditorShell.tsx, components/, features/bindings/BindingLibrary.tsx |
| Native access | Platform bridge for file reads/writes and project-path selection | platform/; native handlers in gui/desktop/src/ |
The other feature groups are poses, packs, robot, home, bindings,
settings, colors, keybinds, and sync. Each keeps its component tests and
styles beside its implementation. Shared canvases and drawing helpers live in
canvas/ and specialized views remain with their feature. Workspace-wide
persistence and history live in workspace/.
Tauri adds filesystem access to the same frontend. It has no native planner
dependency and keeps its own Cargo manifest and lockfile in
gui/desktop/. The Game Pack editor is part of the React app on both
platforms.
Visual system
Visual values live in tokens.css, themes.ts, and fonts.ts. New screens reuse these tokens and the shared controls. The editor design system says which token, page shape and control to use for what. Space follows the task and viewport, so field screens keep a large readable field while forms stay compact and readable.
Theme
The dark palette is the GUI’s style, independent of the configured robot team number, and the font is fixed. App Settings -> Appearance -> Colors picks the colours the palette uses for meaning, from a preset or a custom theme (see Colour themes). The tables below give the Default theme’s values.
The shared Tempo SVG supplies GUI branding
and the favicon. TempoIcon renders it inline with editable color
variables. The desktop icon generator uses the same asset. Home branding reads
Tempo, the mark, then GUI. The docs site shares the mark, Inter font, and
dark/gold palette.
Color tokens
| Role | Token | Value |
|---|---|---|
| App background / canvas void | --tempo-bg | #0d0d0d |
| Deepest (canvas, code wells) | --tempo-bg-deep | #0b0b0b |
| Chrome (header, sidebar, panels) | --tempo-panel | #161616 |
| Controls at rest | --tempo-panel-2 | #1d1d1d |
| Hover surface | --tempo-panel-3 | #222222 |
| Cards / elevated | --tempo-surface | #141414 |
| Hairline borders | --tempo-line | #2a2a2a |
| Border on hover | --tempo-line-hi | #3a3a3a |
| Headings / primary labels | --tempo-white | #efefef |
| Body text | --tempo-ink | #d4d4d4 |
| Secondary text | --tempo-muted | #8f8f8f |
| Disabled / placeholder | --tempo-faint | #5c5c5c |
| Accent (selection, active, primary) | --tempo-accent | #ffc544 |
| Accent hover | --tempo-accent-hi | #ffd97a |
| Accent tint background | --tempo-accent-dim | #3d2e00 |
| Ink on accent fills | --tempo-on-accent | #1a1205 |
Gold identifies primary actions, current selection, active navigation, and focus. Other controls and labels use neutral colors.
Semantic hues
Hues encode data and are not decorative.
| Hue | Token | Meaning on the field/UI |
|---|---|---|
Blue #4a90d9 | --tempo-blue | planned trajectory, zones, info, alliance blue |
Orange #e8834a | --tempo-orange | robot footprint, terrain, warning |
Green #4caf7d | --tempo-green | success, game pieces, valid |
Red #cf6679 | --tempo-red | obstacle, error, danger, alliance red |
Purple #9b72cf | --tempo-purple | command markers, events |
Teal #2dd4bf | --tempo-teal | rotation targets, reference points |
Colour themes
A theme names 19 colours (features/colors/palette.ts):
- the seven meaning colours: planned route, robot, success, obstacles and errors, commands, rotation targets, and selection and accent
- the four step colours and the neutral of a step that does not drive
- both alliances, the path start and end marks, and text, secondary text and borders
theme.ts resolves the shades drawn from them: the accent’s hover, dim backing
and ink, the command marker, avoid zones, the alliance toggles, the speed scale
(obstacle, robot, selection and success from stopped to full speed), a saved
waypoint’s outline, the Robot Configuration diagram’s bumpers (the red alliance
colour), the route under the Key’s command samples, and the scrollbar thumb. A
shade whose source keeps its Default value keeps the editor’s own literal, so
Default resolves to exactly the colours in the tables above. Labels drawn on the
fields, in the Key and on the robot diagram use their own ink colors when text
and secondary text have their Default values. Otherwise those labels use the
theme’s text colors (labelInk, quietInk). Neutral greys (surfaces, casings,
badges and field lines) are not themed.
--tempo-faint (2.7:1 on the panel) is for disabled controls and placeholders.
Text that carries a reading, such as the playback clock and the Commands group
counts, uses secondary text, which keeps 4.5:1 in every preset
(styles/smallText.test.ts).
-
applyThemeCsswrites the theme’s tokens on the document, but Default writes only the accent and leaves the rest totokens.cssandscrollbars.css. -
Drawing code reads
activeTheme(). Every cached canvas layer (the field, the path field’s route layer and auto underlay, the auto field’s drives layer) lists the theme in its redraw key.canvas/themeSwitch.test.tsxchecks that a theme chosen with a field open draws what a fresh load in that theme draws. React surfaces readuseTheme(). A memo or effect that draws colours, such as the timeline’s step styles and the Game Packs thumbnails, lists the theme among its inputs. -
The presets are Default, Deuteranopia, Protanopia, Tritanopia and High contrast.
presetRules.test.tschecks each one as its own colour vision and normal vision see it (Machado 2009 simulation, CIEDE2000):- meaning colours 12 apart, and 12 from the step colours
- step colours and the neutral 15 apart
- step colours 25 degrees of hue and 15 from every meaning colour in normal
vision, the rules
stepStyle.test.tsholds the Default palette to - alliances and path ends 20 apart, the ends 12 from the route, selection and rotation colours
- every colour 3:1 on the field, and secondary text 4.5:1 on panels
High contrast also raises text, secondary text and borders. Protanopia’s accent is amber (
#f1ac0b) because with the gold kept its meaning colours came no closer than 10.7 apart. -
Custom themes start from any preset and save as they are edited. The Colors tab shows a preview (a route by speed with its marks, zones on the alliance halves, three steps with one selected, and a button with text) and lists the pairs that fall under the preset rules, for the base preset’s colour vision and normal vision. A hex field takes
#rgbor#rrggbb, with or without the#. Escape in the editor goes back to the list as Back to themes does, keeping a typed name or colour, and leaves App Settings open. Escape in a Delete confirmation cancels it. Focus moves to the control that takes the place of one that goes away: the confirmation’s Cancel, Delete again, the chosen theme after a delete, or a colour’s hex field after its reset. Export writes{ tempoColorTheme: 1, name, base, colors }and Import reads one back as a new theme. -
The choice and the custom themes are saved as
tempo.colors.v1(desktoptempo-colors-v1.json),{ version: 1, active, customs }. A newer file is neither read nor written.
Typography
- UI: fixed Inter, bundled locally as
Tempo Inter, with Inter/system fallbacks. - Code/data:
--font-mono=ui-monospace, Consolas, Menlo, monospace. - Text and controls use the CSS-pixel token scale.
runtime.cssfixes--ui-scaleto 1, so viewport changes reflow the layout. Browser accessibility zoom remains available.
Navigation and workspace
Home’s navigation contains Editor, Game Packs, Poses, Robot Configuration,
Commands & Sensors, and App Settings. Editor groups Paths and Autos side by
side. With App Settings -> General -> Home screen -> Paths and autos set to
Separate tabs, Paths and Autos replace Editor as two navigation entries. The main
area then shows one list. Each list keeps its own search, open folder and select
mode while the other is shown. Escape with focus outside the lists leaves
select mode on the shown list only. Home reopens on the list it last showed
(tempo-home-tab in browser storage). Commands & Sensors lists Commands,
Sensors and Extensions on one searchable page beside a details panel. Narrow
binding and robot-configuration screens expose their existing Browse controls.
Forms keep inputs readable while giving live field and code previews room.
App Settings is a tabbed dialog whose tabs sit under the title and stay in place
while the panel scrolls. The tabs are General, Units, Appearance, Shortcuts,
Robot code (desktop only) and Workspace. Every tab uses one row shape
(features/settings/SettingsLayout.tsx): the label on the left, the control on
the right, 44 px tall, a hairline between rows, and a small caps label above
each group. An explanation sits behind the ”?” beside the label, never as a
caption under the control. The footer holds only Done because every setting
applies as it changes. Below 520 px of dialog width a row stacks its control
under the label, except a switch, which stays beside it.
- General: Team (Team number), Editor (Open the field on, Simple names) and Home screen (Paths and autos, Learn button, Donate button).
- Units: two equal columns, Paths and field and Robot Configuration, with the same header height and the same rows (Length, Speed, Acceleration, Rotation, Mass, Rotational inertia), so both end level. Rotational inertia reads Robot only on the paths side. Same units in the Robot Configuration header makes that column follow the paths column. Its pills then show the pressed neutral style instead of the accent. Robot Configuration has no units control of its own. Below 560 px of dialog body the columns stack.
- Appearance: Zoom (desktop only), then Colors, with the presets and custom themes as one radio list, with Import and New theme beside the label. A custom theme’s row carries Edit, Export and Delete.
- Shortcuts: search, Reset all, and each context’s commands with two shortcuts.
- Robot code (
features/robotCode/RobotCodeSettings.tsx): Robot project, with Folder (desktop only), Language, WPILib and the Live update switch for every file (desktop only); Drivetrain, with the configure call to copy and, with a robot project chosen, whether the project has it; Generated code, with Files, which says how many pieces have a file and opens the Code screen with Open Code (absent from the browser build), and Add autos to the chooser; Edits in the robot code, with When both change and, desktop only, New code tracking (the section is absent from the browser build); Commands and sensors (desktop only); and Code style. - Workspace: Backup (Export workspace, Import workspace).
Language, WPILib year and the robot folder are set in Settings > Robot code; the
setup guide’s Project step also sets the folder and the WPILib year. The file
each piece of generated code is written to is chosen on the Code screen or in
the guide’s Files step (see
Files for generated code). The robot constants file
is chosen in Robot Configuration. Copy field to robot project sits beside the
active field on the Game Packs page (desktop only). It shows the target
src/main/deploy/tempo/game.toml in the Gradle project that holds the Robot
folder (the folder before src/main/java or src/main/cpp), or
deploy/tempo/game.toml in a RobotPy project. It also shows whether the
robot project’s copy matches the active pack, and it previews before it writes
(features/sync/DeployPackSync.tsx).
A Code view draft that does not parse holds General, Units, Robot code and
Workspace and leaves the tabs usable. Team number is painted on the robot’s
bumpers. The units control the editor’s display. Rotation covers headings, turn
rates and angular limits, and generated code follows it. Open the field on
selects Full field or Alliance side for newly opened path and auto editors. Its
initial value is Full field. Paths and autos selects Together (the initial
value) or Separate tabs. Simple names is a switch, off by default (see Names
below). Learn button is a switch, on by default. Settings are saved as
tempo.settings.v2 (desktop tempo-settings-v2.json).
The Robot Code page’s Robot folder uses Choose or Change. The desktop picker supplies filesystem paths, and a pick that returns after the folder changed elsewhere is dropped.
Names
Every concept the editor can name two ways has one entry in
src/vocabulary/names.ts. The entry holds its code name, the Composer or
Setlist name in
readable words (Parallel, Deadline, End when, Run on failure, Arrive within,
Stay within), and its simple name, plain words for what it does (At the same
time, Until the leader finishes, Until, If it fails, Tolerance, Keep-in). Simple
names picks one for every screen at once: step kinds, group rules, Check and its
sides, Ending early, waypoint commands, arrivals, headings, zones, the field’s
region labels, the Key, issue messages and the lessons. Generated code is
identical either way.
Components read names through useNames() or useGroupLabel(), which rerender
on a change. Messages built outside React use nameOf(). Lesson and check
text writes {key} or {key:lower} tokens, which the Coach reads through
withNames. Accessible names come from the same entries as the visible labels
(remove stay within 1, Arrive within position error), so lessons and tests
select a renamed control through a data attribute instead: data-row,
data-zone-edit, data-zone-remove, data-keep-in and data-check.
vocabulary/names.test.ts fails when a source file writes out a name the map
owns as a label or an accessible name, or a lesson names a renamed control
without a token. vocabulary/surfaces.test.tsx renders every entry in both
forms on the surfaces that show it.
Keybinds lists every command a key runs, grouped by where it applies: Global, Paths, Paths: waypoint list, Autos, Autos: step list, Waypoints, Field and Code view. Each command has two shortcuts. A click on one records the next key with any mix of Ctrl, Alt, Shift and Cmd. Escape cancels the recorder, Tab leaves it, and the small x beside a shortcut removes it. A command that differs from its defaults has a reset button, and Reset all asks first. Search matches a command’s name, its group or its keys. On macOS, Ctrl-or-Cmd shortcuts read as Cmd and Alt as Option.
- A shortcut another command already uses where both apply asks to Replace (the
other command loses it) or Cancel. When one of the two is a field or list
command, Keep both is offered too. Then the field or list takes the key while
it has focus and the page takes it elsewhere. The prompt’s help names
which in one sentence that lists every command sharing the key
(
keptTogether). Leave pan mode listens on the window while the field pans, so its second chord leaves pan mode from anywhere then. Kept conflicts are marked on both rows, and a count in the toolbar filters the list to them. Undo, Redo and the sidebar toggles can conflict with page commands. Undo and Redo can also conflict with Comment lines. Field and list shortcuts can conflict with commands on their containing page. Commands on different pages have no overlapping shortcut contexts. - Escape and Tab cannot be bound, nor Enter or Space alone or with Shift except on the step and waypoint lists. Undo, Redo and Comment lines run while text and code editors have focus, so their shortcuts need Ctrl or Cmd. Ctrl with Alt does not qualify because it types characters on many keyboards. They leave the editors’ cut, copy, paste, select all and cursor keys alone, and Comment lines also leaves undo and redo. A command’s two shortcuts differ.
- Escape in the prompt, or in Reset all’s or Import workspace’s confirmation, dismisses only that and keeps the dialog.
- The prompt is announced and takes focus. Closing it, Reset all or its confirmation returns focus to the control it stood for.
- Each Deselect and Leave pan mode keeps Escape as its first shortcut, and the second can be set.
Settings changes persist automatically. Workspace export backs up paths, autos,
poses, bindings, robot configuration, and packs. Import asks to replace the
current workspace before choosing the replacement file. A path, auto or game
pack open in its editor loads again from the imported workspace, without the
edits it held, or closes when that workspace has none by its id (generation in
workspace/projectStore.ts). Poses and Robot Configuration edit their stores in
place, so they show the imported workspace. Browser data belongs to its origin,
so moving from localhost or another host to gui.tempofrc.com requires
workspace export and import.
A project saved with closest spot steps, closest spot legs or spot sets loads
without them, each such waypoint at its own pose. A notice lists what was taken
out, including each Until the leader finishes group a closest spot step led and
the step that leads it now. It is saved beside the project, so a reload keeps it
until it is dismissed (workspace/closestRemoval.ts). Code read back with a
closest spot call is an error that says so (closestSpotRemoved).
Keybind registry
Every keyboard shortcut is an entry in features/keybinds/commands.ts: an id,
a label, a context, the handlers that run it (scopes), up to two default
chords, and the modifiers those defaults also take (tolerate). Handlers ask
features/keybinds/keybindStore.ts which command a press runs. A new
shortcut is a registry entry plus that call. Outside the registry are the
standard keys of widgets (menus, tabs, selects, the playback slider, number
and text fields, dialogs, resize handles), Enter and Space pressing a focused
button or outline row, Escape closing or cancelling, and modifiers held during
a pointer gesture (Shift to snap a turn, Ctrl for coordinates and to flip
snapping). The field’s pan Escape handler runs during event capture, before
the editor document’s key handler, so leaving pan mode takes priority.
- A handler decides between every command it hears (
Scope): the editor’s key listener and the sidebar toggles on the Paths and Autos pages, the Waypoints page’s commands and toggles, the game pack editor’s Undo and Redo before its Comment lines, a focused waypoint row, its reorder grip, a focused step row, and the focused field. The press runs the command whose chord it matches most exactly, the earlier listed on a tie. So a recorded Ctrl+Alt+Z beats Undo’s Ctrl+Z, which also takes Alt. - Some handlers stack (
LAYERS). The field, a waypoint row and its grip, and a step row each take a key while they have focus and keep it from the page. The page hears it everywhere else. A list handler that takes a key stops it there, so the page does not also act on it. Modin a default chord is Ctrl or Cmd, either one. A recorded chord keeps the exact modifiers pressed and matches only as recorded. Recording a default’s chord again, Ctrl+Z for Undo, is the default. The sidebar toggles’ defaults match the B key’s place (byPosition), whatever the layout types there. A press whose character is another command’s chord wins over a match by place, so Ctrl+V pastes on Colemak-DH, where B’s place types V.legacyParity.test.tschecks the defaults against fixed key tests for every handler, over 54 keys and all 16 modifier combinations: Delete and Escape with any modifier, undo with Alt, a nudge with Ctrl, a row walk with Ctrl, Alt or Cmd.- Conflicts come from pressing each shortcut through the handlers that hear it
(
findConflicts). They count only when one of the two shortcuts is the user’s, because the defaults share keys between stacked handlers, such as the waypoint list’s arrows and the page’s nudges. In one handler only one command can run, so the Shortcuts tab offers Replace or Cancel. Between stacked handlers Keep both is offered too. - With Alt held, a letter or digit key is named by its US position, since Option and AltGr change the character. Labels show the character on the user’s key where the browser’s layout map or plain typing has shown it. A symbol’s chord ignores Shift, which is part of its character. Ctrl or Cmd on the ”/” position comments even when the browser names the key Dead.
- User chords are saved per slot as
tempo.keybinds.v1(desktoptempo-keybinds-v1.json),{ version: 1, bindings: { [id]: { 0?, 1? } } }. A chord string replaces the default and null leaves the slot empty. Unknown commands’ entries are kept for other builds, and unreadable or refused chords read as the default. A file of a newer version is not read or written. - Drags on a path’s field cancel with Escape, Undo’s or Redo’s shortcut, and on
the Waypoints field with Escape or Undo’s. Every tooltip and
aria-keyshortcutsthat names a key follows its command: Undo and Redo, the sidebar toggles, the step rows and their Duplicate, the waypoint grip and Delete, Comment lines, the field’s zoom and fit, and the Waypoints page’s help. The waypoint list keeps its own tooltip wording while its keys are the defaults.
Layout: the authoring screens
Paths, autos, and poses compose EditorShell. The shared regions are:
header back · name · screen-specific document actions
outline waypoints / steps / poses; list and Code modes
canvas field and direct manipulation
inspector selected-item properties or document settings, grouped by function
footer timeline and transport where the screen has playbackThe path inspector follows a waypoint from where the robot goes to how the leg
ends (pathProperties.css). A line at the top names the leg, its span and its
planned time. Position has the mirror action and Source (custom coordinates or a
saved waypoint) in its heading, X and Y on one line, and Rotation’s mode with
its angle on one line, or the facing point’s X and Y under it. An issue
pathChecks keys to a waypoint (waypoints.N) marks its X and Y aria-invalid
with the error border. Its message under them describes both. Driving holds
the incoming leg’s Limits source over a block of its velocity, acceleration and
centripetal limits, like Default Limits in the left sidebar, then Curve. The
block shows the values the leg uses, muted while they come from elsewhere.
Typing one makes the leg Custom with that value, and a blank custom value uses
Default Limits. Limits inherit the preceding leg until an explicit value,
preset, or path-default reset changes them. The first leg inherits path
defaults. Reset restores inheritance, and speed-zone caps stay local to
intersected legs. Arrival (Finish on the last waypoint) puts the transition and
its wait, passing percentage or finish speed on one line, then Tolerance
(Default, or Custom with its position and rotation errors on a Within line).
Ending early is set on a drive step in an auto, so a path can end differently in
each auto that drives it (Ending early and robot actions). A
leg that ends early through the path’s own code (endWhen, giveUpAfter,
runOnFailure, written in its Code view or saved by an earlier build) still
exports it. Arrival shows one read-only line, Ends early, with Clear
(PathEndingNote.tsx). A saved fail case with no command loads as its time
limit alone (migratePath). A segmented control in the inspector keeps arrow
keys and Delete from moving or deleting the waypoint. Collapsing a section
preserves its settings and unfinished input. The auto page’s step inspector uses
the same sections and rows (see
Autos: the step outline and the step inspector).
Heading-preserving terrain targets retain normal waypoint transitions. A targeted leg with a required heading or rotation keyframes keeps stopped plan boundaries. The inspector explains the stop without replacing the stored junction choice.
The waypoint list is one row per waypoint: index badge, name and linked saved
waypoint, coordinates on the right in tabular mono, and a delete action in a
reserved slot so the coordinates hold still. A connector under each row from the
start on carries the leg that begins there, with its behaviors as chips and its
share of the plan time. The list keeps one row in the tab order and walks with
the arrow keys, Home, and End. Selection follows focus while Shift extends
it. Undo and redo reach the page from any control that takes no typed text, a
closed dropdown included (isTyping in app/typingTarget.ts, shared by the
path and auto screens), unless the Code view’s draft does not parse. The path
screen’s other shortcuts wait while any form control has focus. Its arrow
keys, Delete and paste wait while the draft is blocked.
The path and the auto are editor documents (app/editorDocuments.ts). The
outline, field, inspector and footer columns are their document’s region
(EditorShell’s documentKind). One window key listener gives each key to one
document: the one whose region holds the key’s target, else the one last pressed
or focused in, else the one registered last. The header belongs to no region,
and its Undo and Redo follow the same document. So a path edited beside its auto
never takes the auto’s keys or undo, nor the auto the path’s. The field’s own
Escape, which leaves pan mode or drops a pan drag, is heard before that listener
and ends there. Delete on the Autos page acts only from the step list, the page
or the auto’s field, and never from the field’s controls (the plan status’s
buttons and the view controls).
Below the list, Path settings holds alliance and the odometry toggle. Path defaults shows velocity, acceleration and centripetal limits with their source and a reset to the robot configuration’s defaults. Zones, rotation targets, terrain crossings, commands, extensions, and speed zones follow as compact entry lists, each a disclosure row with a count and an add button. A rotation-target entry names its leg and its percentage along it. A crossing entry names its leg and its order on that leg, and a speed-zone entry names the legs it lowers. Rotation targets stay directly editable, with labeled angles, aim coordinates, turn-rate limits, and position along the leg. Aim coordinates use the selected length unit. Adding or selecting an entry opens only its editor in the small flyout, and the other entries remain in the sidebar. Command, speed-zone and terrain-crossing selections on the field also open their entry editors. Collapsing a list closes its flyout without removing entries. Extension assignments follow their waypoints when reordered. Moving an assignment to another leg is one undoable edit. Their sidebar labels and pickers resolve preset names from the stored dimensions, and unmatched dimensions remain custom.
The outline defaults to 300px, or 320px from 1700px, and the inspector to 320px,
which the path and auto screens raise to 360px. A width saved in local storage
wins over the default. Both columns are resizable. Code mode starts its outline,
which holds the code, at clamp(400px, 39vw, 640px) (about 560px in a 1440px
window) and folds the inspector into a drawer at every width, on every editor.
The header is one 56px row, and the footer sizes to its content within a
viewport-height cap. Below 1280px the inspector is a drawer. From 900px an
opened drawer outside Code mode takes a column beside the field, which refits to
the width left. Below 900px it opens over the field, as the outline does.
Selection links the outline, canvas, inspector, and applicable timeline items,
and Escape clears selection.
The header’s toolbar (components/layout/EditorToolbar.tsx, in EditorHeader)
holds whole-document actions beside the name. The mirror is a labelled button
with the horizontal flip icon and an accessible name that states its scope.
History, save state, issues and Export align to the right, and below 640px they
wrap onto a second row. The title ends in an ellipsis when its available space
runs out.
Each sidebar has a collapse chevron on its inner edge, aligned with its header
(EditorPanelToggle). Collapsed sidebars leave a matching reopen handle at the
field’s edge. The same button stays mounted, retaining focus and its
data-panel-toggle anchor for the tutorial. Where the panel is a column (the
list from 900px, the properties from 1280px outside a Code mode drawer), the
toggle hides or shows the column, remembered per page in
tempo-editor-panels:<layout>. Where the panel is a drawer, the toggle opens or
closes it, and below 900px only one drawer opens at a time. Ctrl+B and
Ctrl+Alt+B (Cmd on a Mac) toggle them outside text fields. A selection opens the
properties’ drawer unless its toggle hid it, and that hide is remembered with
the column’s. Escape closes a drawer until the next selection. A hidden
properties panel’s handle carries a dot when there is a selection to inspect.
Field focus, zoom, fit and pan sit in a wrapping row below the canvas. Overlays
and Key share a compact panel at its bottom-right corner
(FieldDisplayControls). Pressed view toggles use neutral grey
(--toggle-on-bg, --toggle-on-ink and --toggle-on-line in
styles/tokens.css), so the accent marks selection and primary actions. The
mirror reflects left/right across the field’s long centerline for the same
alliance. The alliance a route runs for is its path’s Alliance setting.
Canvas backing dimensions follow the actual element size and device-pixel ratio.
observeCanvasSize responds to resizing, font loading, and display-density
changes. Layout reflows at its breakpoints without whole-app scaling transforms.
The field a route stays on
fieldBounds.ts mirrors the bindings’ field check (Composer.requireOnField):
x within the field’s length and y within its width, from its origin, with one
robot circumradius of slack past each edge, from the active pack’s size, else
the path’s, else the 2026 field. The circumradius is that of the outline robot
code builds from the exported footprint config, chamfered and rounded corners
cut in (robotOutline in features/robot/robotOutline.ts, as
RobotFootprint.of builds it in each binding), not the planner preview’s
square-cornered planningFootprint. pathChecks refuses the start pose and
each waypoint outside it (off-field), which stops export.
Field focus, zoom, and pan
Path and auto fields share FieldViewControls below the canvas, as does the Game Pack editor. Full field frames the entire field, and Blue side or Red side frames the document’s authoring-alliance half. Focus changes the view without mirroring coordinates or changing the document’s alliance. Neutral documents use Full field and have no side button. The Game Pack editor uses the same zoom and pan controls with Fit field, without an alliance selector. These controls do not appear in Poses.
App Settings -> General -> Editor -> Open the field on sets the initial view. Editor overrides are local to the open document and do not change that default. Opening another document reapplies the saved default, and changing the default leaves an open editor’s view alone. Focus, zoom, and pan stay outside document data, undo history, and exports.
Scrolling or pinching a trackpad zooms around the pointer. The minus and plus buttons beside the zoom percentage zoom around the view center. The displayed zoom ranges from 50% to 800%, relative to the full-field fit. Fit path frames the current waypoints and planned trajectory, and Fit auto frames the paths used by an auto. Fit is disabled when no finite route points are available.
Pan enables left-button dragging of the view, and a middle-button drag also
pans. Escape cancels an active pan and exits Pan mode. With the canvas focused,
+ or = zooms in, - zooms out, and 0 fits the route. Pan mode has no
default key and can be given one in Keybinds. Ctrl/Cmd browser-zoom keyboard
shortcuts remain available. View controls do not change the transform during a
waypoint or target drag.
Events along a route
Both fields mark what happens along a route the same way. canvas/path/routeEvents.ts
turns a path’s legs into events, as fractional sample indexes into the plan
(pathRouteEvents): each command (before at its leg’s start, after at its end,
at by the share of the leg’s length, during along it), the arrival hold (a stop
or a wait), what ends the leg early (an end when, a time limit, a fallback
command), each terrain crossing, at the sample nearest its target or the
terrain, and each speed zone over the legs it covers. runRouteEvents does the
same for a drive
step’s own commands on its run: before, after and a progress at at points,
during and a sensor or match-time at along the run or its leg, and end when,
give up after and on failure at its end. Before a plan, chordPlan puts the
path field’s events on the chords between its waypoints.
canvas/path/routeEventArt.ts lays the events out (layoutRouteEvents). A
point is a 12 px tick across the route. A span on the selected route is a 2
px band at 60% beside it, 6 px from the route’s center line and stacked outward
where spans overlap. A span anywhere else is a tick at its start (band).
Events of one kind within 4 px share a mark, whose chip counts them (“2
commands”). Only a command and a speed zone carry words, their names
(RouteEvent.label). A command run at a sensor or a match time reads its
name alone. A command or speed zone mark in full carries a chip with the kind’s
icon (the terminal prompt of icons/command.svg, two chevrons for a speed zone)
and its name. placeChip places it off the waypoint dots, the start flag,
badges and the chips placed before it, inside the field, with a 1 px leader back
to its tick when it moved more than 6 px off it. A hold, an end condition and a
crossing never carry a chip (canvas/fieldWords.test.tsx checks the words both
fields draw). A drive step’s own command edges its chip, band and leader in the
step’s color (accent), so two chips that read alike are told apart. A mark
with no chip keeps its tick. A kind other than a command keeps its icon (two
bars for a hold, an arrow into a bar for an end condition, a bump for a
crossing, two chevrons for a speed zone) on a small plate that also takes a
press. Command purple, the speed zone’s orange and a light grey are accents, and
every mark reads from its shape and icon. Both fields show a chip for the
selected route, the event under the pointer and a selected command or zone. That
is the selected waypoint’s leg and a zone over it on the path field, and the
selected or hovered step on the auto field. A press on a path field chip, tick
or plate selects its command, speed zone or terrain crossing, which lights under
the pointer first. A hold’s or an end condition’s selects the waypoint whose
leg it ends. On the auto field a press opens a step’s own command in its
Waypoint commands and selects the step for anything else. CanvasStage’s
runCommands marks a drive step’s own commands on the path field when the auto
page edits that path in place, their chips and bands shown and edged in the
step’s color. Both fields draw the pack’s field image at two thirds of its
opacity, 40% at the default, while routes are drawn over it (dimImage,
DIMMED_IMAGE), so a route reads over the game pieces. The auto field also
shades 3 px past each side of every drive’s route (drawRouteShades,
ROUTE_SHADE), before any route so none darkens another.
The Key and the start flag
The Key toggle beside Overlays at the field’s bottom right (FieldKeyToggle in
canvas/view/FieldKey.tsx) opens each field’s marks in headed sections, two
columns wide, each mark a short label beside a 56 by 20 px sample. These are the
auto field’s (features/autos/FieldKey.tsx: Routes, Markers, Commands and
Timeline, the timeline’s hatch under Timeline alone) and the path field’s
(features/paths/PathFieldKey.tsx: Routes, Markers and Commands). Commands
holds the events’ entries (canvas/view/eventKeyEntries.tsx), and on the auto
field a step’s own command, its chip edged in the step’s color
(ownCommandEntry). The panel ends with how the view moves (fieldViewHint).
The Game Pack editor carries that hint on a separate button. Pressed, the toggle
takes PRESSED, as the focus does. Its list opens above or below the button on
the side with more space, scrolling within the viewport when its contents exceed
that space. Overlays and Key keep their visible labels at narrow widths. Both
Keys fit a 1440 by 800 window without scrolling. The start flag
(canvas/path/startFlag.ts) flies on the start robot’s footprint corner nearest
the canvas’s top right, at an auto’s start on the auto field. The Paths page
flies none, but a path edited in an auto flies it when the path starts the auto
(CanvasStage’s startFlag).
In the Game Pack editor, Fit field and 0 restore the full-field view with
space for artwork outside the perimeter. Zoom and pan leave TOML, image
calibration, and undo history unchanged. Drag into place moves the image at the
current zoom and Shift-drag resizes it. Pan and Drag into place are separate
tools, but middle-drag can pan while image alignment is enabled. View changes
pause during calibration drags so the image stays under the pointer.
Detect field bounds uses connected perimeter walls, including chamfered corners. It calibrates the image without changing the pack’s physical dimensions or removing artwork outside the perimeter. Scale mismatch is reported separately. Field dimensions, pixel bounds, or a nonuniformly scaled source image can cause it. Ambiguous perimeters retain the current calibration, and detection is one undoable image edit.
Autos: the step outline and the step inspector
The auto page follows the path editor’s layout, with the step list on the left
with what the selection relates to under it, and an inspector for the
selection’s own settings on the right. The header has the path editor’s shape:
back, name and kind, the toolbar with the whole-auto mirror (FlipAutoButton,
“Mirror auto left/right”, its title saying what it changes), then the issue
pill, undo, redo, the save state and the gold Export, which opens Code mode. The
issue pill walks the steps with an issue in list order (issueSteps in
issueSteps.ts), showing the step list first when its toggle hid it. An issue
on the auto itself is on no step, so the pill takes focus to the first step
kind. An auto with no steps yet is left off the pill (empty_auto stays an
export blocker, which Code mode names). The list’s title gives the step count
and the auto’s length (useAutoSchedule, the longer of the lane schedule and
the playback timeline), 10 · 13.1 s, as the path editor’s gives its waypoints
and time. No season’s autonomous period is assumed anywhere.
The outline (features/autos/AutoOutline.tsx) is the step kinds bar
(StepKindBar.tsx), then a tree (role="tree"). A leaf step’s row shows its
number, kind and name, a step on a Check’s side included, a connect marker
when the robot first drives to its path’s start (the note is the row’s
description, and the marker’s title adds where the field and the timeline draw
that drive), a bordered button with the count of a drive’s own commands, whose
title lists them, that opens the first on a click and stays out of the tab
order, the issue dot and its duration in the UI font with tabular figures: a
planned time plainly, and a Then step’s estimate after a tilde, whose title says
it is one. The kind sits in one 44 px column and the number in a 24 px one that
holds two digits, so the names line up. The numbers and colors are the ones the
field and the timeline use (stepStyle.ts). A group or a Check is a bracket
around its rows, closed by its rail alone, a Check’s sides under Yes and No
captions. An empty side reads Empty, and a click on it selects the Check.
Brackets always show their rows, so their tree items carry no aria-expanded.
Rows hold no settings. The selected row takes --tint-selection and an accent
badge on its number, as the path outline’s selected row does. A selected
bracket’s head takes the tint, the outline’s 2 px gold rule and a gold icon. The
hovered, focused or selected row shows Mirror step, Duplicate and Delete over
its end in place of its markers and time, where the path outline’s rows show
Delete (.step__actions). Mirror step shows where a mirror could change a path
(canMirror in useFlip.tsx), on a drive of a path that exists or on a group
or a Check with one in it. All three stay out of the tab order. A step on a
Check’s side has no Duplicate. Duplicate selects the copy and moves focus to its
row, and Ctrl+D on a focused row duplicates it.
The step kinds bar heads the column, under the Steps and Code tabs and outside
the list’s scroller, as a bordered card (role="toolbar", named Add a step) of
Drive, Run, Wait, Group, Check and Auto, each an icon over one word in theme
colors (addStep.css). The kinds sit in equal grid columns, six to a row where
each has 46 px and three to a row below that (a container query on the bar). So
the 280 px column holds two rows and the bar takes 102 px of it. Every kind is a
stop in the tab order, before the list. A kind’s title, which is also its
description, says where its step goes and then what the step does: “Adds a Drive
step after step 3”. The place is insertPlace, insertStep’s rule in words
with the list’s numbers: after the selected step, at the end of the selected
group, after the selected Check or the Check whose side is selected, or at the
end of the auto. Group opens its four rules under the bar (role="menu", named
How the group runs), each titled with what it does, with focus on the first
rule. Up, Down, Home and End walk them. Escape or Tab closes them and gives
Group its focus back, and a press outside the bar closes them. Escape is heard
in the window’s capture phase, so it neither clears the selection nor closes a
drawer. Every kind is off while the code does not parse. The new step opens with
focus in its first control (openNewStep). The bar renders only when its place
or the parse state changes (memo), and keeps no state the field reads.
Under the list, AutoContext.tsx shows what the selection relates to, in the
path editor’s settings block (path-properties--document). The list and the
context each take the height they need while both fit and share the column in
proportion past that. Each scrolls on its own and the context takes at most 45% of the
column, so the context stays in sight beside a long list. A step selected
elsewhere scrolls into view in the list (revealInList), and again whenever the
list gets shorter under it, as when a drive’s waypoints load. A list with rows
past its bottom edge fades its last 24 px (data-more-below), and a row
revealed downward stops above the fade. Its rows sit on one grid
(.auto-context__facts) with an 84 px column of 11 px grey labels, then 13 px
values, left-aligned. What a context names opens with a ghost Open button with
the open icon. With nothing selected the context is the auto’s Start, a
Disclosure like the Paths page’s Zones, one line until opened: “Start · path ·
position”. Opened, it gives the first waypoint of the first path the auto
drives, its heading and the alliance every path runs for, with the first drive’s
step chip and Open (openPathFromAuto, whose Back returns to the auto with its
selection and undo history unless the saved auto changed meanwhile). It also
gives that path’s Reset Odometry. A path saved without the setting reads it as
on, as its code does. The setting saves on the path, so every auto that starts
with it
shares it. An auto with no drive step reads No drive step. A drive step shows
its path’s waypoints in the path editor’s own WaypointList, under the path’s
name and Open path, and the page edits that path in place
(AutoPathEditing.tsx). While a path drive whose path exists is selected in the
step list’s mode, AutoPathField holds the path’s editing session
(usePathEditing) and draws it on CanvasStage for the auto’s alliance
(viewAlliance) in its step’s color (routeColor: the route, dots and robots
in that one color, the selected waypoint in the selection’s gold, and the path’s
own command chips edged dashed beside the step’s own). It is drawn over the rest
of the auto
at 0.35 (useAutoUnderlay, the step itself hidden), over its routes’ shades at
full strength (CanvasUnderlay.shade), so a faint route still reads over the
game pieces. The underlay is painted again only when what it shows changes, so a
new plan for the hidden step, which each edit of the path brings, leaves it as
it is. CanvasStage keeps it composed over its shade in one layer. A
waypoint selected in the list or on the field shows the path inspector
(PathInspectorPanel) beside the field under a breadcrumb back to the step
(WaypointCrumb), then the step’s Commands in this auto at that waypoint. The
breadcrumb’s path name and the cross go back to the step’s settings. While
the auto edits a path, AutoWaypointContext gives the path’s list and inspector
the auto’s words. The rows read Start and Waypoint n, each with the count of
the step’s own commands there. The stretches between them carry no rows, and the
waypoint’s summary names the path where the Paths page names the leg. The path’s
plan shows in the auto’s preview and timeline as it changes (pushLivePlan,
with the path as edited for the drives beside it). Edits autosave into the path,
and leaving the step saves edits still waiting and clears the live plan. A
workspace import loads the path again, never writes the old workspace’s copy
over the new one, and closes the path when the new workspace has none by its id.
The list, the field and the waypoint inspector are the path’s regions
(data-editor-document="path"), so keys and the header’s Undo reach the path
there. An arrow key moves the selection the way it points on the field as drawn,
taken into the path’s own frame (pathDisplacement) as a drag is. Escape with
nothing selected in the path goes on to the auto, which clears the step. The
field’s pan Escape listens in the capture phase, so it runs before the
documents’ key listener however late the field mounts. A Then step that runs a
command shows the command, whether it drives the robot, what it does to the
footprint and its code name in the team’s language. A Check shows its sensor and
code name, or the match time it waits for. An Auto step shows the auto it
runs, its step count and length. A group has no context because its steps are
its rows. Every step’s context ends with the robot’s pose as a step that does
not drive starts, where its marker stands on the field. For a drive step it ends
with the
alliance its path is flipped to, the legs that reach past the bumpers on its
run, and the other autos that drive its path (autosDriving), then the drive
the robot makes to the step’s start first. A context with none of these renders
nothing (.auto-context:empty). The legs come from runExtensions
(autoUses.ts), runLegExtensions over the path with the step’s own commands,
the footprint robot code plans for that run. It starts from legExtensions, the
same list codegen writes .extension(...) from, and fills each leg the code
leaves at RobotExtension.none() from the commands, as the libraries do. The
line names the Robot Config extension when every extended leg uses it
(extensionWords).
Selecting a row, a drive on the field or a bar in the timeline shows the step
in the inspector (features/autos/StepInspector.tsx), 360 px wide as the
path inspector is. Its header names the step as its row does
(StepPanelTitle): number, kind and name, a wait’s time, a group’s rule or a
check’s test with its icon, and the side of a Check a step sits on, on one
line whose text ends in an ellipsis with the whole text in its tooltip, then,
in grey, when it runs in the lane schedule
(StepTimes: “4.6–5.8 s”, “at 3.2 s”, or “from 9.5 s” with the reason in its
tooltip for a Check’s No side or a step with no estimate), then the path
inspector’s cross, which clears the selection.
With nothing selected the header reads Step and the panel asks for one, as
the path inspector does for a waypoint.
The inspector holds the step’s own settings and nothing else, in the path
inspector’s sections and spacing (path-properties--waypoint). Needs attention
comes first, with the step’s issues other than its commands’, which show on
their entries. Then come the settings for its kind, in a fieldset named by the
header’s title (stepTitleId), and then a drive step’s own Waypoint commands
(StepRunCommands). A section’s pick sits beside its title, as the path
inspector keeps a waypoint’s position source beside Position. The pick is Path
for a drive, with the mirror’s explanation as the section’s hint, Command for a
Run step, with Estimate under it, Auto for a nested auto, and Group for a group,
with Leader for Until the leader finishes. Check for a Check has If and At least
under it, and Sides, only while a side holds no step the list shows, with the
kinds an empty side can hold (LaneKinds) or a step of a kind this version does
not know. Wait has Wait for. While the code does not parse, the settings
fieldset is disabled, but the Drive commands entries still open, each editor a
disabled fieldset of its own. Add, move and delete are off. Both fieldsets
give DRAFT_HOLD.edit as their title and description. Escape, a click in the
list’s empty space or the cross clears the selection. Code mode shows the
same inspector for the step under the caret, in the drawer the properties’
toggle opens.
The open drive command (selectedRunCommandId) always belongs to the
selected step. selectRunCommand selects the step that holds it,
selectNode closes a command of another step, and addRunCommand selects
the step it adds to. After any edit, undo or redo, selectionIn moves the
selection to the step that holds the open command, closes a command that is
gone, and clears a selection whose step is gone.
The tree keeps one row in the tab order: the selected one, else the last one
focused, else the first. No control inside a row takes Tab, so Tab leaves the
list. A drive’s commands are reached through Enter into its inspector. Up
and Down walk the rows and select as they go, and Home and End jump to the
ends. Right enters a group or a Check and Left returns to it. Alt with Up or Down
moves the focused step within its group (move), one undo step. Enter or F2
moves focus to the inspector’s first field, else its first button
(firstControl). Escape goes back a level. A number field that cancels its edit
inside an open command’s editor hands focus to the command’s entry. On the entry,
the command closes. Elsewhere in the inspector focus returns to the step’s row,
and on the row the selection clears and the row keeps focus. Delete removes the
selected step from its own row, the page or the auto’s field, and does nothing
on another row, on the step kinds, on a row’s buttons, on the field’s view
controls, or in the inspector (deletesStep in autoDocument.ts). A row
deleted while it has focus hands focus to the row that takes its place, else the
one before it, else the first step kind. Below 1280px a selection opens the
inspector drawer unless its toggle hid it. An Escape that only moves focus
leaves an open drawer open, and none moves focus to the drawer’s toggle.
The step canvas
The Steps section under the auto’s field (StepsSection.tsx) holds the step
canvas (StepCanvas.tsx) as tall as its laid-out steps and their padding, at
least 80 px and at most 55% of the window, past which the canvas scrolls and
pans. It grows as steps and groups are added and shrinks as they go. Dragging
the section’s top edge, or the arrow keys on it, sets a height that is kept as
a preference and holds however many steps the auto has. The section’s Steps
toggle hides the canvas, leaving the field, the playback row and the step bar.
Steps are nodes and curved connectors join them in the order the auto runs them
(stepCanvasLayout.ts). Only the connectors give the order, whatever the
nodes’ positions. Each node starts at the step graph’s place for it
(stepGraph.ts) and stands off it by an offset stored in the auto’s
stepLayout, editor data that generated code never reads. An auto without
offsets shows the step graph’s arrangement, and Arrange clears them. Every
connector carries a slot (stepSlots.ts). Its add button adds a step there, and
a node dropped on it moves there. A node dropped in a group’s box joins the
group, and one dropped outside the box of its own group runs right after that group.
Both land in the flow with their offsets cleared. A drop anywhere else
only moves the node. A group drags by its label with its members. Each move is
one undo step.
Autos: the field and the timeline
A color marks a step that drives, since a drive is what draws a route
(stepStyles in stepStyle.ts). The step that runs the first route takes
STEP_PALETTE[0], lime, and every other path drive or auto that drives
(drivesRoute) the next of magenta, pale yellow and olive green in turn.
stepStyle.test.ts simulates protanopia, deuteranopia and tritanopia (Machado
2009 matrices at full severity) and holds every pair of colors, and each against
STEP_NEUTRAL, at least 15 CIEDE2000 apart in each vision and in normal vision.
It holds each color at least 25 degrees of hue and 15 CIEDE2000 from the hues the
editor gives a meaning. Those limits leave room for four colors. So a hovered or
selected drive, or one whose row has keyboard focus in the step list (the row
sets the hover), also shows its step’s number in an 18 px dot of its color on
its route (drawNumberDot in canvas/stepMarkerArt.ts, in the ink with the
higher contrast on that color, inkOn). The dot sits at the middle of the
route, or the share of it nearest the middle that keeps off the waypoint dots,
the start robot, the markers’ places and the other dots, weighed by the area
covered, or beside the route where every share covers something. Nothing on the
field is numbered at rest. A command, a Wait and an auto that drives nothing
take their command color or the neutral STEP_NEUTRAL. The list’s strip,
the field’s marker and the timeline’s bar all use the one map. A hovered step’s
ring is its own color (hoverRingColor), outside a dark gap on the field and a
gap on the timeline, because a lighter or darker shade could resemble another
step’s color in this palette. The selected step’s ring is white.
A step that does not drive is its kind’s icon (drawStepIcon: a command’s
terminal prompt, a wait’s clock, a nested auto’s list) in its step color where
the robot is as it starts (stepMarkers). fanOut lays out icons that come
within 20 px of each other as one cluster (FanLayout.clusters), at most six
to a row in step order, on one dark plate (drawMarkerPlate), moved off the
waypoint dots, the start robot, the number dots and the chips with a leader
back to its points. Each icon is its own step’s hit target, ringed in white
while selected and in its own color while hovered. A robot outline stands
only where each drive ends and at the auto’s start. Key, beside Overlays at the
field’s bottom right
(FieldDisplayControls, features/autos/FieldKey.tsx), labels each line
style and mark on a 56 by 20 px sample drawn as the field draws it (see The Key
and the start flag).
AutoBuilder plans each run with the footprint its own waypoint commands give
it, as the libraries’ RunMerge and ExtensionInference plan that occurrence
(runFootprint.ts, over runLegExtensions). It plans a path once as it is,
under its path id, and once for each other footprint its runs drive with
(runFootprintGroups), through previewFootprint’s legs. That plan
is stored under runPlanKey for each step that drives with it, and the
timeline, the lane schedule and the step list read it before the path’s plan. It
plans the drive to a
path’s start with the whole run’s before, during and at commands. AutoCanvas
draws each run’s waypoint robots, the start robot and the playback robot with
the same legs, and the playback robot on a drive to a path’s start with its
run’s extension. A run whose commands change no footprint plans and draws the
path’s own legs.
AutoCanvas paints the whole auto into a drives layer when one of the layer’s
inputs changes (the layout, the theme, the selection, hover, the running step,
the view) and shows it under the cursor robot. The visible canvas is painted
only when the layer or the cursor robot changes. The layer shown before is kept
with its inputs, so a change back to that picture, such as a hover ending, shows
it again without painting. Between paints, AutoLayerCache keeps the route
points the markers keep off, the markers’ layout and each drive’s route events
while their inputs match the cached inputs. fanOut counts the route points
a marker covers from a grid of cells (coverage).
The footer is the path editor’s timeline (features/paths/PlaybackBar.tsx, and
an auto’s is the step bar in features/autos/StepsSection.tsx), one band 81 px
tall on both pages, so the path editor’s outline keeps its height. It holds Play
and the clock (“4.2 s / 13.1 s”) on the left, then the track, its axis the
auto’s own length, with the playhead’s line and its 12 px amber knob over the
lanes, then a step readout, Position and Speed on the right. Each keeps its
width whatever it reads, so the track keeps its own. The step readout is 220 px
(.atl__step), its name ending in an ellipsis. Below 1280 px it is 160 px
and drops its label and number. Position’s and Speed’s values hold their longest
reading on the field (playback.css). Below 1024 px Position is left out.
The path editor’s footer has no step readout, so its scrubber takes the rest of
the band. While there is nothing to play, the clock and the playhead stay blank,
and a readout with nothing to read is left out. The track holds two 18 px lanes
(TRACK_H). Three or more share that height thinner, 2 px apart, and lanes
under 11 px carry no labels (laneBox). A lone lane sits in its middle
(laneTop). Below 640 px the track wraps under the rest. A press anywhere on
the track off a bar (data-bar) scrubs, and so does a drag from the knob. The
focused knob is a slider that the arrow keys step 0.1 s (1 s with Shift), and
Home and End send to either end. The path editor’s legs sit in the same track as
absolutely placed buttons (--start and --span, their shares of the plan).
The step readout names the selected step until playback or a scrub moves the
playhead (anchor and scrubbing in AutoTimelineFooter), then the step under
the playhead: a step by number and name as Step, a group by its rule as
Group and a Check by its test as Check. Position and Speed come from
timeline.poseAt, whose speed is 0 while the robot holds between drives. A
bar’s label is a container-type: inline-size box. Every bar, drives included,
reads its number and name (“2 · Depot Run”), a bar that is not a drive only once
it is wide. A bar under 56 px shows its number alone (autoTimeline.css).
Every bar’s tooltip names it. A cut No side’s label (data-cut) keeps “N · 2.6
s” once its name no longer fits under 100 px, and its number alone under 72 px.
Autos: a drive’s own commands, checks and groups
A drive step’s inspector lists its run’s own commands as Waypoint commands
(StepRunCommands in RunCommandsList.tsx): Whole drive first, in the order
they were added, then a group per waypoint in path order, headed by the
waypoint’s number on a dot and its pose’s name, each group with its own add, and
Add to a waypoint at the end. A command stored on the leg that ends at waypoint
n is listed at waypoint n, its way there, as .to(n) writes it and the path
editor’s Commands list it (commandWaypoint, stretchAt in runCommands.ts).
The start has no way there and no group. Within a waypoint the commands read
in time: before leaving the waypoint before it, on the way there, part of the
way there, after arriving, then the endings. Each group also lists the path’s
own commands at that waypoint, from its waypoints’ events, dimmed and tagged
Path with a button that opens the path. With a waypoint of the edited drive
selected, the same list for that waypoint alone follows the waypoint’s settings
as Commands in this auto. The inspector’s header is then a breadcrumb
(WaypointCrumb) whose path name goes back to the step. Entries reuse the
sidebar-entry-list styles of SidebarEntries, and the open entry’s editor
renders inside its list item. Its rows are Waypoint, Command and When. When
offers Before leaving, While driving (On the way here at a waypoint), At and
After arriving, and at a waypoint also end when, time limit (giveUpAfter) and
run fallback command (onFailure). Changing the waypoint moves the command to
the leg that ends there, and changing When keeps its leg. The whole drive’s
three endings are the step’s Ending early rows (DriveEnding.tsx: Until, Time
limit, If it fails), above Waypoint commands, which leaves them out of its list
and count. The step’s outline row marks them with a flag. A leg holds one of
each of the last three, so any Waypoint or When choice that would add a second
is disabled with an option hint naming the waypoint that has one. At offers a
point part of the way there (waypoint only, with Required), a match time or a
sensor. End when shares features/paths/EndConditionPicker.tsx with a path
leg’s End when, with allowNone={false}. A slider drag and a typed end-when
name each join one undo step through putRunCommand’s typing key, which
settleTyping ends.
The store’s focusRunCommandId moves focus into an entry’s editor after Add or
once the row’s count opens it. legHover holds the leg a Waypoint option or
an entry points at (Select onActiveChange). AutoCanvas rings the open
command’s step, draws its leg and lights its event mark, and draws the hovered
leg in the path editor’s colors. A drive’s row shows its run’s command count,
Ending early aside, which opens the first command. An entry’s more button
(MoveCommand) moves the command to another drive step of the auto with its
settings, where runCommandLanding puts it: the leg that ends at the same
waypoint, else the leg with the same number (minting the path’s waypoint ids). A
step without that leg takes a command at a point along a leg on its last leg,
with its share and its wait, and any other leg command on the whole run. The
step’s menu item names the change in its hint, and putRunCommand makes the
move. A step with no leg for a point along a leg, or whose scope already holds
one of a single phase, is disabled.
A drive step stores its run’s commands in commands on its composer node
(RunCommand in features/autos/tree.ts). A leg is the id of the waypoint
that ends it, and code writes its current number. A waypoint that is gone is a
missing_leg issue that stops export. The store keeps each run’s commands in
code order, whole run first and then by leg (sortRunCommands), so reading the
code back changes nothing. lowerSetlist.ts gives each command read from code
the id of the stored one on the same leg with the same phase and command, then
the same leg and phase in order. Picking a leg of a path whose waypoints lack
ids gives them ids. Reading .at(n) does the same through pathWaypoints
on the parse result, which the Code view saves with the auto. A path’s own Code
view keeps each waypoint’s id with its pose (waypointIds in
lowerComposer.ts). A flip onto a path without ids gives it the ids of the
path the step leaves at the same places (withIds on planFlip’s result).
Drive to steps
A Drive to step is the Setlist’s to(target): a to node (features/autos/tree.ts) that holds
the target’s x and y in meters as authored for blue, an optional headingRad (none is the
point form, which requires no heading), an optional bias, and the run’s commands. It is a
RunStep beside the path drive, so its inspector shows the same ways to end early and the same
Waypoint commands, whose one waypoint is the target (TO_LEG_ID, .at(1) in code). The add
menu’s Drive to (AddStepMenu.tsx, newTarget) places a new target a meter past where the
selected step leaves the robot, toward the middle of the field. A target that is a name or a
call with no arguments in robot code is kept as code and shown as code only. Set a position
replaces it with a point the field can move.
The preview has no live pose, so summarizeSetlistRoute reads each step’s leg from where the
step before it leaves the robot (ToLeg in routeSummary.ts). No connecting drive leads into
the step, no route flows into it, and it never counts as the auto’s authored start: an auto
whose first drive is a Drive to step has no start robot, and the path after it joins from the
target as any later route does. A nested auto that starts with one takes its start from the
auto that runs it, at each place it runs: the leg carries the nested-auto step as its place,
and its path and plan are keyed toLegPathId(leg), which the timeline and the lane durations
find through placedToPathIds. Home’s auto cards draw the same legs (toLegRoutes in
features/home/homePreview.ts), and a leg with no known start as its target’s dot. toStepPaths (toStep.ts) turns each leg whose start is known into a path
of two waypoints under the default path limits, keyed toPathId(node), which the page plans,
draws and times as it does a path’s (AutoBuilder.tsx, toPaths in the auto store, and
toLegacyAutoNode for the timeline). A step whose start is unknown has no such path, and the
field draws a robot outline with the step’s number at its target. A press on a target of the
open auto’s own step drags it (AutoCanvas.tsx), stored in blue’s frame, and one drag is one
undo step. The selected step’s target also shows a path waypoint’s rotation arc and the
arriving end of its bias handle (canvas/toTargetHandles.ts, drawn and hit by
rotationHandle.ts and biasHandle.ts): the arc sets headingRad, the bias handle sets
bias, faint at the leg’s own direction until a drag stores one, Shift snaps, Escape puts
back what the press found, and a double-click clears a set bias. Mirror step reflects the
target, its heading and its bias (planFlip).
A target can follow a saved waypoint: poseId on the node names a Waypoints entry of kind
waypoint, picked in the Target section’s Position source. The node keeps the waypoint’s x,
y and headingRad as its own, as a linked path waypoint does, so the preview, Home’s cards
and nested autos read it like any other target. useProjectStore.applyPose moves the linked
steps of every saved auto and the open one (followToPose in features/autos/toLinks.ts),
and deleting the waypoint or making it a landmark clears the link and leaves the step where
it is (detachToPose). An edit of a linked target’s position or heading, in Properties or by
its handles, is an edit of the waypoint (usePoseStore.updatePose). The open auto takes one
undo step for a run of changes to a waypoint one of its steps follows (recordPoseChange),
and its undo writes the restored step’s position back to the waypoint, as the path editor’s
does. A linked target has no “any heading” form, because code passes it as a Pose2d. Mirror
step clears the link. The Waypoints panel lists each linked step under Used in.
Code writes the step as .to(...) with a Composer waypoint’s arguments, and as Step.to(...)
where it is a group’s member or a Check’s side (toArguments in codegen.ts). lowerSetlist.ts
reads .to(...), Step.to(...) and .drive(Tempo.to(target)) back as the step, with numbers,
a Pose2d or a Translation2d and an optional Bias. While the waypoints have a file, a linked
target is written as its waypoint’s constant: FieldPoses.HUB_SHOT in Java, HUB_SHOT in Python
and FieldPoses::kHubShot in C++ for a whole file named FieldPoses, and under the class a team
file declares around the waypoints block when they are a block (the home’s holder, which
placement in features/robotCode/where.tsx returns), with the import or include the autos file needs
(code/poseReferences.ts); a bias follows it as the second argument. While the waypoints have no
file, the step’s own numbers are written. Read-back links a to(...) whose one target is such a
constant, bare or under the waypoints’ class, and a target written as numbers reads back unlinked.
A link whose waypoint the library lacks is written as the step’s own numbers. Path waypoints
linked to a saved waypoint are still written as numbers. An inline Tempo.to(...) with more calls
after it is refused. A target off the field is a to_off_field issue that stops export while
the code still shows.
migrateSetlistTree loads a run’s commands entry by entry. One that cannot be
read is left out with a SetlistTreeLoadNote on its step. One of a phase or
condition kind this version does not know is kept as saved. A run keeps its
first MAX_RUN_COMMANDS. A Check side or test that cannot be read loads empty,
with a note, and a side is read as fully as any step (laneState). A side of a
step kind this version does not know loads empty and is kept on the Check in
keptSides. Migration carries it through edits and storedTree writes it back
into place wherever autos are saved (storedAutos in projectStore.ts and the
workspace bundle). It is an unknown_check_side issue, which stops export.
features/autos/loadNotes.ts keeps each auto’s notes from migrateAuto.
AutoBuilder lists them as notice issues, which stop no export
(code/exportIssues.ts). An unknown kind is an unknown_run_command or
unknown_condition issue, which does.
A Check is { kind: "check", condition, yes, no }: a sensor or a match time,
and one path drive, command or auto per side. innerNodes returns a group’s
children or a Check’s sides for every walk. A removed side step leaves its side
empty, and a step added while a side’s step is selected goes after the Check.
The timeline schedules the Yes side and places the No side on the lane below
from the same start with alternative set. Playback drives the Yes side and
keeps the No side’s drives in timeline.alternates, which the field draws
dotted and faint. The No side’s bar stops where the Yes side ends. The
footer hatches the end of one cut short, labels its own length, and hatches its
connecting drive from timeline.alternates.connectors.
features/autos/runChecks.ts reports violations of the Setlist bindings’ rules
on the affected drive step or Check. An issue about a run command identifies it
in runCommand, so Waypoint commands can show the issue on that command’s entry.
Validation tells issues apart by path and runCommand, so two entries with the
same problem each keep theirs. A scope keeps only the last end when, time limit
and fallback command the bindings are given, so a second of one in a scope is an
issue. A time limit is checked at the millisecond precision code writes. A run’s
commands count with the run in a concurrent group’s identity check, and a
command that drives the robot is refused on a run. frameIssues in
validate.ts checks that every path the auto drives flips the same way, across
groups, both sides of every Check and the autos it runs, as the bindings’
requireOneFrame does at freeze time.
Code writes a run’s commands after .drive(path), one per line, each leg’s
after its .at(n) (waypoint n ends leg n). In a group or on a Check side the
run is a Step.drive(path) chain, and Java and Python import Step only then.
C++ passes each command a run borrows, and each command a path hook runs, as a
handle robot code owns. The handle’s name comes
from cppCommandHandles in features/bindings/cppNames.ts, so a command’s
hooks and drive
commands name one object. The handle comes from the name path events call the
command by, its label unless it keeps an older stored name: kept as typed when
that is a C++ name, else its words in lowerCamelCase with leading words that
start with a digit moved last, else, for a name with no letter from A to Z, its
factory’s name with Handle added. Commands are named in creation order, after
every sensor. A keyword, a macro in CPP_MACRO_NAMES (cppMacros.ts: the
macros without an underscore that WPILib 2026’s command headers, Tempo’s headers
and the standard library define under GCC and glibc), the command’s own factory,
a sensor’s C++ name, or a name an earlier command holds as handle or factory
takes the first free number from 2. Commands and Sensors keep no shared creation
order, so every sensor counts as earlier, and adding a sensor can renumber a
handle. buildCommandCallMap(commands, sensors) gives a hook’s alias the handle
of the first command with that alias where the two differ, and that command’s
Java and Python code names, which those languages write for the hook. A hook no
command is named by is written as typed. The map also carries names:
every command alias, every C++ handle, factory and sensor name with its owner,
and, by language, the names a path’s variable avoids (every Python code name, a
method by its name; Java values but not methods, which a Java variable may share
a name with; every C++ handle, factory and sensor name). pathCodeName avoids
those and, in C++, the macros. autoReservedSymbols keeps an auto’s variables
off every command’s handle and the macros in C++ exports only, so Java and
Python names never depend on them. pathChecks refuses in C++ a hook linked to
no command whose name is a handle, factory or sensor name (cpp-name-conflict),
since only C++ would run that command. Factories and sensor names never take a
number, so cppNameIssues in codegen.ts stops a C++ export that writes one
factory for two commands, a later command’s factory that is an earlier one’s
handle, or a factory that is a sensor’s name (cpp_name_conflict). Reading C++
back maps each handle to its one command, a hook’s handle to its command’s
alias, and x.get() of a static local to its factory’s command. It refuses a
local that ends with the function. A Check is .when(check, side), with
.otherwise(side) after it. A One after another group among a Setlist’s own
steps (the auto’s, or those of a named Setlist the export makes) is
.sequence(...) of its members that run something when it has two or more of
them, and is written straight in otherwise. A group member that is a wait or a
group, in .sequence(...) as in a concurrent group, becomes a named Setlist of
its own. A One after another member is that Setlist’s steps.
lowerSetlist.ts reads a definition’s calls in order as the bindings apply them
and refuses a call-time rule in the words of
tests/fixtures/api/setlistMessages.json (SETLIST_REFUSALS). A call the
editor does not read leaves the code editable. code/exportParity.test.ts pins
the export of autos without these features, byte for byte.
Code surfaces
Path and auto Code modes show the authored definition in CodeEditor, parsed
after a short typing debounce (src/code/useCodeBuffer.ts). Supported edits
update the model while preserving the typed buffer. A parse error keeps the last
valid model and identifies the line. Unsupported forms may be read-only.
This is a structured editor for the emitted subset.
An edit outside the code would regenerate the source and overwrite an unparsed
draft, so the path and auto editors block those edits until the draft parses.
Leaving Code mode or changing its language discards the draft and releases the
block. The explanations are in DRAFT_HOLD in useCodeBuffer.ts.
Each editor store has two flags, which its Code view sets. codeBlocked is true
from a keystroke until a parse succeeds, including the 120 ms debounce before
each parse and any time spent with a failed parse. codeInvalid is true only
while the last parse has failed. Edit handlers check codeBlocked, and disabled
styling and explanations follow codeInvalid. This blocks edits during the
debounce without making controls appear disabled while valid code is being
typed.
- History: both stores refuse undo and redo, and the header disables Undo and Redo with the reason as their title and description. Ctrl+Z, Ctrl+Shift+Z and Ctrl+Y outside the code text do nothing, and inside it the text editor’s own undo takes typing back out.
- Header: rename and the whole-document flip or mirror are disabled.
- Inspector: the selected step’s or waypoint’s settings are a disabled fieldset
with
DRAFT_HOLD.editas its title and description. Capture handlers on it stop events through the debounce and from a control opened before the code broke. - Field:
CodeBlockedNoteshowsDRAFT_HOLD.fieldand takes no pointer events, so both fields still select, pan and zoom. A press on either field only selects, and the path field draws no rotation handle. - Keys: the keys that edit do nothing, Delete on the auto screen and the arrow keys, Delete and paste on the path screen.
- Refusal: the auto store refuses every tree edit,
setAutoField,flipandensureWaypointIds. On the path screen the inspector’s capture handlers, the field’s press handler, the key handler and the store’s rename, mirror, undo and redo refuse them. - Background updates: the Code views also emit from the paths, the robot
configuration and the default limits, which desktop read-back and the robot
constants refresh change from source files. Both wait while
draftHeld(features/sync/draftHold.ts) is true. A path is open, its editor’s state the path’s current one, while an editor holds it (isPathOpen, set byusePathEditing), on the Paths page or beside its auto. Live update reports the wait as pending,DRAFT_SYNC_WAIT(features/sync/liveUpdate.ts), so no sync notice appears. It runs once an editor store changes as the draft parses or is dropped. With Live update off, Update now stays available. A draft that starts during an import stops it before anything is applied (StaleImportError), and that stop is reported as the same wait. The constants refresh keeps reading the file and applies the waiting values ononDraftReleased. - App Settings: the sync notice can open it over an editor, and its units, Live
update and workspace import change what a Code view emits. The Robot Code
page’s language and WPILib year do too. Its settings are a fieldset with
DRAFT_HOLD.settingsas a note, a title and a description, disabled after a failed parse. Its capture handlers refuse events through the debounce.
The views’ other inputs change only on another screen, where no Code view is open, or at startup before the app mounts: the robot configuration and default limits in Robot Configuration, commands and sensors in Commands & Sensors, game packs in Game Packs, and other paths and autos from Home or their own editors.
Copy on a path’s Code tab takes the authored definition. Copy on an auto’s takes
the definition and, before it, each referenced definition the autos file does
not hold; a line under the code names them. Editing the variable
in a path or auto declaration stores its codeName without renaming the
document title. Name changes share the code editor’s validation and undo
history, and dependent exports use the stored name. Generated local references
are rebound when a rename changes symbol allocation.
Use SyntaxCode for blocks, SyntaxText for diagnostic or help text containing code,
and CodeInput through Field.syntaxLanguage for source names in inputs. Ordinary
prose remains text. Code examples, inline names, and errors use the selected language.
The path and auto Code tabs show the project’s language and Copy. In the desktop app, while the autos have a file, they also show that file’s name and count the lines the next write adds and removes. With no file for the autos they show a Give paths a file or Give autos a file link to the Code screen, and the browser build shows neither. Missing required bindings block the affected export and link to Commands. A sensor with no usable code name for the export language blocks that language only. Routine exports use the shared drivetrain registration, and saved legacy robot-connection names do not block them.
features/paths/pathChecks.ts holds every refusal of the path emitter that a
path’s own data decides: field values, crossing depths and targets, keep-in
shapes, limits, the command and End when names written into code, and End when
sensors. The emitter throws the first of them. Auto validation lists them on the
step that drives the path, so the Auto Builder’s issue pill counts them and its
title says how many stop the code. The path editor lists them as the path’s
issues. A name one language cannot write blocks that language only. Each check
has a key of path, check and place, and the auto Code view lists a keyed issue
once, however many sources report it.
In the desktop app, useExistingDefinitions reads the file the autos are
written to, and reads nothing while they have none.
src/code/existing.ts recognizes a limited set of Composer definition patterns
and omits matching generated dependency blocks. This check does not import a robot program, discover
commands, run a compiler, or merge arbitrary edits into an existing file.
Commands & Sensors
The page is one overview list beside a resizable details panel. Each group, Commands, Sensors and Extensions, opens with its count, a sentence saying what the kind is, and its Add button. Each row shows the name, the code name in the project’s language (red, with the naming rule as its tooltip, when it is missing or invalid), what a command changes for the planner (Drives the robot, Extends footprint, Extends while running, Back to bumpers), and the paths and autos that use it, or Not used yet. An extension’s row shows its extra space and the commands that use it. Narrow lists drop the change column, then the usage column. The details panel edits the selected entry at the inspector’s density: name and code name with the line for robot code, More, where it is used, then the footprint preview. Closed, More names its settings beside its title. A kind with no entries shows what it is, the three setup steps and an Add button for the first entry. A link to a deleted entry says it is not found.
A command or sensor is a name. Ending early and robot actions covers how Tempo spells its code names and the line it gives for robot code. Each entry has a name, a stable ID, and stored code names for Java, Python, and C++, filled from the name where blank. The form shows the project’s selected language and the declaration to paste into robot code, with Copy. Fields accept a plain identifier beginning with a letter or underscore, followed by letters, digits, or underscores. A method call, member-access expression, or lambda belongs in robot code behind a named value or callable.
For example, a Java command named Score can link to an existing command value
called scoreCommand. A C++ command can link to makeScore, a factory that
returns a fresh command pointer for each use. Java and Python command fields
name command values. A sensor named Hopper full can link to an existing Java
boolean supplier called hopperFull, or to a boolean method as hopperFull().
Python and C++ sensor fields name the predicate itself. Name validation
checks input syntax, and robot code implements hardware access, supplier
behavior, and command execution.
Add command and Add sensor open drafts with explicit Add and Cancel actions. A draft’s blank code name shows the one Tempo spells from its name and is filled when it is added. Nonblank invalid references block creation, and existing entries save edits automatically. The usage list opens affected paths/autos. Deleting a used link requires confirmation and leaves references visible as unresolved.
The Drives the robot checkbox, under More with the footprint change, records drivetrain ownership: checked means it controls the drivetrain, unchecked means it does not, and a dash means unspecified. A new command starts unchecked. Commands that control the drivetrain, or whose ownership is unknown, make subsequent route position conservative.
Command footprint effects describe no change, a persistent extension, return to
bumper size, or an extension active only during that command. Dimensions come
from a named extension or explicit custom values. The preview shows the chosen
footprint, and robot code operates the mechanism. The path and auto previews
plan and draw each leg with plannedLegExtensions: a leg’s written extension
where it reaches past the bumpers, else what its commands leave, walked as
ExtensionInference walks them. A leg set to No leg extension writes
RobotExtension.none(), which the libraries read as no extension of the leg’s
own. So a command that extends the robot still extends it there. The extension
picker’s hint says so and gives the planned extension, and the waypoint list’s
leg details show the planned extension too. Named Extensions remain in robot
configuration data and are edited from the same grouped workspace.
Path command references, opened from the Commands heading, groups saved path event and fallback aliases, reports matching/missing/ambiguous command links, and opens affected paths. Paths retain those aliases, and autos use stable command IDs.
Sensors are the conditions paths and autos check. A path leg’s End when stores
the sensor’s stable ID in untilSensor. A condition that is not in Sensors
is a typed code name in until, marked Not in Sensors. Path code passes the
sensor’s code name for the language to endWhen, through () -> name() for a
Java method. A typed name is a plain name or a Java method’s name(), which
Python and C++ code write as name. Reading code back maps a code name to the
sensor that has it, and keeps any other name as a typed name. A typed name
stays as stored while the code still writes it. A sensor’s usage list opens the
paths and autos that check it: a leg’s End when, an auto’s Check, or a drive’s
own at or end when command. The bindings file keeps each stored sensor’s fields,
including ones this build does not read.
Import from code, available in the desktop app, adds the commands and sensors
robot code marks for the editor. Java reads the list the Tempo annotation
processor writes for @TempoCommand and @TempoSensor members to
build/classes/java/main/META-INF/tempo/bindings.json, so the robot project
must be built first. Python reads tempo_command and tempo_sensor markers and
C++ reads TEMPO_COMMAND and TEMPO_SENSOR markers directly from source under
the robot code folder. A marked name that autos kept as a block in a team file
cannot reach is listed with its reason and not imported. Links can also be
entered manually, and there is no broader source scanner.
Robot Configuration
The sections are Chassis, Bumpers, Modules (Drive hardware on a mecanum or tank drivetrain), Wheels and Path limits. Physical sections pair editable values with the robot top view, and module and bumper selection opens the corresponding controls. Changes persist automatically.
Setup file
The robot config is one of three pieces of generated code, with the autos and
their paths and the waypoints (Piece in features/robotCode/destinations.ts:
setup, autos, poses). Each language keeps CodeDestinations: homes, the
file each piece is written to, and chooser. A CodeHome is a path in the
robot code folder and a kind: file, a file the editor writes every line of,
or block, one block in a file of the team’s. The autos’ block home keeps
className, the class whose constructor or body the block is in, which
addToFile records. A Java or C++ config or waypoints block home keeps
holder: { scope, classes } and no className: classes is the class the
block is in after the classes it is nested in, and scope is the Java package
or the C++ namespaces the file declares around them. Code outside the file
names the block’s members through all of it. A Python block is in no class and
keeps no holder. storedHome in destinations.ts drops a malformed holder and
a className on a config or waypoints block home. A C++ home keeps beside
for a header that sits beside the sources. A new project has no homes.
placement() in features/robotCode/where.tsx returns null for a piece with no
home. For a block it returns the home’s className, or the last of its
holder’s classes with the holder itself, and for a home that records
neither the class the file is named for. robotProjectFiles in features/robotCode/projectFiles.ts returns only
the pieces that have one, each as the editor writes it. copyPieces returns
every piece as text to copy: what its file holds, or with no home the config as
a CONFIG constant (kConfig in C++), the autos as their definitions and the waypoints as
constants (poseMembers in features/poses/PoseCodeMode.tsx), each under the
imports it needs. workspaceRobotFiles in workspaceFiles.ts returns
{ files, pieces, error }.
A whole file for the config holds the config and nothing else
(setupFileSource). Its names come from the file: homeClassName reads the
class from the file’s name, and folderPackage reads a Java package from the
folders below src/main/java. A C++ whole file is a header. fileLocation
says where a home’s file is on disk: with the code folder src/main/cpp, a
header is under src/main/include (sourceLocation), and a header whose home
is beside is in the code folder itself. Tracking keys, previews, read-back
and the project scan all take the location from fileLocation, and sameFile
in destinations.ts compares two homes by path and beside. The table shows
what a team that created a file of each example name gets.
A C++ #include follows the header’s location (includePath in where.tsx).
A header under src/main/include is named by its path there. A header beside
the sources is on no include path, so the compiler finds it relative to the
including file. poseImport in src/code/poseReferences.ts writes the autos’
include of a waypoints header beside the sources as the path from the autos
file’s folder (../../field/Spots.h from subsystems/drive/Autos.cpp), and as
the path in the code folder while the autos have no file. The configure call’s
include of such a config header is its path in src/main/cpp (see
Drivetrain connection).
| Language | Example file | Declaration |
|---|---|---|
| Java | frc/robot/TempoSetup.java | public static final TempoConfig CONFIG in public final class TempoSetup, in package frc.robot |
| Python | tempo_setup.py | module-level CONFIG |
| C++ | TempoSetup.h under src/main/include | inline const tempo::TempoConfig kConfig in namespace TempoSetup |
The body (features/robot/code/robotSetupCode.ts) declares the config as one
TempoConfig chain of with... calls, with each group of settings
(ModuleConfigs, BumperConfigs and the rest) inside its call. Frame dimensions
exclude bumpers, with width
left-to-right (Y) and length front-to-back (X). The selected WPILib year
controls API spellings.
See Sync robot code for Live update, read-back and conflict handling.
Files for generated code
The Code screen’s list (codeFiles in features/robotCode/codeFiles.ts) has a
row for each piece, in the order autos, waypoints, config, under Tempo’s code
(Generated code in the browser build). The panel’s tabs are Code, Activity and
Checks; the browser build has Code only.
| Row | Shown | Card and details |
|---|---|---|
A piece with a home, in the desktop app (writtenFile) | The file’s name with the piece under it, a status chip, and the diff of what the next write changes | The event that needs attention. The details have a Written to row with the path and Tempo writes the whole file or One block in your file, Live update, and Stop writing this file with its Stop button (CodePanel.tsx) |
A piece with no home (copyRow, built on shownRow) | The piece’s name and its code with Copy | In the desktop app with a robot project chosen, chip No file and a card with Create a file… and Add to a file…. With no project chosen, Open Project. No details |
Configure call (call) | The call with Copy, copy only | No card, chip or details |
Game pack (pack), browser build only | The active pack’s TOML | A card titled PACK_GOES, which names deploy/tempo/game.toml, with Export TOML, which downloads the file. No chip or details |
The rows after these are the other files the editor writes or reads in the
project. The Checks tab’s Files for Tempo’s code check reports how many of the
three pieces have a file, or the reason destinationIssue gives when the homes
cannot be written.
features/robotCode/homes.ts gives a piece its home and takes it away.
CodeHomes.tsx holds the actions the Code screen and the setup guide share
(useHomeActions), the AddToFileDialog and the guide’s HomeRows.
-
Create a file (
createFile): the shell commandpick_new_code_fileingui/desktop/src/path_picker.rsopens a save dialog in the folderpickRootgives, withsuggestedFileNameas the starting name, and writes nothing.homePathturns the pick into the home’s path, and marks a C++ header picked undercpp/asbeside. With the code foldersrc/main/cppit refuses a source underinclude/and a file outside bothcpp/andinclude/, which GradleRIO does not build.createFilesets the home, with a Java file’s package as itsscope, and writes the whole file throughwriteRobotProject.pick_new_code_filereturns{ path, existed }.existedsays whether the file was there when the dialog returned, a dangling symlink included; the dialog asks before it returns such a name, so the replacement was confirmed.createFilepasses that file asoverwrite, and it keeps a backup. A file that did not exist is passed asfresh: when it exists by the timeprepareFilereads the project, the write throwsAppearedFileError, nothing is written and the piece keeps the home it had. A C++ file Tempo writes whole must be a header (.h,.hppor.hh,CPP_HEADER), andcreateFilerefuses any other. In the practice realm there is no dialog, the file takessuggestedFileName(underfrc/robot/in Java), and a file of that name is replaced. -
Add to a file (
pickTeamFile,fileSpots,addToFile): the team picks an existing source file of the project’s language, andAddToFileDialogshows the file’s outline with each spot the block can take. The config and the waypoints are members, so their spots come frommemberSlots: in Java the top of each class, after each member and the class’s end; in C++ the end of each class; in Python after each statement of the module from its last leading import on. A slot never falls inside another marked block: one after the last member of such a block is the line after its end marker. The autos go between the statements of a constructor, and in Java also among the class’s members or in a method of their own.autosSlotslists those spots for every class in the file that has a constructor, and with several such classes each spot’s label starts with its class.addToFilewrites the one block at the chosen spot at once, keeps a backup and records the piece’s part of the file’s tracking. It sets the home with the class the block is in: theclassNameof the autos’ slot, or for the config and the waypoints theholderthatreadBlockHolderinblockHolders.tsreads from the file as written. The write is refused when the file changed while the spot was being chosen.pickTeamFileandaddToFileboth refuse a filedestinationIssuerejects as the piece’s block home, before a spot is chosen. -
A config or waypoints a file already holds (
heldBlock): the dialog lists no spots.existingMembersinsetupBlock.tsfinds code outside Tempo’s markers that declares what the block declares: for the config aCONFIGmember of a class (C++kConfig, as a member or defined outside its class; Python a module-levelCONFIG), and for the waypoints members named as the constants Tempo declares, one per saved waypoint and landmark (poseNames). The Dialog andaddToFilecolumns are for code that states what Tempo would write there.heldBlockThe file Dialog addToFileblockHolds the piece’s block between Tempo’s markers ”already holds a … block between Tempo’s markers, as Tempo would write it”, with Use that block Writes nothing to the file replaceDeclares those names outside the markers, as one member or one run of consecutive members of one class (Python: of module statements) on whole lines of their own, each name once Names the declarations, with Use that code wrapMembersadds atempo:beginand atempo:endline around those lines at the indent of the first. The lines themselves are unchanged, and a backup is keptclashDeclares those names spread over the file, on a line shared with other code, or one name twice, or defines a C++ kConfigoutside its classclashText: the names, and to remove or rename them. The add button is disabledThrows clashTextFor
blockandreplacethe tracking record is Tempo’s block aswithBlockwould write it there, without the comment and C++public:lines that the file’s block does not have (adopted): read-back imports an edit made in the file only while the rest of the block is as recorded. -
Autos a file already holds (
heldAutos): the dialog lists no spots. The cases are checked in this order, and the Dialog andaddToFilecolumns are for code that states what Tempo would write there.heldAutosThe file Dialog addToFileleftStill holds the blocks its tracking record keeps as left, found as Tempo left them”still holds the autos Tempo wrote”, with Use those autos Tracks the blocks where they are, with the generatedandpathLinksthe record kept. The file is not writtenreplaceDefines names Tempo would write, in code existingAutoscan track as one blockNames the definitions, with Use that code Tracks that code as Tempo’s block, with the indent its first line has. The file is not written clashDefines such names where the block cannot be told from the code around it clashText: the names, and to remove or rename them. The add button is disabledThrows clashTextA file that defines none of the autos’ names takes them at a chosen spot.
-
Held code that differs from Tempo’s (
heldDifferenceinhomes.ts): for every case butclash, the dialog generates the piece as a block in that file and compares it with what the file holds. The add button is disabled while the comparison runs. AHeldDifferenceis thelinesthe dialog lists and, when read-back could not import the file’s version, the reason asunreadable. Names Tempo writes in full for the file, its comment line and blank lines are no difference.Piece Compared by No difference when linesConfig setupDifferenceinreadBack.tsBoth blocks state the same config, read as read-back reads them, and the code around the config is as Tempo writes it Each setting that differs, with Tempo’s value and the file’s Waypoints posesDifferenceBoth declare the same constants, with x and y within 5e-4 ( sameinposeReadBack.ts)The constants only Tempo declares, those only the file declares, and those with other values Autos autosDifferenceThe main block’s definitions match statement for statement and the blocks are equal but for whitespace The paths and autos only Tempo defines, those only the file defines, and those defined differently With a difference the dialog lists the lines and shows two buttons in place of the add button, and
addToFile(piece, file, spot, choice)throws unlesschoiceis given:- Keep the file’s version (
"file"): the code stays as it is; for aheldBlockreplacethe markers go around it and a backup is kept. The config or waypoints record is theadoptedone, and the autos record holds Tempo’s text for the main block with thegeneratedandpathLinksof what Tempo generates.takeFileVersionthen runs read-back with the file winning, so the difference is imported into the workspace at once. The button is disabled when the difference isunreadable, the dialog shows the reason, andaddToFilethrows it. - Write Tempo’s version (
"tempo"): a config or waypoints block is written between the markers withwithBlockand recorded as written. The autos are tracked as the file holds them andwriteRobotProjectwrites Tempo’s over them. A backup is kept.
When the import or the write fails,
addToFileputs back the file’s tracking record and the piece’s home, and takes out the markers it added while the file is still as it left it. - Keep the file’s version (
-
Stop writing (
removeHome): the home goes, the piece’s Live update entry, pending write, status and read-back report go (remove(id)infeatures/sync/syncStore.ts), and the piece’s part of the file’s tracking record is forgotten (forgetTracking). The autos in a team file are the exception:leaveAutosinwrittenFiles.tsmoves theirslices,generatedandpathLinksto the record’sleft(WrittenFile.left) and drops the spot chosen in Place. Tempo writes and reads back nothing fromleft; it is whatheldAutosfinds when the autos are added to that file again, and autos written to the file replace it. The file keeps the code it holds, and the piece is a copy row again.
createFile and addToFile set the home before they write and put the earlier
home back when the write fails. Both drop the piece’s Live update entry, so
Live update for the file starts off.
destinationIssue in destinations.ts says why a set of homes can’t be
written. Besides a second piece on a file Tempo writes whole and a file name
that can’t name its class, it refuses:
- A C++ config or waypoints block in a file that is not a header. Other files
reach those members by including the file, and the build offers only headers
for that. The autos’ block may be in a
.cpp. - A Python home that generated code imports as a module (the config, the waypoints and a whole autos file) when a folder of its path or the file’s stem is not an identifier, since the import spells each folder as a package and the file as a module. The autos’ block in a team file is imported by nothing Tempo writes and is not checked.
Each changed write keeps a backup, three per file (KEPT_BACKUPS in
gui/desktop/src/code_sync.rs). list_backups orders them newest
first by millisecond, then by sequence. The single backup slot that builds
before timestamped backups kept has no sequence and sorts as the oldest entry
of its own millisecond, since its time is the file’s modification time, which
is coarser than the clock that names a backup. Pruning therefore drops that
slot before a timestamped backup of the same millisecond.
Live update, Write and read-back run only for pieces with a home. A stored
Live update entry (FileSync) carries no stopped mark: a piece Tempo does not
write is a piece with no home. liveOn is the switch for every file and the
file’s own, and readBackOn is false only for the config with Read edits back
off. liveScopeOf
in features/sync/syncStore.ts is [root, lang, setupHome, autosHome, posesHome], each home as kind:path, with :beside after a header beside
the sources, or null. sameFileScope compares the
folder, the language and the piece’s own home, so a change to one of them
pauses that file’s Live update and a change to another piece’s home does not.
The setup guide (SetupGuide.tsx) has five steps: Project, Files, Drivetrain,
Field & sensors and Review. The Files step shows HomeRows, one row per piece
with its file and Stop writing, or Create a file… and Add to a file…, then Add
autos to the chooser and the constant-name style. Creating a file or adding
to one writes it in that step. The Review step lists each file the last step
writes, and its button writes every piece that has a home and is ready.
Stored settings from before pieces had homes hold packageName, setupClass,
autosClass, posesClass and files for each language (legacyDestinations).
hydrate in features/settings/settingsStore.ts turns them into homes with
features/robotCode/homeMigration.ts:
legacySettingsreads them with the defaults they were read with, andlegacyPlacespells the file each named.homesFromLegacygives a piece that file as its home when a tracking record (tempo.robotCodeWrites.v1ortempo.codeTracking.v1) shows the editor wrote the piece there, or when the team named the file by path infiles. The evidence is the piece’s own (wrotePieceinwrittenFiles.ts): a whole file’stext, the config’sblock, the waypoints’poses, and for the autos a slice whose id starts withautos, so the slices of an old setup block do not count as autos. A piece that the storedtempo.codeSync.v3marksstopped: truegets no home.storedStoppedinfeatures/sync/syncStore.tsreads that flag from the raw stored value (loadStoredStopped) for this step alone;parseSavedLivedoes not keep it. A whole file keeps the package or namespace and the class it had, as the home’sscopeandclassName, so its next write changes nothing. A block home names its file alone.migrateLiveScopesrewrites the Live update scope of each file that stays where it was, so the load does not pause it. The entry of a piece left with no home is dropped.
Nothing on disk is rewritten. connectionMigration.ts moves tempo.codeSync.v1
connections onto the legacy shape first, so they take the same path. The
browser build drops every home at hydrate.
In the desktop app hydrate then runs readBlockClasses in
features/robotCode/homeHolders.ts, which reads once the file of each block
home that records no class. A Java or C++ config or waypoints block gets its
holder from blockHolder: the class its markers are in, or for a file
without the block the class the file is named for. The autos’ block of a
migrated home gets as className the class around the autos text its legacy
tracking record holds, when the file holds that text once. A file that can’t
be read, or declares no such class, leaves its home as it is.
Config in a team class
A home of kind block keeps the config as one marked block in a file of the
team’s (configBlock in projectFiles.ts, features/robotCode/setupBlock.ts):
Java a public static final TempoConfig CONFIG member, C++ a public:
inline static const tempo::TempoConfig kConfig in the class declaration in the
header, and Python a CONFIG constant of the module. The block sits between
tempo:begin config and tempo:end config comments and its imports between
the config-imports ones. The waypoints are kept the same way, between
tempo:begin poses and tempo:end poses with a poses-imports block. Both go
through the same functions in setupBlock.ts, which take the block’s id
(MarkedBlock): blockRegions finds a block and its imports, withBlock
writes them, withoutBlock removes them, blockHolder reads the class around
a block, and memberSlots lists the spots a new block can take. The autos in a
team file are tracked plain blocks with no marker comments
(features/sync/plainSource.ts).
A file with no block gets one at the spot chosen in the Add to a file dialog.
With no spot given, withBlock adds it as the last member of the class the
home records, else the class the file is named for, or the file’s first class
(Python: at the end of the module). The editor reads and writes only what is between the markers.
prepareFile in projectSync.ts compares the block with the one last written
or read, readBackSetupFile reads edits inside the config block as it reads a
whole file, and readBackPosesFile reads waypoint edits from the waypoints
block.
The Code screen’s Place view moves a config or waypoints block (MarkedPlace
in PlaceSlots.tsx), whatever New code tracking is set to. blockSpots in
setupBlock.ts takes the block and its imports block out of the file and
lists the member slots of what is left, with the slot the block came out of
shown as Here now. Choosing another spot and Done runs moveMarkedBlock in
placeActions.ts at once, under the source lock. It refuses a file that
changed since it was shown and a spot that is gone. The block and its imports
block go back in at the spot with their marker lines and the text they held,
nothing else in the file changes, and the shell keeps a backup. A block that
was as Tempo last wrote it is tracked as it reads after the move, and an
edited one keeps its record, so the edit is still read back. Autos blocks in
the same file that were tracked by the code around them are found by their
text and tracked where they are (autosAfterMove). A block that lands in
another class makes that class, with what the file declares around it, the
home’s holder.
For a file read without the block, the view shows where the first write puts
it. Place for the autos moves nothing at once: with New code tracking on it
saves the spot the next write moves them to.
One file can hold a block of each piece. writtenFiles.ts keeps one tracking
record per file, and each piece reads and replaces its own part of it
(pieceRecord, withPiece, withoutPiece): the autos’ slices, generated,
pathLinks and place, the config’s block and setup, and the waypoints’
poses. A record can also hold left, the autos blocks Stop writing left in
the file, and a record with only left is kept. writeRobotProject prepares the pieces that share a file in a chain,
each writing its block into what the one before it leaves, and writes the file
once. Each block’s imports are computed against the team’s own code with every
other block of the editor’s left out: withBlock blanks every marked block and
each of the autos’ tracked texts (tempos) in the code it compares against,
and withoutMarkedBlocks in features/sync/syncSource.ts blanks the marked
blocks before the autos’ imports are placed. Each block therefore brings the
imports it needs, whichever other blocks share its file. A file the editor
writes whole holds one piece: destinationIssue refuses a second piece on it,
and pickTeamFile refuses to add a block to it.
setupReference in configureCall.ts names the config where it is
(Drive.CONFIG, drive.CONFIG, Drive::kConfig), so the call to copy,
the project check and the Checks row follow the home. The class is named as its
file declares it: blockHolder reads the class the block is in, with the C++
namespaces and outer classes around it (robot::Constants::kConfig) or the
Java package the file declares, which the import spells. The home’s holder
stores that reading, for the config block and the waypoints block alike, so
the call and the autos name the class in full before the project is read
again. Each read of the file brings it up to date: addToFile,
moveMarkedBlock and migrateOldSetup set it with the home, scanConfigure
stores the config’s through noteBlockHolder, and previewRobotProject
collects what prepareFile reads and stores it when it finishes
(keepHolders in projectSync.ts). A write stores it before it generates:
refreshHolders in blockHolders.ts reads the file of each Java or C++
config or waypoints block home and stores the class its markers are in, and
writeRobotProject, writeCodeFiles, addToFile and moveMarkedBlock run
it first. A file that can’t be read leaves its home as it is.
writeRobotProject generates its files again when a holder changed, so a
block cut and pasted into another class is named by that class in the first
write that follows. When prepareFile still reads another class under the
source lock, keepHolders stores it and the write stops with
StaleImportError before any file is written. keepBlockHolder writes the
settings only when the home is still that block in that file and holds
another holder. A holder is what a file of the open project declares, so
settingsStore.update drops every holder when the code folder changes
(withoutHolders). A file that does not hold the block yet is read for the
class the file is named for. A home with no holder is taken to declare the
class its file is named for, in the package its folder spells. Python names
the module by its path in the code folder.
Each line of a block Tempo writes is at the block’s indent, and a blank line
inside it is empty (regionBody in features/sync/managedSource.ts). An
autos block that differs from the generated one by blank lines alone keeps the
blank lines it has, and those that hold only spaces or tabs are emptied
(emptyBlankLines in features/sync/plainSource.ts). A whole waypoints file
ends with one newline (poseConstants in features/poses/PoseCodeMode.tsx).
The block names what it means in a file that gives a generated name another
meaning (adaptBlockSections in sync/sourceImports.ts, which sees the file
without the editor’s blocks). Java: a generated type or unit that the file’s
own code uses without making the same import (a team import or wildcard, a
nested class, a class of its package, a field) is written in full in the body
(new edu.wpi.first.math.geometry.Translation2d(...)) and its import is left
out, so neither side changes what the other’s name stands for. Python: a
generated name the module binds or uses is imported as _tempo_<Name> and the
body uses the alias. C++: the body is qualified with tempo:: already, and
says ::tempo:: where the file declares a tempo of its own.
plainBlockNames turns these forms back into the short names before
readBackSetupFile parses the block, and the tracking record keeps the block
as written.
A write of the config clears any other place this project’s tracking record
holds the config (staleSetups in projectSync.ts): a block comes out of the
class it was in, with a backup, and a whole file is left in the project and
dropped from the record, since the desktop shell has no command that deletes a
source file. The file’s card says where the config moves from and says to
change the fifth argument of the call. Stop writing forgets the piece’s
tracking itself, so this applies when the home changes without it, as when
splitting an old setup block moves the config out of a whole file.
Drivetrain connection
Robot code hands the config to Tempo with one Tempo.configure(...) call
(tempo::wpi::configure(...) in C++). The call belongs to robot code: the editor
shows it to copy and looks for it in the project, and writes no file that
contains it. The editor stores no drivetrain class and no method names.
configureSnippet in features/robotCode/configureCall.ts builds the call
with its imports. The first four arguments are conventional names for a team
to edit (getPose, resetPose, getRobotRelativeSpeeds,
driveRobotRelative, as method references in Java, bound methods in Python and
lambdas in C++), the fifth is the config, and the last is the subsystem.
setupReference names the config by its home: TempoSetup.CONFIG,
tempo_setup.CONFIG or TempoSetup::kConfig for a whole file of that
name, and the class that holds the block for a block (Drive.CONFIG). With
no home for the config the call passes the bare CONFIG (kConfig in C++)
and carries one comment line, placeholderNote, which says that CONFIG
is in the Robot config code; the snippet is then marked placeholder. A call
that names the config’s file carries no comment.
The C++ include of a config header under src/main/include is its path there.
For a header beside the sources (CodeHome.beside) the file the call goes in
is not known, so the include is the header’s path in src/main/cpp and the
snippet is marked fromSources. The call then carries the comment line
INCLUDE_NOTE, which says the path is relative to src/main/cpp.
C++ lambdas take frc::Pose2d and frc::ChassisSpeeds for 2026, and
wpi::math::Pose2d and wpi::math::ChassisVelocities for 2027.
The call is shown with Copy in three places: the Code screen’s Configure call
row; the setup guide’s Drivetrain step, titled Connect the drivetrain; and
the Checks tab, as Copy the call while the project has no call.
ConnectDrivetrain.tsx renders the guide’s copy.
In the desktop app with a robot project chosen, scanConfigure in
features/robotCode/configureScan.ts reads up to 400 source files of the
project’s language, skipping a whole file the editor writes the config to. C++
is read from the folder that holds cpp/ and include/. configureCalls finds
every configure call and classifies its config argument, which is the fifth
argument of the drivetrain form and the only argument of the config-only form.
The four drivetrain arguments are not read, so method references, lambdas and
getters on other objects are all accepted. connection prefers a call that
passes the generated config over one that passes another. With no home for the
config, an argument that is CONFIG (kConfig in C++), bare or after a
class or module name, counts as the generated config.
The rows below are for a config kept in a whole file named TempoSetup.java.
| Project | In your project row (guide) | Drivetrain connected (Checks) |
|---|---|---|
| A call passes the generated config | Drive.java, line 88 | Passes, with the file and line |
A call passes a TempoConfig built in the call or another expression | Drive.java, line 88 · passes a TempoConfig built in the call. Change the fifth argument to TempoSetup.CONFIG. | Warns, with the same instruction |
| No call | Not found | Warns not found, with Copy the call |
The In your project row never disables Next. The browser build shows the call
and Copy without the row.
Old setup block
A robot project can hold a setup block that the editor wrote into a team class:
the config together with the configure call, or a call to a setup class’s
configure(this). features/robotCode/oldSetup.ts recognizes two forms.
trackedOldSetup finds a block that the tracking record of a team file lists
as a config slice; prepareFile looks for it when it prepares the config’s
file, so it is reported while the config has a home. hasMarkedSetup finds one
between tempo:begin and tempo:end comments in the project scan, and it is
reported with or without a home. Either adds the Old setup block check and a
card on the config’s row with one action, Split the block…, which the guide’s
Review step also offers. While a tracked block remains, writing the config’s
file fails with OldSetupError and the card says Tempo doesn’t write the file.
Split the block… opens MigrateSetupDialog, titled Split the old setup block?.
On confirmation migrateOldSetup(old, byHand) in
features/robotCode/setupMigration.ts makes the class the block is in the
config’s home, of kind block (C++: the header named for the source, where
sourceLocation puts it),
replaces the old block with the configure call alone, removes the block’s
tracking record, and writes the config there as a marked block. The config
always stays in that class. The call keeps the block’s drivetrain arguments
and takes the config from its own class. A block that called a setup class
takes that class’s call with its drive parameter written as this or self,
and a block with no call at all takes the call configureSnippet builds.
Each file replaced keeps a backup. The call is untracked afterwards. No other
code reads the block format, and no write replaces a block without the
confirmation.
The migration is whole or not at all. When the block is not found as the
editor wrote it, or it calls a setup class whose own call cannot be read,
migrateOldSetup throws UnreadSetupError before anything changes: the team
file, the tracking record and the config’s home stay as they were. The error is
kept in useSetupMigration, and the config’s card turns into “Tempo can’t read
its old setup block in byHand: the team file must hold a configure call that passes the config from
the class it is kept in; the team file is then left as it is, its tracking
record is removed and the config is written. When the config cannot be written
after the team file was, the team file, the tracking record and the home are
put back.
Reading the config back
The config’s file is two-way, as a path’s Code tab is. The first line of a
whole file is the comment SETUP_FILE_NOTE in projectFiles.ts:
Tempo's GUI writes this file and reads your edits back.
A block starts with SETUP_BLOCK_NOTE, the same sentence about the block.
readBackSetupFile in features/robotCode/readBack.ts runs while the config
has a home, when a project is connected and whenever Live update, Write or the
file check finds the file changed on disk. A whole config file that is in the
project with no tracking record is read the same way before anything is
written to it. discoverRobotConfig in features/sync/configSource.ts
reads the file’s one TempoConfig chain. It does not parse the configure call, so no form of the
call is refused. Before a write, prepareFile in projectSync.ts compares the
file with what the editor last wrote or read and reads it back first, so no
write replaces a hand edit unread.
| File since the last write or read | Result |
|---|---|
| A readable edit, Robot unchanged | Robot adopts the values and the next write keeps them. The file’s card and Activity offer Undo import. |
| A readable edit, Robot changed too | A conflict: Robot configuration changed in both Tempo and <file>, with each differing setting as Tempo -> file values. The card offers Use the file’s version, Use Tempo’s version, Always use my code and Keep my code. |
| An edit the importer cannot show on Robot | The file is left as it is and shows Needs you. The card says what could not be read and offers Use Tempo’s version and Keep my code. The file is not written until one is chosen. |
Readable edits are the values Robot has a field for: mass, modules and gearing,
motors, wheels, limits, footprint and bumpers, PID, tolerance, lag, measured
limits, planning, replanning, terrain caps, the game pack, the obstacle margin,
the supply current limit, and in Java a constant from a connected constants
file. A call in the chain that Robot has no field for stays as written. The
importer cannot show an unresolved constant in a setting it reads, a file with
more than one TempoConfig chain, or other code added to the file.
Use Tempo’s version replaces the file and keeps a backup first. Keep my code
runs removeHome("setup"), as Stop writing does: the config has no home, the
file keeps its code, and the config’s row is a copy row with Create a file… and
Add to a file…. With the file’s Read edits back switch off, the next write
replaces edits with the editor’s version and keeps a backup.
Robot code may also pass a config of its own in the configure call and leave the generated config unused; the Drivetrain connected check then names what the call passes. Workspaces that carry drivetrain method names or a drivetrain destination load, and those fields are ignored.
Advanced-control feedback needs its own configuration (see wrapper policy).
Sources: src/features/robot/code/robotSetupCode.ts,
src/features/robotCode/destinations.ts, where.tsx, homes.ts,
CodeHomes.tsx, projectFiles.ts, workspaceFiles.ts, setupBlock.ts,
blockHolders.ts, homeHolders.ts, placeActions.ts, PlaceSlots.tsx, writtenFiles.ts,
homeMigration.ts,
connectionMigration.ts, configureCall.ts, configureScan.ts,
ConnectDrivetrain.tsx, setupMigration.ts, oldSetup.ts, SetupGuide.tsx,
RobotCodeSettings.tsx, CodePanel.tsx (ChecksTab), readBack.ts,
projectSync.ts, codeFiles.ts, src/features/sync/configSource.ts,
syncSource.ts, syncStore.ts, src/code/poseReferences.ts,
src/features/settings/settingsStore.ts, and
gui/desktop/src/code_sync.rs.
Poses and game packs
The Waypoints page sits on the path and auto editors’ layout (EditorShell).
Its tools (Select, Add waypoint, Add landmark, Show uses, Undo, Redo) float at
the top of the field in the path tool bar’s look (PoseToolbar.tsx). Focus sits
with the view controls at the field’s bottom right. The searchable list and the
selected entry’s details fill the Properties tab, and the generated waypoints
code fills the Code tab. The field draws each saved waypoint as the robot at
that pose, as a path draws one at each of its waypoints: the configured
footprint with its front edge marked, and a circle with a heading tick at its
center. A landmark has no heading and is a diamond. Add waypoint and Add
landmark place an entry where the field is clicked and select it, named the
next free Waypoint N or Landmark N (PoseCanvas.tsx, nextPoseName). Position
inputs show the selected length units, and heading is in degrees
counterclockwise from positive X. Dragging or arrow keys move a selected entry
(5 cm, or 25 cm with Shift, and 0.25 in or 1 in when lengths are in inches).
Shortcuts are suppressed while editing text. Changes propagate to linked
waypoints, and deleting a saved waypoint unlinks them while preserving their
current position and heading. The Code tab is read-only. It has the language
control and Copy and shows no file name. It shows what the waypoints’ file holds
while they have one, and otherwise the constants as members to paste into a
class (poseMembers in features/poses/PoseCodeMode.tsx).
The Game Pack editor keeps one narrow Field definition pane across TOML,
Reference, and Elements so the field stays primary. It uses
clamp(340px, 30vw, 480px) on wide screens and stacks below 900px. Reference
topics have search, grouped navigation, highlighted examples for each topic, and
an explicit Insert action that inserts at the TOML caret. Examples include each
listed field, and mutually exclusive settings appear as commented alternatives.
Tests validate the examples through both the editor parser and the wasm core
after the normal editor-field/unit conversion. Valid TOML updates the field, and
invalid text retains the last valid preview. Reference images and surveyed-tag
overlays are editor data stored separately from exported TOML.
mirrorH = "otherId" derives a same-alliance copy across the horizontal field
centerline, and the core expands these copies before alliance symmetry. The
editor’s canvas-only overlays follow that order, while the authored TOML retains
one block. Selecting a generated copy locates its source block. Duplicate
generated ids are rejected within the same category and alliance.
Element selection includes category and alliance as well as id. The dimensions
readout below the field uses the core’s resolved geometry, including generated
copies, and the app’s length units. Selecting a mirrorH assignment selects its
named copy. Sizes and min/max coordinates are axis-aligned field bounds, and
circles also show radius. Pending or rejected edits hide measurements until the
current TOML parses successfully.
Ctrl+/ (Cmd+/ on macOS) toggles line comments in the code editor. A selection
applies to each selected line, and an empty selection applies to the current
line. In the Game Pack editor, each toggle is one undo entry. Both # and //
start comments outside strings. Commenting a complete element block removes it
from the field and planning. Stored editor documents retain the typed markers.
TOML export and core input convert // comments to # without changing
strings or line positions.
Components
Shared vocabulary lives in src/components/: Button, IconButton, Icon,
Modal, Menu, Disclosure, FormRow, NumberField, EditorHeader,
InfoHint, Field, Select, SegmentedControl, Toggle, Switch,
CodeEditor. Toggle is a labelled checkbox for forms and Switch is an
on/off control that applies at once, named by the row around it.
Forms and controls are grouped under form/, shells and overlays under
layout/, and navigation and sidebar controls under navigation/. The
primitive buttons, badges, icons, and branding remain at the component root.
Authoring screens compose, in addition:
src/components/outline/:OutlineRow(index badge or icon, label, sub, mono meta, issue dot, hover-revealed actions, drag grip that follows its row out of the tab order),AddButton(the list’s one add affordance),EmptyState(title with its hint as visible text). A row takes atabIndexso a list can hold one row in the tab order and move focus with the arrow keys. It reports the shift state of the click or key press that selected it.src/components/inspector/:InspectorSection(section label + column of controls, hairline between sections, and a string hint sits beside the heading, outside it, so the heading’s accessible name is the title alone),InspectorRow,ChoiceCards(a few exclusive modes, each with its meaning spelled out), andAddInline(the compact add button an entry list’s disclosure row carries).src/components/code/CodeView.tsx: the generated-file surface described above.src/icons/withsrc/components/Icon.tsx: 16px 1.5-stroke line icons, one SVG file each, with the editor vocabulary (drive, command, wait, parallel, race, deadline, sequence, branch and the check-step diamond for a Check, auto, point).
Plain-English names for what users build are in src/features/autos/labels.ts
(“At the same time”, “Until the first finishes”, “Until the leader finishes”,
“One after another”). API names belong on code surfaces, and task controls use
the literal names of the things being edited.
The shared navigation controls carry their own keyboard and assistive-technology
contract. The overflow Menu announces aria-haspopup and aria-expanded,
focuses its first enabled item on open, walks with ArrowUp, ArrowDown, Home and
End, closes on a press outside, and returns focus to its trigger on Escape or a
pick. Tabs keeps the selected tab as the group’s one tab stop and moves the
selection with ArrowLeft, ArrowRight, Home and End. Given idBase each tab
names the tabpanel it controls. Modal’s toolbar holds a strip, such as
tabs, between the title and the scrolling body. The active navigation item
carries aria-current as well as its color.
New screens compose the shared controls, and visual changes go in the shared
component so its callers remain consistent. src/components/form/SchemaForm.tsx
renders fixed robot hardware forms. Help belongs in InfoHint, and empty states
identify what is absent. Disclosures hold optional depth, with the ordinary form
visible first.
Motion
Purposeful state transitions use the duration/easing tokens. There is no
page-load choreography or ambient animation. The editor’s
prefers-reduced-motion rule removes drawer transitions.
Review expectations
Review common controls, labels, keyboard focus, invalid/empty states, and the field at the actual target viewport and display density. Each screen should make its main task clear without stretching small forms or obscuring the field. Record visual checks alongside the automated test results for the same revision.