YamDrive Design System

Android · iOS
View
Scheme
01

Foundations

Light and night are declared side by side in the theme file, so ThemeColor stays the intersection of both and nothing can exist in one scheme only.

Theme colours

src/constants/theme.ts

Forty-two keys per scheme, in three groups. The first eighteen are the surface palette; tint is the only one that changes role between schemes, a darker gold in light for text contrast and the brand yellow at night. The three health* grounds do invert. Everything from route down is deliberately identical in both schemes — those colours sit on the light OSM basemap or carry a fixed meaning (a speed band, an event kind) that must not shift when the phone switches to night. Alongside them, theme.ts exports Floating — elevation 2 with a 12 % black shadow at radius 3 — the one lift shared by everything that hovers over the map.

Colors.light / Colors.dark · 42 keys
TokenLightNightRole
text#242523#F5F5F1Primary copy
background#F5F5F1#141715Screen canvas, sheet body
backgroundElement#EAEAE5#30342FSecondary button, input, chip
backgroundSelected#DEDFD8#3C4039Pressed row, active saved ride
textSecondary#636760#B2B7ADCaptions, hints, placeholders
tint#665000#F4C430Icon / link accent
onTint#242523#242523Copy on the yellow fill
border#DCDDD6#41453EHairlines, dividers, sheet handle
primary#F4C430#F4C430Primary action fill
surface#FFFFFF#252825Raised card
navigation#246BAC#70B4EFTurn glyph in the guidance bar
rest#E3DCEB#3B3345Break / checklist tile
fuel#F0DFC4#443B2ARefuel tile
positive#367923#86CD65Checklist progress
departure#E8C2A6#E8C2A6Departure card ground
onFeature#242523#242523Copy on departure / tiles
danger#C22C24#F87171Destructive action, form error
healthGood#DCEBD3#28381FVehicle health tile · on track
healthSoon#F3E3B5#43391DDue within 30 days or 500 km
healthDue#F4D3CF#4A2523Service due
route#368DDD#368DDDRoute line, ride thumbnail
heat#5B21B6#5B21B6Heatmap line
heatGlow#8B5CF6#8B5CF6Heatmap glow, blurred under it
speedLow#D9A52C#D9A52CSpeed band · below range
onSpeedLow#3A2A05#3A2A05Copy on the low band
speedBalanced#3F7A50#3F7A50Speed band · within range
speedHigh#B4502F#B4502FSpeed band · above range
onSpeed#FFFFFF#FFFFFFCopy on the green and red bands
eventTraffic#D98B52#D98B52City event · traffic wait
eventStop#6B6F68#6B6F68City event · stop
eventBreak#8A72B8#8A72B8City event · break
eventAccel#368DDD#368DDDCity event · hard acceleration
eventBrake#8C3A24#8C3A24City event · hard braking
fuelLevel#E0A12E#E8B04AEnergy tile · the fuel in the tank
fuelBody#FBF4E8#2E2819Energy tile · the tank body
fuelOutline#5C4424#F0DFC4Energy tile · the tank outline
reliefWall#CFE2F4#34506BRoute relief · the wall under the ribbon
reliefSteep#1F5E99#8CC4F2Route relief · the colour at a 10 % grade
toggleThumb#FFFFFF#FFFFFFToggle · the thumb, white on either track
dock#202220#202220Floating dock ground
dockIcon#D3D5D1#D3D5D1Floating dock · inactive icon
scrim11 18 21 / 45%0 0 0 / 60%Dim behind a modal sheet

Stop categories

src/lib/categories.ts

Six categories drive chip colour, marker colour, glyph and the nearby-search phrasing. The queries are free text rather than a Places type enum, so regional wording works — “petrol pump” reads better than “gas station” in India. other is excluded from one-tap nearby search as too vague to help.

CATEGORIES · CATEGORY_ORDER
KeyColourLabelIconnearbyQueryNearby search
fuel #EA580CFuel gas-stationpetrol pumpYes
food #DC2626Food silverware-fork-kniferestaurantYes
rest #0891B2Break coffee-outlinerest stop cafeYes
stay #7C3AEDStay bed-outlinehotelYes
sight #059669Sight camera-outlinetourist attractionYes
other #475569Other map-marker-outlinepoint of interestNo

Literal colours outside the theme

map-markers · map-compass · map.tsx · ride/[id].tsx · ride-review-sheet · fuel.tsx · map-credit · ride-overview · ride-preparation · category-picker · results-sheet · themed-text

Every hex written in a component rather than taken from theme.ts. Almost all of it is drawn on or over the raster basemap, whose tiles keep one brightness in both schemes, so these are the values to change if the map ever gets a dark style. FloatingDock and RideWidget now use theme tokens only and are gone from this table. The rider's puck in NavigationMarker is a PNG pair (nav-arrow / nav-dot in assets/images/map), not a colour; #2563eb is only the idle “You” MapPin. Planned fuel breaks draw as PetrolMarker, so the #c2410c “Fn” MapPin branch in map.tsx can never run. Colour data tables are not repeated here: stop categories (categories.ts), basemap swatches (map-style.ts) and bike paints (vehicle.ts) have their own plates. Shadows use #000 throughout (Toast, the tab dock, Floating).

Still literal in a component
UseFillForegroundWhere
origin pin “A” #166534#fff label, #fff 2 dp ringMapPin · map.tsx, ride/[id].tsx
destination pin “B” #991b1b#fff label, #fff ringMapPin · map.tsx, ride/[id].tsx
break · rest #0369a1#fff label, #fff ringMapPin Rn · map.tsx
break · selected #6d28d9#fff label, #fff ringMapPin, target set · map.tsx
search result · not fuel #475569#fff label, #fff ringMapPin +n · map.tsx
you · idle #2563eb#fff label, #fff ringMapPin “You” · map.tsx
petrol pill #242523#fff label · #fff border, #F4C430 when selectedPetrolMarker
petrol badge #F4C430 · planned #E9C2A8#242523 pumpPetrolMarker
petrol tip #242523 arrow · #fff dot#242523 dot ringPetrolMarker
road label #1769AA#fff“Toward …” · NavigationMarker
compass dial #FFFFFF · ticks #D4D7D1#242523 labelMapCompass
compass north / travel #C22C24 #367923—MapCompass · north is Colors.light.danger in both schemes
line outline #fff, 8 dp under a 5 dp line (7 under 4 in review)—route and city trail · map.tsx; ride line · ride/[id].tsx; ride-review-sheet
dot stroke #fff, 2 dp—city events · map.tsx; ride events and wrong turns · ride/[id].tsx; review pins (bumps use dock); unbranded fills · fuel.tsx
map credit #ffffffee · dark #0c0c0ccc#1e293b · dark #a3a3a3MapCredit
progress bars #D5DDBB #E3D9ECon #F5F5F1 · #242523 textRideOverview
departure card #D2C4DB → #E8B18E gradientclock disc #242523, #F5F5F1 glyphRidePreparation
category, selectedthe category colour#FFFFFF icon + labelCategoryPicker; ResultsSheet row icon

ThemedText · 12 roles

src/components/themed-text.tsx

type default | title | subtitle | screenTitle | hero | display | metric | label | small | smallBold | caption | link | code  ·  themeColor ThemeColor

On Android, label, smallBold, metric, subtitle and title switch to sans-serif-medium rather than leaning on synthetic weight. screenTitle is the newest: 20 / 26 medium, the one size every page header uses, so Home, Ride and every stack screen agree. hero, metric and display carry tabular figures so digits do not shift as speed and distance tick. hero is the newest role and the largest: it carries the live speed on the city dashboard and the total on Rides. includeFontPadding is off everywhere; line heights are explicit.

hero48 / 56 · 500 · tabular · −1
52 km/h
display36 / 40 · 500 · tabular · −0.8
04:30
title36 / 42 · 600
Ride plan
subtitle24 / 30 · 600
Trip
screenTitle20 / 26 · 500 · every page header
Widgets
metric20 / 26 · 500 · tabular · −0.4
7h 30m
default16 / 24 · 400
Estimated arrival · 12:30 PM IST
label14 / 20 · 500
Ride checks
smallBold14 / 20 · 500
Guntur → Bangalore
small14 / 20 · 400
600 km · planning estimate
smallthemeColor="textSecondary"
No live traffic
caption12 / 16 · 400
Checked for this plan
link14 / 20 · inherits text
Report a map issue
code12 · mono · 700 on Android
yamdrive.rides.v1

Spacing, radius, metrics

src/constants/theme.ts

Planning screens group at 16, cards pad at 16, associated rows gap at 8, label/value pairs at 4–6. Shared controls hold a 48 dp minimum target per Material guidance; the icon-only button and floating map buttons go to 52.

Spacing · Radius · Layout
ScaleKeydpApplied to
Spacinghalf / one / two2 / 4 / 8Icon gaps, label stacks, chip rows
three / four16 / 24Card padding, screen gutters, group gap
five / six32 / 64Empty-state padding, tall spacers
Radiussm / md8 / 16Handle, toast · button, input, flat card
lg / xl24 / 28Screen card, route summary · sheet top, dock
pill999Chip, icon button, speed meter, marker
LayoutMinTouchSize48Every shared control
BottomTabInset80 Android · 50 iOSMaterial tab bar is the taller one
MaxContentWidth800Reading measure cap
dock clearanceinset + 84Scroll padding under the floating dock

Icon set

src/components/icon.tsx

name IconName  ·  size number = 20  ·  color string (required)  ·  weight is always regular

Phosphor glyphs are imported one file at a time (phosphor-react-native/src/icons/…) so the bundle never pulls the whole set. Several names share a glyph where call sites read better with their own name; they are marked below. hunter is the one exception: not a Phosphor glyph but a hand-drawn Hunter 350 on Phosphor's 256 grid with its 16-unit round strokes, so it sits beside the rest. Every glyph here is the app's own path, generated from icon.tsx by scripts/canvas-sync.mjs.

information-outline
check-circle
note-pencil
trophy
speedometer
chart-bar
id-card
certificate
shield-check
leaf
file-pdf
image
open-external
folder
home
clock
checklist
check-square
square
turn-left
turn-right
turn-uturn
turn-roundabout
turn-arrive
play
pause
stop
map-outline
layers
motorbike
hunteralias of motorbike
himalayanalias of motorbike
format-list-numbered
map-marker-path
routes
chevron-up
chevron-down
chevron-right
account
code
traffic
hand
trend-up
trend-down
distance
crosshairs-gps
fit-to-screen-outline
arrow-expand
arrow-collapse
tune-variant
heart
lock
lock-open
bell
battery
watch
phone-off
close
pencil-outline
magnify
arrow-left
chevron-left
fire
long-ride
city-ride
arrow-up
arrow-down
navigation-variant
navigation-variant-outlinealias of navigation-variant
trash-can-outline
delete-outlinealias of trash-can-outline
alert-circle-outline
plus-circle
check
plus
gas-station
compass
sun
mountains
cpu
scan
silverware-fork-knife
coffee-outline
bed-outline
camera-outline
map-marker-outline
cloud-off
export
import

