Skip to content

5.6 Guided editor course

Home > Learn opens a protected practice workspace in the normal editor at /. Its book icon is directly above Robot Configuration. App Settings > General can hide Learn, but the preference defaults to shown. Direct links use ?lesson=<id>, and tutorial.html redirects to that entry.

All 18 lessons begin on practice Home. Each action highlights one real editor control. The learner opens paths, pages, panels, menus and tabs through their normal controls. Advancing never navigates or selects a document item. Back restores the starting authored state and coaches any navigation needed to repeat the action.

Step model

LessonStep names a stable ID, one action, a precise target, an instruction, and an optional explanation. Instruction plus explanation has a 25-word limit. Actions are clicks, typing, a key or chord, a range drag, a drag or double-click on the field, playback, a download, or a code edit. A field drag counts once the pointer lets go, so a step never moves on mid-drag. A matching numeric draft commits through the field’s normal commit function without a separate Enter step. Finish lesson closes the lesson. It has no closing explanation.

Completion is a projection of current editor stores, authored documents and React control state. It never requires an input or transport event receipt. Every relevant state change recomputes the goal, including values entered before their step opens. Combobox choices require the selected value and a closed menu. Opening a menu also passes when its desired value is already selected. Code checks require the instructed source fragment, parsed path and error state. SourceEditor and textarea code views expose their controlled source through the same control-state adapter. An invalid-code goal requires the named invalid draft, including its language, so a missing argument alone cannot satisfy it. Typing goals reject unfinished drafts even when the last committed value already satisfies the document check. Authored numeric goals require the instructed value, without a placement tolerance.

Practice inherits both complete unit sets and Simple names from the workspace. Editor and Robot configuration each have length, speed, acceleration, mass and rotation preferences. Robot configuration also has MOI. Use the same units links the Robot set to the Editor set. Robot configuration instructions, inputs and diagnostics use the Robot scope. Path and field steps use the Editor scope. Lesson quantities resolve their scope through scopedUnits, the same selector used by editor controls. Quantity instructions and diagnostics render through the units module. Numeric goals compare canonical quantities after the complete instructed draft lands, with a tolerance of half the field’s display increment. Trimming zeros from the instruction does not widen that tolerance. Editable quantities retain their full precision. Code literals remain in the source language’s canonical units, with their field coordinates shown in the selected display units. Completed numeric steps retain the entered canonical quantity. Later checks use that value even when its displayed instruction rounds differently in another unit. The current step still uses current preferences. Resume recovers missing quantity receipts from saved step starts and validates them against the possible instructions. Back removes receipts for the steps being repeated.

Ordinary Play steps advance when a current routed plan starts playing. Arrival, stop, wait and rotation exercises advance at their specific timeline point. Command exercises advance at the scheduled start shown by the robot’s flash. Playback continues after advancing. Edits and lesson exits stop it. Practice playback stops at the endpoint and preserves its cursor there. Back restores the previous step’s starting documents. Skip records an incomplete step.

Segmented choices use one Tab stop and arrow-key selection. The coach accepts the highlighted option only after it becomes checked. Saved poses detach through Position source > Custom position. Ending early opens before its fields, and Tolerance > Custom reveals the position and rotation errors. Workspace backup remains on App Settings > General. Robot project is a separate desktop-only tab. Done leaves path editing inside an auto, saves the path and keeps its drive selected. Escape also leaves path editing. Rotation targets are edited through Add in the outline’s Rotation targets section. Closing its panel returns to the leg inspector.

Commands & Sensors lists each item with its Code name. Selecting an item opens Name and code. A command’s More section holds Footprint change. Robot Code has Drivetrain, Commands & sensors, Paths & autos and Waypoints sections. Each code block uses the shared code view. Copy completion belongs to the selected block, so copying another block cannot advance its step.

Screen and document context identify the destination without opening it. access describes controls needed to reach a hidden target. After resume or an off-course click, the coach points to the missing navigation control and waits. Show me first highlights each recovery control for 500 ms, then may click it. It stops at the requested control and never enters values or awards a pass. Changing steps cancels a pending hint.

Lesson text and check messages write a concept that Simple names renames as a {key} token from src/vocabulary/names.ts ({group.parallel}, {end.until}), and the Coach reads each one in the current form. A target on a renamed control selects a stable hook such as [data-row="end-limit"] input, never the control’s accessible name.

