Skip to content
Design System
GitHub

Waypoint editor

v0.64.0, changelogBeta

A robot's route as an ordered list of waypoints, edited in a list and on robot-map together, with actions on arrival, reordering, checks that say why Save is disabled and a read-only mode.

Enter opens its details, Delete removes it.

6 waypoints

Distance
104.7 m
Estimated time
about 2 min 2 s

No unsaved changes

Route

Install
npx shadcn add @syncrobotic/waypoint-editor

Also installs: lucide-react@^1, @syncrobotic/cn, @syncrobotic/button, @syncrobotic/field, @syncrobotic/input, @syncrobotic/number-field, @syncrobotic/robot-map, @syncrobotic/segmented-control, @syncrobotic/select, @syncrobotic/sortable, @syncrobotic/toast, @syncrobotic/empty-state, @syncrobotic/format-number

Overview

When to use

  • Planning a patrol or delivery route on a site before sending it to a robot.
  • Changing a saved route: a new stop, a different order, a photo at the bay door.
  • Showing a route to someone who can read it but not change it (readOnly).

Use something else

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Selected

Problems

Unsaved

Read only

Empty

Geo

Zh tw

Usage rules

  • For planning a route before it is sent. A route being driven is robot-map paths (dashed blue); the editor's route is grey, as a route still being drawn.
  • Keep the saved route in value and save in onSave; never write the draft back into value on every change, or Cancel and the unsaved state have nothing to compare with.
  • Pass the map's zones: restricted zones are keep-out, and a waypoint inside one cannot be saved. Check again on the server with validateWaypoints.
  • Problems are the warning shape and words on the row, the warning shape on the point, never a tinted row; Save stays visible, disabled, with the reason beside it.
  • Delete and Cancel offer Undo in a toast: mount a Toaster once in the app.
  • Give speed the robot's cruise speed on this site, so the estimate means something; say what dwell covers (docking, a photo) in your own help text.
  • Viewers get readOnly: the same list, map and details, without handles, Add, Save or Cancel.
  • Send it with waypointsToNavigateThroughPoses (or waypointsToPath) from ros; run each waypoint's action in the app or the robot's mission layer.

Changelog

  • 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
  • 0.53.02026-11-27Its doc opens with its description, word for word; the code is unchanged.
  • 0.51.02026-11-27Comments trimmed to what they need to say; the code is unchanged.

How to upgrade