Basemap

src/lib/map-style.ts

BasemapId openfreemap | osm  ·  MapStyleId positron | bright | liberty | dark | fiord

The map is vector now. OpenFreeMap serves OpenMapTiles-schema tiles with no key and no limits, and five ready-made styles the rider picks between; the OSM raster source stays as a fallback, with its labels still baked into the pictures. Each style carries the building colour for the 3D extrusion layer, or null where the style already draws its own. Every basemap has its own required credit, and it shows on every map.

the five stylesswatch = background + roads
PositronLight grey and quiet. Your route and trail stand out most.
BrightColourful roads, parks and water, like a paper map.
LibertyDetailed and colourful, with 3D buildings built in.
DarkNear-black. Easy on the eyes on night rides.
FiordDeep blue-grey, softer than Dark at night.
MapCreditrequired, on every map
OpenFreeMap © OpenMapTiles · © OpenStreetMap contributors OpenFreeMap © OpenMapTiles · © OpenStreetMap contributors 9 / 13, shrinks to 80 % before it truncates. dark on the Dark and Fiord styles. A known colour exception in DESIGN.md §2.
02

Primitives

Six shared controls. Every one of them takes its press and disabled state from opacity rather than a second colour, so a variant never needs a pressed palette of its own — the exact value differs per component and is called out on each specimen.

Button

src/components/button.tsx

label string  ·  onPress () => void  ·  variant primary | secondary | floating | danger = primary  ·  icon IconName  ·  iconOnly false  ·  disabled false  ·  stretch false  ·  hint string?  ·  style StyleProp

48 dp minimum height, radius 16, hairline border. floating is the surface fill plus a hairline border and the shared Floating lift, for a control that hovers over the map rather than sitting on a surface. danger is the only variant with a transparent ground. iconOnly drops the label to a 52 × 52 target, raises the glyph to 24, and gains a long-press toast carrying the label — the label is never lost, only moved. hint is read out as the screen-reader hint and shown on the same long press, which is how the two ride buttons explain themselves without a line of copy on the map.

primarydefault
Create trip
primarypressed · opacity .8
Create trip
primarydisabled · opacity .45
Create trip
secondarydefault
Route & stops
secondarypressed · opacity .8
Route & stops
secondarydisabled
Demo ride
floatingover the map · Floating lift
Route & stops
dangerdefault · border only
Clear stops
dangerpressed · opacity .8
Clear stops
icon + labelglyph at 18
Open map
iconOnly52 × 52 · glyph at 24
stretchsheet footer pair · flex 1
CancelAdd to trip
style overrideStart ride · pill, 52 dp
Start ride

IconButton

src/components/icon-button.tsx

name IconName  ·  accessibilityLabel string (required)  ·  onPress () => void  ·  size number = 22  ·  color string = theme.text  ·  disabled false

The label is required rather than optional — an icon alone gives a screen reader nothing to announce. Every instance also carries “Hold to show label” and a long-press toast, so the hint is unconditional here, unlike on Button where it appears only in iconOnly mode. hitSlop 6 extends the 48 dp target past the drawn bounds.

defaultsize 22 · theme.text
pressedopacity .6
disabledopacity .35 · not hydrated
colortheme.tint · theme.danger
size20 sheet close · 26 add result
map buttonsCOMPASS_SIZE circle · surface + Floating

TextField

src/components/text-field.tsx

label string?  ·  multiline false  ·  …all TextInputProps except style

Input type is 16 / 22 — above the 16 px threshold that would trigger a zoom on focus — while its label stays at 14 in textSecondary. The label doubles as the accessibility label, so a field without one is unlabelled to a screen reader. Multiline grows to 77 dp and aligns text to the top.

label + placeholderempty
Namee.g. Shell petrol pump
label + valuefilled
Trip name (optional)Weekend escape
no labellabel undefined
05:00
multiline77 dp · textAlignVertical top
Note (optional)Fill up here — next pump is 90 km
side by sideflex 1 each · gap 12
Estimate (km)600
Departure · ISTOptional · 04:30
with errorsibling alert · theme.danger
Start time (IST · 24-hour)5pm
Use 24-hour time, for example 05:00 or 16:30.

CategoryPicker

src/components/category-picker.tsx

value StopCategory  ·  onChange (category) => void

A horizontally scrolling single-select row with accessibilityRole="radio" per chip. The selected chip takes the category’s own colour for both ground and border and flips its glyph and label to white; unselected chips keep the glyph in the category colour on backgroundElement. Chips are 40 dp — the one deliberate exception to the 48 dp rule, since the row is a filter rather than a primary control.

value="rest"the add-stop default
Fuel Food Break Stay Sight Other
value="fuel"+ pressed chip · opacity .75
Fuel Food Break Stay Sight Other
selected, each keysix terminal states
Fuel Food Break Stay Sight Other

Sheet

src/components/sheet.tsx

visible boolean  ·  onClose () => void  ·  title string  ·  subtitle string?  ·  footer ReactNode?  ·  bodyMaxHeight number?  ·  children ReactNode

Every sheet looks and behaves the same, and callers can't change it: a drag handle, the title row with ✕, one scrolling body with 12 dp gaps, and the committing action pinned in footer. Drag down from the handle or title (or anywhere when the body fits) to close: past a quarter of the sheet's height or on a flick (0.7 × 1000 dp/s), otherwise it springs back. In landscape the sheet is a right-hand panel up to 480 dp wide. bodyMaxHeight caps the body so whatever is behind the sheet (usually the map) stays visible.

title onlyno footer
Trip options
Trip nameGuntur → Bangalore
subtitle + footertwo stretch buttons
Add stop16.30670, 80.43650
Body items sit 12 dp apart in one scrolling area.
CancelAdd to trip
drag to closepast ¼ of the height or a 0.7 flick
Your trips3 saved on this phone
New trip

Toggle · PageHeader

src/components/toggle.tsx · page-header.tsx

Two small components that exist to stop drift. Toggle wraps Switch and removes the colour props from its own type — callers cannot set a track or thumb colour, so every switch in the app is the same yellow. PageHeader gives every stack screen one header: a round back button that falls back to a given route when the page was opened cold, the title as screenTitle, an optional caption, and an optional round action. Header icon buttons are circles; the ones on surfaces stay squares.

Toggleon · off
PageHeadertitle + subtitle + action
WidgetsLive from this phone's sensors · for reference
BackButtonvariant="floating" over a map
03

Ride instruments

The pieces that only exist while a ride is running. Their colours are hard-coded because they sit over the raster basemap, and their content is derived from a GPS fix that is allowed to be missing — every one of them has an unavailable state.

RideWidget

src/components/ride-widget.tsx

session ReturnType<useRideSession>  ·  range SpeedRange | null  ·  onSettings () => void

Ground colour comes from speedBand(speed, range) and is applied only while status === 'active' with a known band. The visible text is limited to the number and km/h; the band word — Below, In range, Above, GPS…, Paused, Start — is exposed to accessibility services only, so the meter never reads as an instruction to change speed. Idle shows 0, not a blank.

idle“0 km/h, Start” · playfixed
0 km/h
active · band unknown“—” · GPS…fixed
— km/h
active · belowspeedLow on onSpeedLow
34 km/h
active · withinspeedBalanced on onSpeed
52 km/h
active · abovespeedHigh on onSpeed
71 km/h
paused“0 km/h, Paused” · playfixed
0 km/h

MapCompass

src/components/map-compass.tsx · src/lib/compass.ts

heading number | null  ·  bearing BearingFeed  ·  onReset () => void  ·  flat boolean?

A heading-up dial, like a compass held in the hand. Green is fixed at the top: the way the rider is going (heading, the GPS course while riding), otherwise where the phone points, read from the phone's own heading only while heading is null. Red, a short needle against the rim, and the E, S and W ticks turn to show where north is from there, by −(heading ?? bearing); with no heading at all there is no green, and red shows north on the map from the map's own rotation (bearing, a feed the map pushes into without re-rendering). The letter in the middle is the direction green points, with a smaller letter for the weaker axis (Ne is nearer north than east) and “—” without a heading. It turns over 250 ms by the shortest arc across north, ignores turns under 2°, and the letter crossfades with a 3 px blur on Android 12+, a plain fade below, nothing under reduced motion. The dial is always white, so north is the light theme's danger in both schemes. Tap: north-up, and the map stops following the heading; long press: “Green: the way you face · Red: north · Tap: north-up”. 48 dp plus two hairlines, like the map buttons; flat drops the shadow for the city ride's strip.

no headingmap north-up · “—”fixed
no heading · map turned 40°red = north on the mapfixed
heading=0going north · green covers redfixed
heading=30nearer north · “Ne”fixed
heading=45exact diagonal · both capitalsfixed
heading=142nearer south · “Se”fixed
heading=250due west · north is to the rightfixed
flatinside the city strip · no shadowfixed

RideOverview · progress bars

src/components/ride-overview.tsx

totalKm totalMinutes remainingKm minutes nextStop destination breaks paused demo elevation now landscape onEnd onStops

Two bars share one row in both orientations and open the ride-summary sheet. Fill ratio is 1 − remaining / total, clamped to 0–1, so an unknown value reads as an empty bar rather than a full one. Off-route or a missing fix suppresses distance and time independently — either bar can be unavailable alone. 44 dp portrait, 48 dp landscape.

on route31 % travelledfixed
412 km left
~6h 20m left
remainingKm=nulloff route or no fixfixed
Position unavailable
~6h 20m left
minutes=nulltime suppressedfixed
412 km left
Time unavailable
both nullnothing projectablefixed
Position unavailable
Time unavailable
near arrivalratio clamped at 1fixed
0.4 km left
~1 min left
landscape48 dp rowfixed
228 km left
~3h 40m left

RidePreparation · cards

src/components/ride-preparation.tsx

plan RidePlan  ·  elapsedMinutes number  ·  onChange (plan) => void

Three stacked controls on the Ride Plan screen. The departure card paints a static lavender-to-peach SVG gradient — dawn, not a live sky — with dark text at a fixed onFeature, so it is identical in both schemes. Changing the departure time clears the checklist, since the checks belong to a plan rather than to the app.

departuredepartureTime setfixed
Departure · IST04:30Arrival ~2:15 PM
departuredepartureTime undefinedfixed
Departure · ISTSet timeMake an early start your plan
checklist0 of 10 · fresh plan
Before you ride0/10
checklist7 of 10 · in progress
Before you ride7/10
light maplightMap !== false · on
Light mapLess animation · best for Nokia
light maplightMap === false · off
Light mapLess animation · best for Nokia

ElevationChart

src/components/elevation-chart.tsx

points ElevationPoint[]  ·  markerKm number | null?  ·  threshold number = 5  ·  note string?

Area chart of height against distance, 120 dp tall with a 40 dp label gutter. Gridlines land on round steps (1, 2, 2.5 or 5 × 10ⁿ) chosen to give three or four lines, so the axis never reads 137 m. threshold is the smallest change counted towards climb and descent — 5 m for a terrain profile from Valhalla, 10 m for a recorded GPS track, because the sensor is noisier than the model. Returns null outright below two points rather than drawing an empty frame.