The spotlight follows the exact interactive target, including individual menu options and the visible label of a styled checkbox. Scrolling only brings the control into view. An arrow and static outline identify it. A shade dims the window except the target and the field areas (.editor__canvas, .field-viewport, .pack-editor__canvas, view controls included), which stay bright and take the pointer. The shade and the outline ignore pointer events. While a modal is open only the target stays bright. The outline and the bright area cover the part of a target that shows: a code line with no break is wider than the editor that scrolls it. The compact card chooses a neighboring placement that leaves the target exposed. Under 900px the card docks along the bottom; a target under it is scrolled clear, and a path or auto screen keeps room below its last rows for that. The next instruction is announced politely without moving typing focus. While a modal is open, the coach and spotlight share its dialog and focus boundary. The editor-tools lesson closes Settings before Finish lesson. Code fields retain Tab indentation. Escape followed by Tab moves focus out of the field.

Course and practice robot

The curriculum maps the lessons to editor controls and robot APIs. Exercises use the shipped REBUILT 2026 pack and production WASM planner. The first route crosses the field around the bump and trench. Practice uses a 4.5 m/s velocity cap and 6 m/s² acceleration, with the default four-module Kraken X60 swerve. Playback runs at one simulated second per elapsed second.

Short explanations accompany visible effects. THROUGH is the default Composer arrival. The editor calls an intermediate THROUGH arrival Keep moving. The editor separately defaults the final speed to zero. Face point continuously aims at the landmark during the leg in browser preview and on the robot. The event marker and robot Condition.progress both place a fraction of the distance along the current leg’s planned path, so they mark the same point. Neither means elapsed-time percentage.

Condition.remaining uses planned distance left in the current leg, bounded below by straight-line distance to its target, and follows replans. Condition.matchTime uses the root auto clock. These robot forms are documented in java/src/main/java/com/tempo/Condition.java. The course does not execute robot predicates or mechanisms. Command estimates affect browser timing, but command completion controls the robot. Declared extensions describe clearance without actuating a mechanism.

Session boundary

The host retains the normal App with its document, history, selection, code buffers, view and preferences. Entry acquires the source lock, waits for persistence transactions and recovery, drains native saves, and suspends workspace activity. Cancellation or a ten-second timeout releases the entry queues without cancelling accepted saves.

The host keeps its own Exit lesson control until an authenticated ready message confirms that the practice editor mounted. Loading and import failures retain that control and the preserved workspace.

The practice iframe loads the same / app with practice=1. Its entry installs the practice boundary before importing stores. It renders the production App, PathScreen, EditorShell, canvas, sidebars, inspectors and playback. Practice never hydrates normal workspace or recovery data, and desktop bridges are unavailable. Local and session layout/navigation preferences use a realm-local map. Normal preference writes still propagate storage errors to their callers. Practice imports do not open the project-picker IndexedDB database or restore its folder handle. Picker calls and pending selections check workspace activity before reading or persisting handles. Workspace import replaces only practice stores and skips the normal recovery journal. Robot settings, packs, bindings, saved poses, colors and keybinds reset with the lesson and resume with its authored snapshot.

The parent editor supplies current Editor units, Robot units and Simple names before practice starts, then sends each change to the mounted practice frame. Coach text, numeric fields and quantity targets use those live preferences. Parent display changes persist while workspace activity is suspended, retaining the authored settings snapshot taken after pending imports and saves finish. Practice App Settings and inline unit controls retain the parent choices. The settings note directs preference changes to the main editor. Lesson snapshots and Back history exclude units and names, including imported legacy progress. Practice settings hydration leaves the inherited preferences intact.

Exit messages require the frame’s source, the current origin and protocol version. Exit removes the frame, resumes workspace activity, and restores focus. Lesson-location messages update the outer direct link. StrictMode rehearsal keeps that link intact. One worker serves each practice realm and is disposed on page exit.

Checks and resume

usePathEditing and AutoBuilder do the planning. The coach consumes the accepted route or timeline and never runs a second planner. Motion checks inspect intent, resolved limits, endpoint samples, arrival speeds and hold durations. Invalid code, unrouted results, stale plan objects and obsolete revisions cannot pass. Retry uses the production planner and invalidates current evidence.

Accepted plans must match the current attempt generation, plan stamp and editor plan object. Stale, unrouted or blocked plans cannot pass a motion goal. The auto planner republishes a rebuilt timeline only while its accepted plans, connections, authored auto and live paths remain unchanged. The current playing flag and cursor determine progress without an accumulated event history. Editing, Undo, Redo, Retry, Reset and lesson changes invalidate plans. Earlier checkpoints record completed goals. Later checks require current documents to retain the entered values and satisfy the remaining conditions. Document checks use the step’s document ID, including when another path is open. Stored invalid code drafts block code completion before the code view mounts.

Goal subscriptions compare the authored fields, accepted plans and control state used by the checks. Playback cursors notify the runtime only when they cross the current step’s cached boundary, including seeks back below it. Changing a step, plan or waypoint rebuilds that boundary. Equal check results preserve the coach’s state. The spotlight observes target, field area and card geometry and control changes. Layout changes start a measurement window capped at 400 ms and 24 frames. Transition and animation end events measure the final position, including transforms that leave dimensions unchanged. Below 900px, opening the inspector keeps the selected waypoint as context while the outline drawer is closed. Playback style updates do not trigger measurements.

tempo-tutorial-progress:v1 stores course/content versions, stable step IDs, completion, attempt identity, checkpoint revisions, authored drafts, supporting stores, code buffers and reverse changes between step starts in one bounded 256,000-character write. Trajectories, workers and thumbnails are excluded. A content-version change restores the lesson’s seed and clears its checkpoints. Resume restores the unfinished task and draft on practice Home, then coaches the navigation back to its control. Uncommitted numeric entries restart at their input step. Unsubmitted zone and folder forms and shortcut searches retain their entered fields. Keyboard recording, history exercises and saves without form drafts restart at the first action needed to rebuild their temporary state. Back uses the same reconstruction rules, restores the starting documents, lesson settings and code buffers, and invalidates planning and playback state. Reverse changes retain Back history across reloads without duplicating each whole workspace. Saved attempts without an earlier snapshot restart from the lesson seed when Back reaches that boundary. Completed badges survive Practice again. Legacy reverse changes are filtered before replay using the same setting list as practice snapshots. Editor units, Robot units and naming changes are removed, including nested fields and replacements of settings or workspaces. Entries retain their step IDs even when filtering leaves no changes, so Back restores each saved step and its authored state. A Pause goal is already satisfied when playback is stopped. Auto hook recovery reopens the existing command entry after selecting its drive. Custom limits recovery opens Limits and chooses Custom when no value has been committed yet.

Pending code edits settle before exit or snapshot capture. Invalid code retains the last valid document and blocks export. Supporting-store changes, including robot/pack/binding edits and workspace replacement, invalidate current evidence. Undo and Redo use normal document handlers. Focused text retains text history.

Concurrent writes merge compatible checkpoints only within the same attempt, revision and draft. A newer external update stops the active lesson, and Resume loads that draft. Checkpoint generations prevent stale saves from reversing Back or Skip. Unavailable storage switches to session-only progress. Download practice and Restore practice provide a JSON backup.

Validation

gui/web/scripts/tutorial-novice.mjs starts a fresh browser editor, opens Learn, and completes every lesson. Once a lesson starts, the driver only acts on [data-tutorial-target] using the coach’s displayed action. The Back traversal also activates the coach’s Back control after each action. It never imports editor stores, changes state directly, calls navigation helpers, presses Skip or uses Show me. Missing authored navigation fails the test. Four fresh contexts traverse the whole course: pointer actions, keyboard-only actions, keyboard actions with a reload before every step, and keyboard actions with Back followed by a redo of every action before Finish lesson. Keyboard traversal uses native Tab and arrow-key navigation without assigning focus. Reload recovery follows only the highlighted controls, including temporary-state reconstruction. The test checks the live announcement against the displayed instruction, rejects a selection change for Rotation typeahead followed by Space, and counts three waypoints after Add leg, Back and Add leg. It checks that the full course remains within the durable progress size limit. Every code and text-entry action types one character at a time, including backspacing and retyping. Each intermediate edit pauses for 400 ms, beyond the parse debounce and automatic advance delay, and must leave the same step open. Code edits use keyboard navigation to replace only the changed span. The reports record intermediate-state, backspace and retyping counts for every entry. The fresh browser context grants clipboard access and verifies that Copy writes the renamed Composer code and each selected Robot Code block to the clipboard. Done checks also require the drive to remain selected after path editing closes.

Before every action the test requires one visible, enabled target entirely in the viewport. Hit tests at three points reject obstruction, and rectangle checks reject coach overlap. Each rendered instruction and explanation must total at most 25 words. Every acted-on step gets a 1440 x 1000 screenshot. results.json records actions, text, word counts and capture names. Captures and reports go to gui/web/test-results/tutorial-walkthrough/, which Git ignores. keyboard.json, reload.json and back.json record their actions and recovery paths. matrix.json summarizes all four traversals.