route profilethreshold 5 · no marker
Elevation
↗ 1,240 m↘ 980 m
0 km598 km
Low 12 m · High 604 m
recorded ridethreshold 10 · marker + note
Elevation
↗ 860 m↘ 640 m
You · 486 m412 km
Low 12 m · High 604 m · GPS, smoothed

RideThumbnail

src/components/ride-thumbnail.tsx · src/app/(tabs)/rides.tsx

path Position[]?  ·  elevation ElevationPoint[]?  ·  width height number  ·  fallback IconName? = 'motorbike'

One use: the 72 × 72 square at the left of each Ride row, fed the ride's 40-point preview and its elevation, and clipped by the row's 24 dp corners. Three-step fallback on a backgroundElement square: the route shape if the path has two or more points, else the elevation line, else the fallback icon at 32 dp in textSecondary — Rides passes note-pencil for a ride logged by hand and motorbike otherwise. The shape is fitted inside 14 dp of padding, east–west scaled by cos of the mean latitude so a route does not stretch sideways, and centred on the other axis. The elevation line spans the full padded width, lowest point at the bottom. Both draw 3 dp, round caps and joins. The stroke colour tests path rather than which line was drawn — route when a path was passed at all, else textSecondary — so a one-point path with elevation would draw the elevation line in route; Rides never hits that because stored previews shorter than two points are dropped on load.

pathGPS preview · two or more points
elevationno preview · elevation recorded
motorbikeGPS ride with neither
note-pencilride logged by hand

City dashboard

src/components/city-dashboard.tsx · src/lib/city-ride.ts · traffic-fuel.ts

speed number | null  ·  city CityState  ·  range SpeedRange  ·  now number  ·  paused demo boolean  ·  km ridingMs number  ·  onPause onResume onEnd  ·  CityGlanceTop also compass ReactNode?

Two exports over one useCityView, so the top and the bottom of the ride view can never disagree. CityGlanceTop is one pill about 60 dp tall: the speed in display on the band colour, then one word said once — the band while moving, otherwise what the rider is doing (Stopped under 2 km/h whatever the spell becomes, Slowing, In traffic, On a break, GPS… before the first fix) — and a detail line that only adds what the word doesn't: how long, and what the wait is burning (liveIdleLine: “≈ ₹0.2” in traffic, “if idling” at a longer stop; never in a demo), else the balanced range. Off the bands the pill is backgroundElement, a step off white, so the white compass inside it still stands out. Paused, it turns neutral: a pause mark, “Counts as a break” and the break so far. CityGlanceBottom carries Distance and Riding time, round Pause/Resume and End (the yellow one), and one line for the latest recorded event, its count and total time; it changes only when a new event is recorded, and a screen reader hears every count. Traffic, stops and breaks are recorded when they end (10 s–2 min traffic, to 5 min a stop, longer a break); hard acceleration and braking straight away. Every specimen below is drawn by the canvas running the app's own city-ride.ts on the scripted demo ride, at the second named — and View → Screens → City Ride puts them together on a phone.

CityGlanceTopjust started · no fix yet
CityGlanceTopbalanced · 45 s
CityGlanceTophigh · 90 s
CityGlanceToplow · slowing, under 10 s
CityGlanceToplow · in traffic · idle cost
CityGlanceTopstopped · band suppressed
CityGlanceTopa stop · “if idling”
CityGlanceTopover 5 min · a break
CityGlanceToppaused · break 2:05
CityGlanceTopdemo · finished
CityGlanceBottomnothing recorded yet
CityGlanceBottomlatest · traffic, total time
CityGlanceBottomdemo · 12× tag
CityGlanceBottompaused · Resume ride / End
CityGlanceBottomdemo finished · End demo

TankGauge · RangeRing · BikeAvatar

src/components/tank-gauge.tsx · range-ring.tsx · bike-avatar.tsx

Three small drawings that carry fuel and identity. The tank is the Hunter's own tank traced from the bike artwork — the black rear sweeping up from the seat, the flat top with the filler cap, the rounded nose — filled to the current level and clipped to its own outline. On the Energy tile it is 72 wide in the tile's own colours: a fuelBody cream body filled fuelLevel amber, outlined in fuelOutline, and danger once the low-fuel light is on. The range ring hugs the bike card's top-right corner, concentric with the card radius so its bend follows the corner, and fills clockwise from the top: positive green, primary yellow once the light is on; without an estimate only the track shows. The avatar is the bike's two paint colours split on the diagonal, with a hairline ring so a light or dark paint still reads on the background.

TankGaugeEnergy tile · width 72 · 62 % · light on
RangeRing62 % · light on · track only
BikeAvatartwo-tone, split on the diagonal

RouteRelief

src/components/route-relief.tsx

path Position[]  ·  elevation ElevationPoint[]?  ·  startName endName string?  ·  colorAt (fraction) => string?  ·  compact false

The ride drawn as a ribbon standing on a wall, in Skia — the newest dependency and the first thing in the app that is not plain React Native views. The path is projected to metres east and north of its centre, tilted, and each point raised by its recorded altitude; the wall under the ribbon runs from reliefWall to reliefSteep as the grade approaches 10 %. A height range under 60 m is drawn at its true share of that, so a flat city ride stays flat rather than being stretched into mountains. colorAt lets a city ride colour the ribbon by speed band instead.

RouteReliefcompact · wall by grade
RouteReliefcolorAt · city ride by band
04

Map markers

Three marker components carry every point on the map. All colours are literals — the OSM raster basemap keeps its brightness in both schemes, so a themed marker would disappear at night. Letter codes are the app’s own shorthand: A / B endpoints, Rn rest, Fn fuel, Sn saved, +n search result.

MapPin

src/components/map-markers.tsx

id string  ·  point Position  ·  label string  ·  color string  ·  onPress ()?

A 28 dp pill with a 2 dp white ring that grows with its label — minWidth 28 rather than a fixed square, so “You” and “F12” both fit. The label is also the accessibility label, which is why the codes are short but never blank.

route endpoints#166534 · #991b1bfixed
AB
planned breaksrest #0369a1 · fuel #c2410cfixed
R1R2F3
break selectedtarget === i · #6d28d9fixed
R4F7
saved stopscategoryMeta(category).colorfixed
S1S2S3S4S5
search results#475569 · hidden while ridingfixed
+1+2+3
idle position“You” · #2563ebfixed
You
endpoint pickertheme.tint · the one themed pin
AB

NavigationMarker

src/components/map-markers.tsx · assets/images/map/nav-arrow.png · nav-dot.png

point Position  ·  heading number | null  ·  demo boolean  ·  roadLabel string?

The rider's puck is drawn on the map surface, not over it: a symbol layer, navigation-puck, with the nav-arrow image pointing along heading (degrees from true north; icon-rotate with rotation and pitch aligned to the map), so it lies flat on the road and foreshortens with the tilted ride view like a navigation arrow. While the heading is unknown — standing still, or a city demo, which has no GPS — it is the nav-dot. Both are 44 dp images with @2x and @3x. The city trail and the event dots are drawn beneath it, by its layer id. The road name is a separate Marker hung 26 dp under the point, so it stays upright: “Toward …” in white 11 / 15 on #1769AA, 168 dp wide, one line, only on a built route and never off it. Screen readers hear “Your position” (or “Demo position”), “heading unavailable” without a heading, and where it is heading.

heading setnav-arrow · map heading-upfixed
heading 60° · map north-upturns with the mapfixed
heading=nullnav-dot · standing, or a city demofixed
roadLabelon a built route · uprightfixed
Toward Hosur Road

PetrolMarker

src/components/map-markers.tsx

id point label  ·  planned false  ·  selected false  ·  onPress ()?

A charcoal pill with a pump badge, a tail and a ground dot, anchored to its bottom so the dot marks the point. The badge colour is the whole distinction: yellow means a real petrol stop — a search result or a saved fuel stop — and peach means a planned refuelling area, a distance along the route where the schedule says to refuel. The peach label always reads “Fuel area · n km”, never a station name, so the marker never implies a pump exists there.

defaultreal stop · yellow badgefixed
Bharat Petroleum
on reservea nearby pump with its distance · up to 5 within 10 kmfixed
Shell, Brodipet · 1.2 km
selected#F4C430 ringfixed
Bharat Petroleum
plannedpeach badge · “Fuel area”fixed
Fuel area · 150 km
planned + selectedboth modifiersfixed
Fuel area · 300 km
long labelmaxWidth 174 · truncatedfixed
Indian Oil Petrol Pump, Kurnool Bypass Road

Buildings3D

src/components/buildings-3d.tsx

OSM building footprints raised to their mapped height, as a fill-extrusion layer on OpenFreeMap's own vector source — the thing raster tiles could never do. Zoom 15 and above only, where the tilted ride view sits, at 75 % opacity in a colour matched to the chosen style. Honest caveat carried in the code: height coverage in India is patchy, so many areas stay flat.

extruded footprintszoom ≥ 15 · per-style colour
Positron · rgb(228, 228, 222)
05

Sheets

Nine sheets share one Sheet shell. Each is shown here at its body only — the scrim, handle, header and footer behave as Part 02 documents.

AddStopSheet

src/components/add-stop-sheet.tsx

draft StopDraft | null (null hides the sheet)  ·  onChange (changes)  ·  onClose ()  ·  onSubmit (stop, editingId?)

The draft doubles as the form state, so the sheet is fully controlled and there is no prop-to-state copy to resync when the user picks a different point. The presence of editingId is the only thing separating the two modes — it swaps the title, the submit label and its glyph. On submit an empty name falls back to “Category stop”, because reverse geocoding can come back blank and a nameless stop must never be saved.

addeditingId undefined · subtitle = coords
Add stop16.30670, 80.43650
Namee.g. Shell petrol pump
What is this stop for?
FuelFoodBreak
Note (optional)Fill up here — next pump is 90 km
CancelAdd to trip
editeditingId set · subtitle = address
Edit stopNH-44, Kurnool Bypass, Andhra Pradesh
NameIndian Oil, Kurnool
What is this stop for?
FuelFoodBreak
Note (optional)Last cheap pump before the ghat
CancelSave

ResultsSheet

src/components/results-sheet.tsx

visible title loading error results category origin  ·  onAdd onFocus onClose

Four mutually exclusive bodies — spinner, notice, empty copy, list — decided in that order, so a loading search never shows a stale empty state. The subtitle tracks the same branch: “Searching…”, nothing at all during an error, otherwise a singular/plural result count. The list caps at 340 dp so the map stays visible behind the sheet. Tapping a row focuses the map; only the plus-circle adds.

loadingsubtitle “Searching…”
Fuel near break 3Searching…
errornotice · subtitle withheld
Food near map centre
Search unavailable. Check your connection and try again.
emptyresults.length === 0
Stay near map centre0 results near the map centre
Nothing found here. Try zooming out, panning somewhere else, or searching for something more specific.
resultsrow default · row pressed · rating
Fuel near break 33 results near the map centre
Bharat PetroleumNH-44, Kurnool Bypass1.2 km straight-line distance · ★ 4.3
HP Petrol PumpKurnool–Nandyal Rd2.8 km straight-line distance
Indian Oil4.1 km straight-line distance · ★ 3.9

RideLibrarySheet

src/components/ride-library-sheet.tsx

mode 'new' | 'saved'  ·  onClose ()  ·  onNew ()

One sheet, two modes. new is a connected start/destination timeline over the shared endpoint picker, with an optional name, a distance estimate and an optional IST departure; the footer is Create trip, disabled until storage has hydrated. saved lists the rides on this phone as radios — the active one shows a check and cannot be deleted, every other one carries a destructive trash action behind a confirm. New rides inherit pace and break preferences but start with no stops, no checklist and no road route.

new · emptyendpoints unset
New tripA new route. Your own pace.
Trip name (optional)Weekend escape
StartSearch or drop a pin
DestinationSearch or drop a pin
Estimate (km)600
Departure · ISTOptional · 04:30
Road distance updates when you build the route. Add stops on the map. Break and speed preferences carry over; the checklist starts fresh.
Create trip
new · filled + errorvalidation alert
New tripA new route. Your own pace.
Trip name (optional)Coorg loop
StartGuntur, Andhra Pradesh
DestinationMadikeri, Karnataka
Estimate (km)4200
Departure · IST05:15
Distance estimate (km): enter a number from 1 to 3,000.
Create trip
savedactive + deletable rides
Your trips3 saved on this phone
Guntur → BangaloreGuntur → Bangalore5 stops · 4:30 AM
Coorg loopGuntur → Madikeri0 stops · Departure not set
Araku monsoon runVisakhapatnam → Araku3 stops · 6:00 AM
New trip
saved · not hydratedfooter disabled
Your trips0 saved on this phone
New trip

RidePreparation · sheets

src/components/ride-preparation.tsx

One sheet state variable — 'departure' | 'checks' | null — swaps both the title and the whole body, and only the departure branch gets a footer. The ten checks come from PRE_RIDE_CHECKS in two groups, Before ride day and Before departure, each row a checkbox whose detail is its accessibility hint. Copy is careful to frame the list as a record rather than a mechanical diagnosis, and links out to the bike manual and the MSF T-CLOCS guide.

sheet="departure"presets · Save time footer
Departure
Start time (IST · 24-hour)05:00
04:0004:3005:0006:00
India · IST (UTC+5:30). Estimates, not an alarm. Stop times include planned breaks; traffic and extra delays can change arrival. 4–5 AM may mean riding in darkness. Choose a time that allows enough sleep and good visibility; fuel up beforehand. Changing departure time resets your checklist for the new plan. Clear time
Save time
sheet="checks"checked · unchecked rows
Before you ride
2/10 checked for this plan. Reset before each new ride.
Before ride day
Petrol readyRefuel beforehand; choose a first fuel stop and confirm opening hours.
Tyres & wheelsCheck cold pressure for your load, tread, damage and wheel condition.
Brakes & padsCheck braking action, pad wear and fluid level. Have worn parts or faults repaired.
Before departure
Lights & controlsCheck headlight, brake light, indicators, horn, mirrors, throttle, clutch and side stand.
Rested & readyStart after enough sleep. Delay departure if tired or visibility is poor.
Reset checks Bike manual

EndpointPicker

src/components/endpoint-picker.tsx

title 'Start' | 'Destination'  ·  label string  ·  initial EndpointPin?  ·  onClose ()  ·  onSelect (label, pin)

A full-screen map modal rather than a sheet, with floating cards top and bottom. Search is debounced at 800 ms and needs three characters; the top four hits are reverse-geocoded for a readable address, and the crosshair swaps to a spinner while a search runs. Everything degrades to “tap the map to place a pin”: a failed search, a denied location permission and a basemap that will not load all land in the same error card, and the confirm button stays disabled until a pin exists. A map-tapped pin is saved as Pin 16.3067, 80.4365 rather than the placeholder “Map pin”.

no pinsearch idle · confirm disabled
Search start
Tap the map to place a pinUse as start
OpenFreeMap © OpenMapTiles · © OpenStreetMap contributors
searching + resultsspinner replaces crosshair
kurnool
Kurnool, Andhra Pradesh15.8281, 78.0373 · tap to preview
Kurnool Bus Station15.8300, 78.0450 · tap to preview
pin selectedconfirm enabled · coords shown
Search destination
B
Madikeri, Karnataka12.42381, 75.73993 · tap map to adjustUse as destination
errorsearch, permission or basemap
xyzzy
No matches. Try a nearby town, or tap the map.
Allow location access, or tap a pin on the map.

RideOverview · summary sheet

src/components/ride-overview.tsx

Behind the two progress bars of Part 03. Arrival is wall-clock IST rather than a countdown, and it is withheld entirely while paused — a paused ride has no meaningful arrival time. Remaining time takes the larger of the proportional route time and the planning-pace time, then adds every future planned break, so it can only ever be the more conservative of the two. Elevation is a GPS estimate kept for this ride only: never persisted, never simulated, and blanked the moment a reading goes stale.

live ridefresh altitude · next stop known
Ride summaryBangalore
412 km left · ~6h 20m Estimated arrival · 5:13 PM IST Approximate route time and planning pace, including 7 remaining planned breaks. No live traffic. Extra stops and delays can change arrival. Next: Planned fuel area · 38 km
Elevation · metres486 mLow 12 · High 604GPS estimate · valid readings from this ride only. Unavailable or inaccurate readings are ignored.
Route & stopsEnd ride
pausedarrival and altitude withheld
Ride summaryBangalore
412 km left · ~6h 20m Estimated arrival · — Approximate route time and planning pace, including 7 remaining planned breaks. No live traffic. Extra stops and delays can change arrival.
Elevation · metres—Low 12 · High 604GPS estimate · valid readings from this ride only. Unavailable or inaccurate readings are ignored.
Route & stopsEnd ride
off routenothing projectable
Ride summaryBangalore
Position unavailable · — Estimated arrival · — Approximate route time and planning pace, including 0 remaining planned breaks. No live traffic. Extra stops and delays can change arrival.
Elevation · metres—Low — · High —GPS estimate · valid readings from this ride only. Unavailable or inaccurate readings are ignored.
Route & stopsEnd ride
demoelevation not simulated · End demo
Ride summaryBangalore
228 km left · ~3h 40m Estimated arrival · 2:48 PM IST Demo preview. Approximate route time and planning pace, including 4 remaining planned breaks. No live traffic. Extra stops and delays can change arrival. Next: Planned rest · 12 km
Elevation · metres—Low — · High —Elevation is not simulated.
Route & stopsEnd demo

PastRideSheet

src/components/past-ride-sheet.tsx · date-wheel.tsx · src/lib/ride-log.ts · odometer.ts · date-wheel.ts

origin destination string  ·  onClose () => void  ·  onSaved () => void  ·  DateWheel: value max string  ·  minYear number  ·  onChange (date) => void

A ride done without GPS, opened from Rides with the active plan's endpoints and mounted only while open. Two modes: From odometer (the default) takes the reading on the dash and works the distance out live as the rider types — the change since the last known point (a reading or a fuel fill, else the bike's odometer field) less the rides already logged since then — and saving also moves the bike's odometer on. Trip F · km appears only when the bike is a Royal Enfield Hunter, and pins the fuel with the reading. Enter km takes the distance as typed. When the working comes to 0 km the footer becomes Save odometer reading and no ride is written. The date is picked, never typed: Today, Yesterday, or the dropdown that opens DateWheel (day · month · year, 2015 to today, days and months after today not listed). Riding time is optional hours plus minutes. Suggestions under From / To show while that field has focus. The footer is disabled only while saving. Errors, shown verbatim in danger under the form: “Enter the odometer reading from your dash.”, “Trip F is the km since the low-fuel warning, 0–300.”, “Enter where the ride started and ended.”, “Enter distance between 0.1 and 3,000 km.”, the riding-time bound, and “Could not save. Please try again.”. The ride is placed at 06:00 IST on the day and carries manual: true.

From odometerfirst open · Hunter · nothing typed yet
Log a past rideFrom the odometer on your dash
From odometerEnter km
Odometer now · km20000
Trip F · kmIf shown
Last known: 20,000 km. Read the odometer, and Trip F if the low-fuel warning is on.
FromGuntur
ToVijayawada
Date
TodayYesterdayWed, 30 Sep
Distance · km
Time · h—
min—
Riding time is optional. Without it, the ride has no average speed.
Save ride
workingreading typed · From focused, usual starts offered
Log a past rideFrom the odometer on your dash
From odometerEnter km
Odometer now · km20412
Trip F · kmIf shown
Since 20,000 km on Sat, 26 Sep: 412 km ridden − 380 km already logged = 32 km not yet logged.
FromGuntur
ToVijayawada
Where your rides usually start
GunturMangalagiriTenali
Date
TodayYesterdayWed, 30 Sep
Distance · km32
Time · h—
min—
Riding time is optional. Without it, the ride has no average speed.
Save ride
reading onlynothing left to log · the reading alone is saved
Log a past rideFrom the odometer on your dash
From odometerEnter km
Odometer now · km20380
Trip F · km46
Since 20,000 km on Sat, 26 Sep: 380 km ridden − 380 km already logged = 0 km not yet logged.
FromGuntur
ToVijayawada
Date
TodayYesterdayWed, 30 Sep
Distance · km0
Time · h—
min—
Riding time is optional. Without it, the ride has no average speed.
Save odometer reading
reading below the lastthe live caption turns to the error
Log a past rideFrom the odometer on your dash
From odometerEnter km
Odometer now · km19800
Trip F · kmIf shown
The odometer can't be below your last reading, 20,000 km.
FromGuntur
ToVijayawada
Date
TodayYesterdayWed, 30 Sep
Distance · km
Time · h—
min—
Riding time is optional. Without it, the ride has no average speed.
Save ride
Enter kmdate dropdown open · DateWheel
Log a past rideFrom your odometer or memory
From odometerEnter km
FromGuntur
ToVijayawada
Date
TodayYesterdaySat, 26 Sep
2425262728
JulAugSep
202420252026
Distance · km186
Time · h4
min30
Riding time is optional. Without it, the ride has no average speed.
Save ride
erroron Save · riding time under 3 minutes
Log a past rideFrom your odometer or memory
From odometerEnter km
FromGuntur
ToVijayawada
Date
TodayYesterdayTue, 29 Sep
Distance · km186
Time · h0
min2
Riding time is optional. Without it, the ride has no average speed. Enter riding time between 3 minutes and 48 hours, or leave it empty.
Save ride

SensorWidgets · Phone sensors

src/components/sensor-widgets.tsx · src/lib/device-sensors.ts · device-store.tsx · src/app/widgets.tsx

SensorTiles keys WidgetKey[]  ·  MissingWidgets keys WidgetKey[]  ·  SensorList no props  ·  useWidgetSummary() → string