The script accepts TEMPO_TUTORIAL_URL (default http://127.0.0.1:1431/), TEMPO_PLAYWRIGHT_MODULE for an existing Playwright installation, and TEMPO_CHROMIUM_EXECUTABLE. TEMPO_TUTORIAL_FROM and TEMPO_TUTORIAL_THROUGH select a diagnostic subset. Acceptance runs all 18. TEMPO_TUTORIAL_MODES selects diagnostic modes. Acceptance uses the default pointer,keyboard,reload,back matrix. TEMPO_TUTORIAL_SIMPLE_NAMES=1 turns Simple names on through App Settings before opening Learn, so the course runs in plain names. TEMPO_TUTORIAL_UNITS selects m-rad (default), m-deg, in-deg or in-rad through App Settings before Learn opens. Acceptance runs SI and inches/degrees with both naming modes, plus an inches/radians profile with separate Robot units, for 24 complete traversals. TEMPO_TUTORIAL_ROBOT_UNITS=editor keeps Use the same units enabled, and separate disables it and selects each Robot unit through App Settings. Meter profiles use kg, m/s and m/s². Inch profiles use lb, ft/s and ft/s². Acceptance also runs in/rad with Robot units set to m, ft/s, ft/s², kg, rad and kg·m². These independent rate choices keep length from determining the whole unit set. Each lesson must preserve every chosen unit through completion, reload and Back. TEMPO_TUTORIAL_SCREENSHOTS overrides the capture and report directory. TEMPO_TUTORIAL_SWITCH_PREFERENCES=1 changes the parent App Settings during each lesson, alternating SI and inches/degrees, Simple names, and linked or separate Robot units. The driver exposes the retained parent controls while the practice frame remains mounted. Lesson actions still use only the highlighted target. TEMPO_TUTORIAL_MODES=unit-resume changes every unit and naming preference in both directions after each text or code entry, reloads, and completes all 18 lessons. Each change and reload must retain completed checkpoints and canonical targets. Reload also verifies the stored parent choices and the practice frame’s inherited preferences. tutorial-spotlight.mjs closes and reopens the inspector at 850px and 760px with default, 700 ms and reduced motion. The final highlight must match the input rectangle within 0.75px without another interaction. tutorial-preferences.mjs changes every Editor and Robot unit field and Simple names in the parent, checks the disabled practice controls, and verifies current preferences after restoring progress containing legacy units and Back history. It uses the same browser and output environment variables as the novice driver. tutorial-browser.mjs invokes the same driver. With the editor running on that port, run node scripts/tutorial-novice.mjs from gui/web/. Acceptance uses the production bundle, built with node gui/scripts/build.mjs at the repository root and then served from gui/web/ with node node_modules/vite/bin/vite.js preview --host 127.0.0.1 --port 1431 --strictPort.

The driver rejects separate Enter steps, vague code edits, long dashes, closing explanations and speed exercises below 2 m/s. Ordinary playback must advance within 1.8 seconds of Play. Point goals have a 15-second timeout. All checkpoints must be passed, including goals satisfied before their turn. The arrivals lesson must demonstrate both 50% and 100% passing speed.

terms.json names each concept’s introduction and plain definition. Exhaustive curriculum tests reject uses before that introduction, long dashes in lesson text and editor name literals, and color words without the rendered control’s palette token. The color check runs for every palette, naming mode and unit setting. Entry-goal tests walk deletion, partial typing, corrections and retyping across 128 linked and separate unit settings. The matrix covers every Editor unit set and every Robot unit set, including all three MOI units. Real numeric controls run in both scopes. Practice URL tests exhaust all 3,104 explicit unit pairs and 72 pairs with default rates. Preference ownership tests exercise 1,536 combinations of unit choices, naming modes and hydration/reset/restore orders, including late hydration reads. Coach and numeric-control tests cover live changes to length, angle, mass, speed, acceleration and moment of inertia. Quantity-resume tests cover 256 unit and naming transitions and a legacy 375-inch entry, including later edits, Back and completion. Geometry tests cover translated ancestors, motion end events and a bounded settling window. Playback tests keep goal evaluation, coach rendering and layout reads independent of frame count. Parent persistence tests cover 512 display choices across browser and desktop storage, frozen authored settings, practice isolation and imports during entry. Legacy history tests run 64 random seeds with interleaved display preferences, nested Robot unit edits and parent replacements. Resume and Back must preserve all remaining checkpoints, documents, lesson settings and pending code drafts. The migration gates and novice matrix recorded the tested source. The production CodeMirror parser verifies canonical goals under all eight length, angle and mass combinations. Production WASM tests verify passing-speed differences on the short arrival route. State permutation and randomized document tests exercise completion without widget or transport events. An exhaustive entry-goal test walks every code and text-entry step through deletion, correction and character prefixes, including unfinished drafts over an already satisfied document.

The entry-resume results cover all 44 text and code entries, 220 preference changes and 44 reloads. The drawer measurements record six final rectangles with zero pixel error, captured for the 760px drawer and the 850px drawer after a 700 ms transition. The completion gates and novice matrix recorded the tested source and toolchains. Path and auto playback reports compare normal and practice frame times after the bounded geometry updates.

Unit tests also cover accepted-plan identity, invalid code, semantic checks, history, session isolation, resume, concurrent storage, content migration, hint cancellation and coach placement. The frontend gates are TypeScript, full Vitest, the no-skip parity guard, the editor production build, and prose/source comment checks. Native compilation, robot simulation and deployment remain separate from course completion.

esc

Loading search...