Three pieces the Widgets page (opened from Profile, not Home) lays out in order. The phone is scanned once on first launch and the result remembered; a scan asks the OS about all seven sensors, and a software-fused one (a virtual gyroscope) counts as present. SensorTiles shows every widget the phone can show, two per row with an empty spacer after an odd one — there are no per-widget switches (profile.widgets and setWidget are kept but nothing reads or calls them). Readings run only while the page is focused. Heading comes from Location, so it needs the location permission; unread values show “—”. Widgets whose sensor is missing go in a Not on this phone card rather than vanishing, and SensorList lists all seven sensors from the last scan with its date and a Scan again button. Profile's Widgets row reads useWidgetSummary: the live widget names + “ · live from this phone”, “No sensor widgets on this phone”, “Scanning this phone…” or “Not scanned yet”.

tilesall three sensors present · reading
Heading142° SePhone heading
Ambient light18,400 lxBright sun
Altitude~486 mFrom air pressure
tilesno reading yet
Heading—Finding north…
Ambient light—Reading…
Altitude—Reading…
headinglocation not allowed · the tile becomes a button
HeadingAllowTap to allow location
Ambient light640 lxDim · indoor or dusk
Not on this phoneno compass or barometer · the budget case
Ambient light4,200 lxDaylight · overcast
Not on this phone
HeadingNeeds a compass (magnetometer) · not on this phone
AltitudeNeeds a barometer · not on this phone
Phone sensorsSensorList · the last scan
Phone sensorsScanned 24 Sept 2026
GPS · location on
Accelerometer
Gyroscope
Compass (magnetometer)
Barometer
Light sensor
Step counter
Android reports some sensors that are simulated from others (for example a virtual gyroscope). Readings are for reference, not safety decisions. Scan again
rescanningthe last result stays until the new one lands
Phone sensorsScanned 24 Sept 2026
GPS · location on
Accelerometer
Gyroscope
Compass (magnetometer)
Barometer
Light sensor
Step counter
Android reports some sensors that are simulated from others (for example a virtual gyroscope). Readings are for reference, not safety decisions. Scanning…
first scanfirst launch · nothing saved yet
Scanning this phone…
Phone sensors
GPS · location on
Accelerometer
Gyroscope
Compass (magnetometer)
Barometer
Light sensor
Step counter
Android reports some sensors that are simulated from others (for example a virtual gyroscope). Readings are for reference, not safety decisions. Scanning…
not scannedonly before the saved scan has loaded
This phone has not been scanned yet.
Phone sensors
GPS · location on
Accelerometer
Gyroscope
Compass (magnetometer)
Barometer
Light sensor
Step counter
Android reports some sensors that are simulated from others (for example a virtual gyroscope). Readings are for reference, not safety decisions. Scan again
none supportedscanned · no widget sensor on the phone
This phone has none of the sensors these widgets need.
Not on this phone
HeadingNeeds a compass (magnetometer) · not on this phone
Ambient lightNeeds a light sensor · not on this phone
AltitudeNeeds a barometer · not on this phone

CityRangeSheet

src/components/city-range-sheet.tsx

visible range SpeedRange  ·  onClose ()  ·  onSaved (range)

Edits the band the City Ride colours by, from Profile. It re-seeds its draft from the saved range each time it opens, so a cancelled edit never leaks into the next one. The copy explains where the default came from — under 25 km/h is a traffic crawl, 50 km/h is a common city limit for two-wheelers in central Bangalore — and then says plainly that it is a preference, not the road limit.

default range25–50
City speed rangeBelow is low, inside is balanced, above is high
Balanced from (km/h)25
Balanced to (km/h)50
Default 25–50: under 25 is a traffic crawl, and 50 km/h is a common city limit for two-wheelers (for example, central Bangalore). A preference, not the road limit.
Save
errorneeds both bounds
City speed rangeBelow is low, inside is balanced, above is high
Balanced from (km/h)60
Balanced to (km/h)0
Enter a lower and a higher speed, e.g. 25 and 50.
Save
06

Screens

Three tabs (Home, Map, Ride) and the pages pushed over them assemble the parts above. Tab screens scroll under the floating dock; the riding map hides it so nothing competes with guidance. Home and Ride are drawn 360 dp wide, a phone's width.

Tab dock

src/app/(tabs)/_layout.tsx · src/hooks/use-floating-navigation.ts

Three tabs now — Home, Map and Ride — under a hand-written FloatingDock rather than the stock tab bar; the trip planner moved out to its own stack screen. A floating pill on dock, dark in both schemes, with inactive glyphs in dockIcon. One primary pill slides to the active tab over 250 ms, so position is shown by a shape and not by colour alone; the dock draws the light icons and the pill carries a dark copy clipped to itself, moving the opposite way, so each glyph keeps its contrast mid-slide. The Ride tab shows the hunter glyph when the rider's bike is a Hunter and the generic motorbike otherwise. In landscape the dock stands on the left edge and the pill slides vertically. It hides entirely while riding and whenever the keyboard is open. Inactive tabs stay attached so the map's GL surface is never torn down and rebuilt — that used to flash black on every visit.

indexHome activefixed
mapMap activefixed
ridesRide activefixed

Home

src/app/(tabs)/index.tsx · range-ring.tsx · tank-gauge.tsx · bike-avatar.tsx · src/lib/vehicle-dashboard.ts

The bike is the hero. The title is just the model; the bike avatar on the right opens Profile, and while the phone is offline a small cloud-off mark in danger sits beside it. The bike card is a surface card with the cut-out close-up flush with its left and bottom edges (tapping the photo opens Vehicle info). Two corners mirror each other. Top right, the range to empty: the hero number, "km", and one caption from bikeCardFuel. On a Hunter it says when the low-fuel light comes on, or turns tint once it is on. Any other bike just says "Range", and "on a full tank" shows before the first full fill. The range ring wraps it, filled by range left out of a full tank: positive, then primary once the light is on, track only with no estimate. Top left, the mileage it comes from: a metric km/L, "Mileage · measured" (full-tank fills or Trip F) or "assumed", and how much of the claimed figure that is: the maker's ARAI (Hunter 350: 36.2) or the rider's own. The mileage bar (RangeRing side="left") is in tint, and shows only its track when there is nothing to compare. Under it, the Energy tile (opens Add fuel fill at /vehicle?section=fuel) and the Vehicle health tile, 12 apart. The tank drawing is the Hunter's, so it shows only when the bike's artwork is the Hunter's (art.tank); a Himalayan or Interceptor gets the fuel-pump icon. In landscape the card and everything below it sit side by side in two columns. The header row pulls the card up 12 because its 48 dp tap target is taller than the title.

estimate · ARAIHunter · measured · light in ~103 km
Hunter 350
187km
Range · light in ~103 km
33.4km/L
Mileage · measured92 % of 36.2 ARAI
Energy~7.1 LEstimated fuel
Vehicle health2,140 kmOn track · by 4 May 2027
low-fuel light on · own figurering primary · caption tint · level danger
Hunter 350
52km
Low-fuel light on · refuel soon
31km/L
Mileage · assumed82 % of your 38
Energy~3.2 LEstimated fuel
Vehicle health380 kmDue soon · by 12 Oct 2026
no full fill yettank size set · full-tank range · Log fill
Hunter 350
356km
on a full tank
31km/L
Mileage · assumed86 % of 36.2 ARAI
EnergyLog fill13 L tank · log a full fill
Vehicle healthSet upService reminders
another makeHunter artwork · no light · nothing to compare · date only
CB350
325km
Range
34.6km/L
Mileage · measuredCompare: set in Energy
Energy~9.4 LEstimated fuel
Vehicle health48 daysOn track · by 17 Nov 2026
no tank sizethe default bike · Set up
Hunter 350
Range unavailable
EnergySet upFuel & capacity
Vehicle healthSet upService reminders
Himalayan · service dueno tank drawing for its artwork
Energy~9.8 LEstimated fuel
Vehicle healthService dueBook a service
offline · storage error · interruptedabove the bike card, 16 apart
Hunter 350
Could not load saved rides. Restart the app to retry. Your saved data has not been replaced.
Your ride was interruptedOpen the map to resume it or save it
ride in progress · pauseda ride left on the Map keeps going; the card opens the ride view
City ride in progressStill recording. Open the map to see it
Long Ride pausedOpen the map to resume it or end it

Home · below the tiles

src/app/(tabs)/index.tsx · usual-trip-card.tsx · src/lib/documents.ts · src/lib/route-traffic.ts · src/lib/live-traffic.ts

UsualTripCard trip UsualTrip  ·  live LiveState

Under the Energy and Vehicle health tiles, 16 apart: the Documents row, the usual-trip card when there is one (in landscape it sits under the bike card instead). Documents is always there: a folder icon in tint, "Documents" and documentsSummary, which counts the four kinds (licence, RC, insurance, PUC) that have at least one file; it opens /documents. UsualTripCard shows only when upcomingUsualTrip finds a route ridden at about this time of day often enough, and not ridden in the last little while. Its title is the route's ends, then when the rider usually leaves and how many rides say so. The live line needs Live traffic turned on and a GPS route that is not a loop; signed out or not set up, it is left out (off). Its dot is positive, tint or danger: heavy from 10 min or a third over the usual time, some traffic from 3 min over, light otherwise. Next come the usual time against the quickest, with the traffic share from city rides when that is at least half a minute, and the quickest ride itself. The caption names Ola Maps only when a live answer is shown. Recent rides were here until 8 Oct 2026; Home no longer lists rides.

in orderDocuments · usual trip
Documents3 of 4 added
Brodipet → LakshmipuramYou usually leave around 9:10 am · 6 rides
Some traffic now. ≈ 24 min · +5 min over your usual
Usually ≈ 19 min at this time, 4 min slower than your quickest · ≈ 6 min of it in trafficQuickest: 15 min, leaving at 7:42 amFrom your own rides at this time of day · live traffic from Ola Maps, checked 9:02 am.
Documentsnone · some · all four
DocumentsLicence, RC, insurance and PUC, ready to show
Documents3 of 4 added
DocumentsAll four added · ready to show
live · light and heavyagainst the usual time about now
Brodipet → LakshmipuramYou usually leave around 9:10 am · 6 rides
Light traffic now. ≈ 20 min · +1 min over your usual
Usually ≈ 19 min at this time, 4 min slower than your quickest · ≈ 6 min of it in trafficQuickest: 15 min, leaving at 7:42 amFrom your own rides at this time of day · live traffic from Ola Maps, checked 9:02 am.
Brodipet → LakshmipuramYou usually leave around 9:10 am · 6 rides
Heavy traffic now. ≈ 31 min · +12 min over your usual
Usually ≈ 19 min at this time, 4 min slower than your quickest · ≈ 6 min of it in trafficQuickest: 15 min, leaving at 7:42 amFrom your own rides at this time of day · live traffic from Ola Maps, checked 9:02 am.
no live answerloading · offline · failed · off
Brodipet → LakshmipuramYou usually leave around 9:10 am · 6 rides
Checking live traffic…Usually ≈ 19 min at this time, 4 min slower than your quickest · ≈ 6 min of it in trafficQuickest: 15 min, leaving at 7:42 amFrom your own rides at this time of day.
Brodipet → LakshmipuramYou usually leave around 9:10 am · 6 rides
Live traffic when you’re back online.Usually ≈ 19 min at this time, 4 min slower than your quickest · ≈ 6 min of it in trafficQuickest: 15 min, leaving at 7:42 amFrom your own rides at this time of day.
Brodipet → LakshmipuramYou usually leave around 9:10 am · 6 rides
Couldn’t check live traffic just now.Usually ≈ 19 min at this time, 4 min slower than your quickest · ≈ 6 min of it in trafficQuickest: 15 min, leaving at 7:42 amFrom your own rides at this time of day.
Brodipet → LakshmipuramYou usually leave around 9:10 am · 6 rides
Usually ≈ 16 min at this time, about as quick as your bestQuickest: 15 min, leaving at 7:42 amFrom your own rides at this time of day.

Map · guidance bar

src/app/(tabs)/map.tsx

The idle map shows RouteSummary; the moment a ride starts it is replaced by this bar. guidanceTitle resolves through a fixed order of six conditions — no route, no fix, off route, no stored turn steps, arriving, then the turn itself — so the most fundamental problem always wins. Turn glyph at 48 portrait / 40 landscape in theme.navigation; the trailing chevron opens Route & stops.

turn aheadturn.distanceKm ≥ 0.025
In 450 mTurn right onto NH-44
turn nowdistance < 0.025 km
NowTurn left onto Kurnool Bypass
no routeroute === null · first check
Build a route to navigateOpen route tools to update
no fixnavPoint === null · crosshair
Waiting for GPSGuidance needs a fresh location fix
off routeprojection > 0.075 km · warning
Off routeReturn to the route, or reroute from here
no stepsroute built before turn data
Update route for turn guidanceOpen route tools to update
arriving< 0.025 km of geometry left
Arriving at destinationYou have arrived at Bangalore
demo arriveddemoKm ≥ route.distanceKm
Arriving at destinationRoute preview complete
on route, no turnfallback
Follow the routeContinue on NH-44

Map · transient overlays and controls

src/app/(tabs)/map.tsx · ride-paused-card.tsx · toast.tsx · map-credit.tsx · breaker-banner.tsx · fuel-ride-card.tsx

RidePausedCard breakMs number | null · demo boolean · finished boolean · onResume · onEnd  ·  BreakerBanner line string | null  ·  FuelRideCard pump FuelStation | null · reserve ReserveAlert | null · nearest NearestPump | null · onAdd · onDismiss  ·  MapCredit text string · dark boolean?

Everything over the map except the guidance bar. Idle: the compass top right; the map buttons, 48 dp circles plus two hairlines (Search nearby; Fit route only once a route is built; the crosshair in tint while the map follows the rider); Route & stops when a trip has endpoints; and two rides, one tap each. Long Ride · {destination} opens the Long Ride sheet, and a Long Ride only starts from its footer; with no trip it reads Plan Long Ride and opens the planner. City Ride needs no route, so it is the yellow primary. Both explain themselves through hint on long press. Riding hides the tabs and there is no exit button: Back leaves the ride view without pausing. RideWidget renders only while active; a paused Long Ride shows RidePausedCard instead, and Resume goes back to the ride view. Dragging the map brings up a labelled Re-centre pill. Browsing the map mid-ride shows the map buttons plus a chevron-up “Back to ride view”. The top column stacks, in order: Reroute from here (off route), the wait prompt, Exit demo beside the compass (route demo), Loading…, the map-failure card, and in the ride view BreakerBanner and FuelRideCard. Messages are the app-wide toast: icon by tone, a tap or ✕ dismisses it, 5 s (errors 8 s) plus 40 ms a character past 40 (at most 10 s, errors 12 s), doubled with a screen reader, 8 dp above the map’s bottom controls. The basemap credit hangs under the top bar for five seconds each time the tab is focused, then fades over 180 ms (at once under reduced motion) without moving anything; the full map credits are in Profile. A city ride replaces the guidance bar, overview and paused card with the city strip and card (City dashboard).

idle · trip plannedroute built · following
Long Ride · Bangalore City Ride
idle · no trip yetno endpoints · no fit, no Route & stops
Plan Long Ride City Ride
Long Ride sheet · route builtfooter starts the ride
Long RideGuntur → Bangalore
598 km · 9 h 58 min estimated · 3 planned breaks
Edit tripRoute & stops
Start Long Ride
Long Ride sheet · no routefooter builds it
Long RideGuntur → Bangalore
Build the route first for turn guidance, breaks and fuel stops.
Edit tripRoute & stops
Build route
Long Ride sheet · queued offlinerouteWaiting · body line only
Waiting for internet. The route builds by itself when you're back online.
Search nearby sheetthe search button · no break selected
Search nearbyFuel, food, breaks and places near the map centre
Town or address
Near map centre · 5 km radius
FuelFoodBreakStaySight
break target selecteda break pin tapped · above the ride buttons
Fuel target 3 · 150 km from startSuggested area · confirm a safe stop
Find stops
busybuilding a route or searching
toast · infoinformation-outline in tint
No internet. Your route builds by itself when you're back online.
Trip changed. Build your route again.
toast · successcheck-circle in positive
Ride saved · 412 km in 6 h 20 min
Rerouted · 186 km to Bangalore via 2 stops
Stop saved. Update your route to include it.
toast · with an actiona change made on the map · Undo for 10 s
Route updated · 598 km → 611 kmUndo
toast · erroralert-circle-outline in danger
Location unavailable. Check your GPS.
Route unavailable. Try again later.
persistent cardsmap failed to load · session.error under the bar
Map unavailable. Check your connection.
Allow location access to show live speed.
ride view · activetabs hidden · widget + overview
In 450 mTurn right onto NH-44
412 km left
~6h 20m left
52 km/h
ride view · map moved!following · fades in 180 ms
Re-centre
412 km left
~6h 20m left
34 km/h
off route> 75 m from the route · on a real ride
Off routeReturn to the route, or reroute from here
Reroute from here Rerouting…
wait promptstopped 2 min · then counting
Stopped for 2 minCount this stop as wait time? It will not be added to your riding time.
Count as waitStill riding
Wait time · 0:02:35Riding time resumes when you move off.
paused Long RideRidePausedCard · where the widget was
PausedCounts as a break
Break04:12
Resume rideEnd
paused route demodemo · End becomes End demo
PausedCounts as a break
Break00:48
Resume rideEnd demo
demo arrivedfinished · paused by itself · End demo only
Demo finishedYou’ve reached the destination
End demo
browsing during a rideBack / tab away · map buttons + Back to ride view
412 km left
~6h 20m left
52 km/h
route demoExit demo beside the compass, under the bar
Follow the routeContinue on NH-44
Exit demo
BreakerBannera known breaker ahead · nothing to tap
Speed breaker ahead · 80 m
FuelRideCard · at a pumpstopped 20 s at a pump · unknown brand
At Sri Balaji Fuels?Add the fill while you’re here
Add fill
FuelRideCard · reserveany ride · before a lookup
Reserve in ~8 km · fuel up soonFuel up at the next pump
On reserve · ~40 km leftFuel up at the next pump
FuelRideCard · reserve · pumpslive · saved on the phone (offline) · none known
On reserve · ~40 km leftNearest pump: Shell, Brodipet · 1.2 km
On reserve · ~40 km leftNearest saved pump: Indian Oil, NH 16 · 3.4 km
On reserve · ~40 km leftNo pump known within 10 km · fuel up at the next one
StopAdviceCardstanding 3 s at a known stop · from earlier stops there · gone on moving off
Switch off · usually ~1 min 30 s hereFrom 6 earlier stops here around this time · saves ~₹0.40 a stop
Keep it running · usually clears in ~15 sFrom 4 earlier stops here
credit · light mapidle: top left, beside the compassfixed
OpenFreeMap © OpenMapTiles · © OpenStreetMap contributors · Valhalla
credit · dark mapbasemap.dark · riding, 6 dp under the barfixed
OpenFreeMap © OpenMapTiles · © OpenStreetMap contributors · Valhalla

Map · Route & stops sheet

src/app/(tabs)/map.tsx · search-suggestions.tsx

SearchSuggestions query string  ·  near Coordinate  ·  onCategory (category) => void  ·  onPlace (place: Suggestion) => void

The map’s command surface, opened by the Route & stops button, the guidance bar, the ride overview’s stops action, a break target’s Find stops and the Long Ride sheet; it only exists with a trip (endpoints planned, or a Long Ride under way). On a real ride with a built route it leads with Reroute from here, disabled without a GPS fix, and on a Long Ride the Live traffic toggle: off by default, it sends the position and destination to Ola Maps every 5 minutes, and its line turns to text colour once there is an answer. Any ride or demo adds End ride / End demo. The line under the trip names why there is no route: queued offline, the trip changed since the last build (the button still reads Build route, because the stale route no longer counts), or never built; with a route it adds “no live traffic” unless traffic is on during a ride. From two letters the search field shows SearchSuggestions: up to two categories the words mean, then places the phone knows (recent, saved, ridden), which work offline, then up to five OpenStreetMap (Photon) suggestions from three letters, 400 ms after the last key. The five categories leave out other, and searches centre on the selected break, else the map centre. Map help, credits and “Report a map issue” are in Profile now; demos start from Profile → Developer.

idle · route built · break selecteda break pin open · no ride
Route & stopsSearch near break 3
Guntur → Bangalore 598 km · 9 h 58 min estimated · no live traffic
Update route
Near break 3 · 5 km radius
FuelFoodBreakStaySight
Saved stops · 5
on a Long Ride · live traffic ononRide · route built · an answer from Ola
Route & stopsRoute, breaks and nearby places
Reroute from here
Live traffic
Some traffic ahead · ≈ 190 min · +12 min over the route’s estimate to BangaloreFrom Ola Maps, which is sent where you are and your destination, and measured against the route’s own estimate. Also shows on Home for your usual routes.
End ride Guntur → Bangalore 598 km · 9 h 58 min estimated
Update route
Near map centre · 5 km radius
FuelFoodBreakStaySight
Saved stops · 5
live traffic · offthe default · route text adds “no live traffic”
Live traffic
Off. Turn on to check traffic from here to your destination every 5 minutes.From Ola Maps, which is sent where you are and your destination, and measured against the route’s own estimate. Also shows on Home for your usual routes.
live traffic · on, no answerthe line under the toggle, by state
Checking traffic ahead…Traffic ahead when you’re back online.Couldn’t check traffic just now. Trying again in 5 minutes.Sign in (Profile) to check live traffic.Live traffic isn’t set up on the YamDrive site yet.
reroute disabledno GPS fix · or a reroute running
Reroute from hereRerouting…
route demodemo · no reroute or traffic · End demo
Route & stopsRoute, breaks and nearby places
End demo Guntur → Bangalore 598 km · 9 h 58 min estimated · no live traffic
Update route
Near map centre · 5 km radius
FuelFoodBreakStaySight
Saved stops · 5
no route yetnever built · route block only
Guntur → BangaloreBuild a route to see roads and breaks.
Build route
trip changeda stale route · button says Build route
Guntur → BangaloreTrip changed. Update your route.
Build route
queued offlinebuilt without internet · waits on the phone
Guntur → BangaloreWaiting for internet. The route builds by itself when you're back online.
Build route
SearchSuggestions · a category word3+ letters · Photon still to answer
Fuel nearbyMatches “petrol” · within 5 km
Looking up places…
SearchSuggestions · placesthe phone’s places first, then OpenStreetMap
Nandi Hills58 km · Recent
Nandi Hills Viewpoint61 km · You rode here
Nandi Hills Road55 km · Chikkaballapur, Karnataka
SearchSuggestions · notesoffline · Photon failed · nothing found
Offline: showing places you know. Towns and addresses come back online.Online suggestions are unavailable right now. Press search to look it up.No matches. Press search to look it up on the map.

SavedStops

src/components/saved-stops.tsx

style StyleProp<ViewStyle>

A collapsible card on the Trip screen, which passes in its own card style. The header is a Saved stops · N disclosure with a chevron and a tune-variant button for Trip options; the list starts closed (listOpen is false on every mount). Open, it is a numbered visit order on a connected rail, one stop expanded at a time. Reorder arrows disable at the ends rather than disappearing, so the row keeps its shape. Removing one stop and clearing all of them both go through a native confirm. The Google Maps route needs two or more saved stops; past nine waypoints between the first and last stop, a confirm says how many are left out before opening the rest anyway.

listOpen=falsedefault · list hidden
Saved stops · 3
open · stops.length === 0empty state
Saved stops · 0
No saved stopsChoose places near break pins, or hold the map to add a stop.Find stops
open · listone stop expanded
Saved stops · 3
Visit order · tap a stop for details
1
Indian Oil, Kurnool
Fuel
2
Hotel Bheema, Anantapur
Food
NH-44, Anantapur, Andhra Pradesh Breakfast stop — opens at 6 AM
3
Nandi Hills viewpoint
Sight
row endsfirst: up disabled · last: down disabled
Trip optionstwo or more stops · route available
Trip options
Trip nameGuntur → Bangalore
Open saved stops in Google Maps Saved stops only; trip endpoints are not included. Clear stops
Save name
Trip optionsone stop · routeUrl() is null
Trip options
Trip nameWeekend escape
Open saved stops in Google Maps Add a second saved stop to open a route. Clear stops
Save name
Trip optionsno stops · name cleared → Save name disabled
Trip options
Trip name 
Save name

Trip

src/app/plan.tsx

A stack screen now, not a tab: it opens over the map and leaves by the round Back button. The trip name is the title — a caption Trip above it and a chevron beside it — and tapping it opens RideLibrarySheet to switch trips or start a new one; the pencil opens Ride settings. The whole screen is a single guard: until storage hydrates it renders nothing but “Loading trip…”, so the editor never mounts over defaults it would then overwrite. Without both endpoints the summary card becomes a prompt and View map drops to secondary; the break schedule is still worked out from the manual distance estimate. The elevation card appears only once a road route matching the current endpoints and stops exists. Below View map sit RidePreparation (its own plate), the break schedule, SavedStops and the planning notes. Metrics compact their durations (9 h 58 min → 9h 58m) and wrap on narrow screens. If the elevation request fails with no message the card falls back to “Elevation profile unavailable.”

hydrated=falsethe whole screen
Loading trip…
!hasEndpoints(plan)new trip · defaults · all cards collapsed
Trip
My trip
Choose start → Choose destination Choose a start and destination to see distance, riding time, breaks and the elevation profile. Choose start and destination
15 min rest every 60 min
Fuel interval not set
View map
RidePreparation
Break schedule · 9
Saved stops · 0
Planning notes
route builtroad distance · elevation loaded
Trip
Guntur → Bangalore
Guntur → Bangalore
Distance598 km
Riding9h 58m
With breaks12h 43m
Estimated · road distance · no live traffic
15 min rest every 60 min
Refuel every 150 km
Elevation
↗ 1,240 m↘ 980 m
0 km598 km
Low 12 m · High 604 m · terrain data along the route
View map
RidePreparation
Break schedule · 11
Saved stops · 3
Planning notes
elevation cardloading · request failed
Loading elevation profile…
Elevation is not available for this route.Retry elevation
schedule expandeddeparture 05:00 · 200 km · fuel every 90
Break schedule · 4
Estimated times · IST · includes breaks
1. Rest · 60 km6:00 AM · 15 min break
2. Fuel · 90 km6:45 AM · 15 min break
3. Rest · 120 km7:30 AM · 15 min break
4. Fuel + rest · 180 km8:45 AM · 15 min break
Arrive · 9:20 AM
no departure · no breaks45 km · schedule.stops.length === 0
Break schedule · 0
No breaks planned before arrival.Arrive · 45 min from start
Planning noteshelpOpen
Planning notes
Pace estimates travel time; it is not a speed recommendation. Breaks do not measure engine temperature. No background break reminders. Tap break pins on the map to choose real stops. Confirm access and opening hours. Open Google Maps Endpoints only; planned breaks are not included.
Ride settingsendpoints · speed colours · five fields · error
Ride settings
Start
GunturPin selected · change
Destination
BangaloreSearch or choose a pin
Speed colours
Lower (km/h)40
Upper (km/h)65
Yellow below · green within · red above. Your preference, not a road limit or engine-safety rating. Yellow is not a prompt to speed up.
Distance estimate (km)600
Planning pace (km/h)150
Rest every (min)60
Break length (min)15
Fuel interval (km, optional)150
Pace is for planning, not a speed recommendation. Allow a fuel reserve; fuel level is not tracked. Planning pace (km/h): enter a number from 10 to 120.
Save
Ride settings · endpointsnone chosen yet · no pins
Start
Choose startSearch or choose a pin
Destination
Choose destinationSearch or choose a pin
Choose a start and destination.

Ride tab

src/app/(tabs)/rides.tsx · src/components/ride-insights.tsx · ride-thumbnail.tsx · src/lib/ride-path.ts

RecordsCard records RideRecords  ·  averageKm number | null  ·  rideFor (id) => ride?  ·  now number  ·  onOpen (rideId) => void

The ride log, grouped by IST week with "This week" and "Last week" named rather than dated, and the footer says so: "Times in India time (IST)". Under the title, a caption with a chevron names the filter and opens the Show rides sheet, which drives everything below it. Heatmap and Log a past ride are icon-only round buttons (hold for the label); Heatmap is dimmed until there is a GPS ride that isn't a demo, and Log a past ride until the log has loaded. The totals card is the hero distance and "riding · rides" under it, then an Insights row that opens /insights with the same filter, where the chart, Ridden most and City riding now live (shown when there is more than one ride, a route ridden twice, or city data). Records (RecordsCard) is Top speed and Longest ride as tiles that name the ride's date and open it, then Avg speed, Avg ride and Total climb in one row; speed and climb come from GPS rides only, so hand-logged rides get "—" and "Ride by GPS". Demo rides are listed but never counted, in the totals or the week's km. Each row is a 72 × 72 RideThumbnail and two lines: the title (rideListTitle: where it went, "Around X" for a loop, else the time of day; the typed ends for a hand-logged ride, "Demo City Ride" for a demo) and one caption: date and time, riding time (or "logged by hand"), km, and "Demo". A hand-logged ride has no path, so its thumbnail is note-pencil. Place names come only from the phone's cache. Four empty-ish states, and the last two say different things on purpose.

listAll rides · totals · records · weeks (earlier weeks cut)
RideAll rides
Total distance212 km9 h 48 min riding · 14 rides
InsightsDistance by week · ridden most · city riding
Records
Top speed
68 km/h14 Sep, 06:40
Longest ride
64 km20 Sep, 05:12
Avg speed22 km/h
Avg ride15 km
Total climb412 m
This week19 km
Brodipet → Lakshmipuram30 Sep, 08:23 · 18 min · 6.2 km
Around Arundelpet29 Sep, 18:40 · 41 min · 12.8 km
Last week69.4 km
Morning ride26 Sep, 06:05 · 1 h 12 min · 31.4 km
Demo city ride24 Sep, 17:30 · 22 min · 7.9 km · Demo
Guntur → Vijayawada23 Sep · logged by hand · 38 km
Times in India time (IST)
Show ridesthe filter sheet · one tap picks and closes
Show rides
All rides
This month
This year
Recorded by GPS
Logged by hand
Logged by handfiltered · no GPS, so no speed or climb
RideLogged by hand
Total distance118 km3 h 20 min riding · 3 rides
InsightsDistance by week · ridden most · city riding
Records
Top speed
—Ride by GPS
Longest ride
52 km12 Sep
Avg speed—
Avg ride39 km
Total climb—
Last week38 km
Guntur → Vijayawada23 Sep · logged by hand · 38 km
7–13 Sep52 km
Guntur → Amaravati12 Sep · logged by hand · 52 km
Times in India time (IST)
empty · filtered · loading · errordifferent copy on purpose · Heatmap dimmed with no GPS ride
RideAll rides
No rides yetStart a ride on the map and tap End ride when you arrive. The route, distance, time and elevation are saved here.
No rides match this filterStart a ride on the map and tap End ride when you arrive. The route, distance, time and elevation are saved here.
Loading rides… Could not load rides. Times in India time (IST)

Ride detail

src/app/ride/[id].tsx

One saved ride, top to bottom: a header whose title is the short name (“Morning Ride”) and whose caption says where and when; a RouteRelief card with the distance as a hero and Climb, Steepest and Riding time beside it; a fixed map preview; a “Review what was recorded” row; a grid of stats; then the city cards, the wrong-turns, motion and slope cards (RideWrongTurnsCard, MotionCard, SlopeCard, not reproduced here), the elevation card and Delete ride. The map cannot be dragged: it is always fitted to the route. A city ride draws its path in speed-band runs with event dots; any other ride draws one line in route. Where the time went and How you rode read straight off the stored CitySummary and band runs, so the detail never recomputes what the ride already decided. A hand-logged ride drops Start and End, shows — for top speed, and has no relief, map or review row. The fuel-idling line appears only when the bike's model name gives an engine size.

city rideheader · relief · review · stats
Morning RideCity ride · Brodipet · 20 Sep 2026 at 05:12
Start Finish
Drag to turn · height exaggerated
Distance
18.4 km
Climb
86 m
Steepest
6%
Riding time
1:11:06
Review what was recorded6 recorded
Average16 km/h
Top speed54 km/h
Start5:12 am
End6:26 am
map card240 dp · fitted, not draggable · city runs + events
A B
OpenFreeMap © OpenMapTiles · © OpenStreetMap contributors
ride.cityWhere the time went · How you rode
Where the time went
Moving0:41:18
Traffic0:17:02
Stops0:07:06
Breaks0:05:40
Fuel idling in traffic≈ 60 mL · ₹6.3
An estimate: traffic time at about 0.21 L/h, the idle burn for your engine size, at the price of the fill this ride ran on. 9 traffic waits · 2 stops · 1 break · 3 hard accelerations · 5 hard braking
Low speed
Balanced speed
High speed
Traffic
Stop
Break
Hard acceleration
Hard braking
How you rode
Low5.1 km · 28 %
Balanced11 km · 61 %
High2.1 km · 11 %
Share of the distance in each speed band.
touring ridenamed ends · waitMs set · no city cards
Morning RideGuntur → Vijayawada · 18 Sep 2026 at 06:05
StartGuntur FinishVijayawada
Drag to turn · height exaggerated
Distance
81.6 km
Climb
142 m
Steepest
4%
Riding time
1:52:40
Average43 km/h
Top speed78 km/h
Start6:05 am
End8:14 am
Wait time0:09:30
ride.manuallogged by hand · no shape
Guntur → Vijayawada18 Sep 2026 · logged by hand
Distance
78 km
Climb
—
Steepest
—
Riding time
1:40:00
Average47 km/h
Top speed—
Logged by hand · no GPS route or elevation recorded.
Delete ride
fallback copyelevation · slopes · no path
Not enough accurate GPS altitude readings to draw an elevation profile.
Demo rides do not record elevation.
Speeding up on slopesFinding the slopes of your speed-ups…
Speeding up on slopesSlopes come when you’re online: open this ride again then.
Speeding up on slopesNo speed-up was long enough to measure its slope.
This ride was saved before routes were recorded, so there is no map.
ride === undefined · nullloading · not found
Ride
Loading ride… This ride could not be found. It may have been deleted.

Heatmap

src/app/heatmap.tsx

Every recorded path laid over one map: a wide, blurred heatGlow line (12 dp, opacity .18, line-blur 4) under a narrower heat line (4 dp, opacity .55), so roads ridden often stack up and read darker. Demo rides are left out; a ride without a stored path falls back to its saved preview, and rides logged by hand have neither. The map mounts only once there is something to fit it to, so while loading, on an error and when empty the screen is the plain background with the floating Back button and the title pill. The caption in the pill carries the state; the count says “ride” for exactly one.

paths.length > 0glow under line · both translucent
Heatmap
18 recorded rides · darker = ridden more
OpenFreeMap © OpenMapTiles · © OpenStreetMap contributors
paths === nullloading · no map yet
Heatmap
Loading routes…
errorthe ride log could not be read
Heatmap
Could not load rides
paths.length === 0nothing to draw
Heatmap
0 recorded rides · darker = ridden more
No recorded routes yet Routes are saved when you ride with the map and tap End ride. Rides logged by hand have no route.

Vehicle health · Profile

src/app/(tabs)/index.tsx · src/app/vehicle.tsx · src/app/profile.tsx

The health tile is the only place the health* grounds are used, and they are the only tokens below the surface palette that invert between schemes. serviceStatus resolves to four outcomes — null until a schedule exists, then good, soon (within 30 days or 500 km) or due — and the ground, the metric colour and the caption all change together.

healthnull · no schedule set
Vehicle healthSet upService reminders
healthgood · healthGood
Vehicle health2,140 kmOn track · by 4 May 2027
healthsoon · healthSoon
Vehicle health410 kmDue soon · by 4 Nov 2026
healthdue · healthDue
Vehicle healthService dueBook a service
fuel metricsmeasured vs not yet
31.4km/L · Measured
₹3.24per km · Fuel cost
—km/L · Measured
—per km · Fuel cost
Add two full-tank fills to calculate mileage. Include every partial fill between them.
profile rowschevron-right disclosure
Your bike
Royal Enfield Hunter 3502022 · 20,412 km
Account & sync Signed in · last synced 6:12 pm
Sync nowSign out

PasscodeScreen · SystemBarFills

src/components/passcode-screen.tsx · system-bar-fills.tsx

The passcode gate stands in front of the whole app until sync signs in. Six boxes render the digits as dots over a hidden 1 × 1 number field, so the system keyboard does the typing and the code itself never shows; the box under the caret takes tint, and an error turns every border danger at once rather than implying which digit was wrong. SystemBarFills is invisible by design — two solid strips the height of the top and bottom insets, drawn because Android renders the app edge to edge with transparent system bars and scrolled content would otherwise run under them. The dashed outlines below are this canvas's, not the app's.

passcode3 of 6 · caret on the next box
YamDriveEnter your passcode to back up and sync your bike, fuel and rides. You stay signed in on this phone.
Signing in…
passcoderejected · every border danger
YamDriveEnter your passcode to back up and sync your bike, fuel and rides. You stay signed in on this phone.
Could not sign in.
SystemBarFillsthe two strips, outlined here only
Scrolled content
would otherwise run under the transparent system bars

Widgets · TabReveal

src/app/widgets.tsx · src/components/tab-reveal.tsx

The sensor widgets moved off Home onto their own page, reached from Profile, and sensor-widgets.tsx split into SensorTiles, MissingWidgets and SensorList so the page can show supported and unsupported separately rather than silently hiding what the phone lacks. TabReveal is the other invisible one: tabs swap instantly and it lifts a background veil off the tab that just arrived over 220 ms, because animating a whole screen's opacity makes Android composite the page — map texture and all — off-screen and stall the first frames. Hidden tabs stay mounted but fully transparent.

Widgetssupported, then not on this phone
WidgetsLive from this phone's sensors · for reference
Ambient light18,400 lxBright sun
Heading142° sEPhone heading
Not on this phone
AltitudeNeeds a barometer · not on this phone
Phone sensorsScanned 24 Sep 2026
GPS · location on
Barometer
Scan again
Widgetsnever scanned · none supported
Scanning this phone… This phone has not been scanned yet.
This phone has none of the sensors these widgets need.
07

State machines

The states above are not free-floating — most of them are produced by four small pieces of logic. These are the rules that decide which specimen renders: each plate shows the specimens it decides, then links to where they sit in a whole screen.

Ride clock

src/hooks/use-ride-session.ts · src/lib/ride-speed.ts

Three states and one derived flag. Pausing banks elapsedMs and clears startedAt, so elapsed time is always elapsedMs + (now − startedAt) and a pause loses nothing. Pause is also involuntary: leaving the foreground, blurring the Map tab, a GPS subscription error, or a demo reaching the destination all call it.

RideClock · status
StateClockGPSMeter readsLeaves via
idleelapsedMs 0, startedAt nullNot watching0 km/h · “Start”start(), startDemo()
activestartedAt set, ticks every 1 swatchPositionAsync at high accuracy, 1 sLive speed, or — until a fix passes the gatespause(), end(), background, tab blur, GPS error, demo arrival
pausedBanked elapsedMs, startedAt nullSubscription removed, fix cleared0 km/h · “Paused”start() resumes, end() resets
demoActive clock, playback ×100Never requested — simulated onlyCycles the four demo speedsend(), or auto-pause at the destination

Speed band

src/lib/ride-speed.ts

The band is a user preference — a comfort range the rider sets in Ride Plan — and explicitly not a road limit or an engine-safety rating. Below the range is yellow, which is why the copy in Ride settings says outright that yellow is not a prompt to speed up. With no range saved, Start ride routes to Ride Plan first rather than starting uncoloured.

speedBand(speed, range) → fill
ConditionBandFillAccessible word
speed === null || !rangeunknownbackgroundElementGPS…
speed < range.minbelowspeedLow on onSpeedLowBelow
min ≤ speed ≤ maxwithinspeedBalanced on onSpeedIn range
speed > range.maxabovespeedHigh on onSpeedAbove
status !== 'active'not colouredbackgroundElementPaused · Start

Data gates

ride-speed · ride-overview · navigation-guidance · route-geometry

Every unavailable state on this canvas traces to one of these thresholds. They are the reason a stale or imprecise fix produces an em dash rather than a plausible-looking number.

Thresholds that turn data into an unavailable state
GateLimitRejected value shows as
Fix age≤ 8 000 ms, and no more than 2 000 ms in the futureSpeed — · “Waiting for GPS”
Horizontal accuracy0 – 30 mSpeed — · position not drawn
Reported speedFinite and ≥ 0; converted ×3.6 to km/hSpeed —
Heading0 – 360, and speed > 3 km/hCompass “—”, marker falls back to a dot
Off routeProjection > 0.075 km (75 m)“Off route” · distance, time and road label suppressed
Saved stop on routeWithin 0.075 km of the lineStop excluded from “Next”
Next stop lookaheadkm > travelled + 0.025 kmStop treated as passed
Arrival< 0.025 km of geometry remaining“Arriving at destination”
Altitude accuracy0 – 30 m, fresh within 8 000 msElevation —; session extrema kept
Elevation displayReading < 8 s old, not demo, not pausedElevation —
Route freshnessroadRoute.signature must equal the current origin, destination, pins and stops“Trip changed. Update your route.”

Validation ranges

src/lib/ride-plan.ts · ride-preparation.ts · ride-library.ts · ride-library-sheet.tsx · plan.tsx

Stored trips are re-parsed on every load rather than trusted, so a hand-edited or corrupted value falls back to its default instead of spreading. The forms check the same bounds before saving, but each screen words its errors itself: Ride settings (plan.tsx) builds them from the field label, New trip (RideLibrarySheet) has its own copy, and the Departure sheet (RidePreparation) another. A new trip has no start or destination; the old Guntur → Bangalore default survives only as isPlaceholderTrip, which blanks that exact untouched plan when an old install loads it.

parseRidePlan · parseTrip · form validation
FieldAcceptedOn load, otherwiseError copy
distanceKm1 – 3 000600Both forms: “Distance estimate (km): enter a number from 1 to 3,000.”
averageKph10 – 12060Ride settings: “Planning pace (km/h): enter a number from 10 to 120.”
breakEveryMinutes15 – 18060Ride settings: “Rest every (min): enter a number from 15 to 180.”
breakMinutes5 – 12015Ride settings: “Break length (min): enter a number from 5 to 120.”
fuelEveryKm20 – 500, or null (blank field)null if missing; 150 if out of rangeRide settings: “Fuel interval (km, optional): enter a number from 20 to 500.”
speedRange0 – 200, max > min, both or neitherunsetRide settings: “Enter both speed bounds from 0–200, with upper greater than lower.”
departureTime/^([01]\d|2[0-3]):[0-5]\d$/; optional in New tripunsetDeparture and New trip: “Use 24-hour time, for example 05:00 or 16:30.”
origin · destinationNon-empty; stored trimmed and cut to 200 chars''Both forms: “Choose a start and destination.”
originPin · destinationPinFinite, |lat| ≤ 90, |lon| ≤ 180pin dropped—
preRideChecksFiltered against PRE_RIDE_CHECKS ids; reset to [] when the endpoints or departure changeunset unless an array—
lightMapbooleanunset—
trip nameTextField maxLength 100 only; Save name disabled while blank; New trip blank becomes “origin → destination”“My trip” if blank or not a string—
saved stopNon-empty id, finite coordinates in rangestop dropped; blank name “Unnamed stop”; unknown category other—
trip · libraryNon-empty, unique idtrip dropped; unknown activeId opens the first trip—