Fuel efficiency, in three sizes. Choose how much you want to see at a glance.
Interactive design preview · Sample data · Widgets inside YamDrive
9:41Home preview
Your motorcycle
Hunter 350
Your widgets
Ask YamDrive… Coming next
Medium widget added to the preview.
Onboarding · optional step
Make your bike the widget.
Start with a photo
Sample artwork shown in a framed background.
Sample sticker · transparent background
Made on your phone
The mobile app will process and store your photo locally. On Android, the background-removal model may need downloading first.
This HTML prototype shows the flow. Its sample sticker is existing transparent artwork; it does not remove backgrounds from selected photos.
Small pairs the mileage with a compact line graph. Medium gives the trend more room. Large reveals the individual fill intervals and the distance behind the average. Each size shows the same metric, calculated from completed full-tank intervals.
Your riding, at a glance.
Up to four widgets, followed by your ride history. Interactive preview · sample data.
Ride
All rides
Your ride widgets4 of 4
Your ridesInsights
This week
Indiranagar to Whitefield
Today · 18.4 km · 34 min
From the odometer
Yesterday · 12.6 km
No tracked route
One map. Two ways to ride.
Free ride or an A-to-B destination. Interactive preview · sample map and distances.
MapSample map · no live navigation
Destination cleared. The trip is still in saved trips.
The Map tab in a city ride, put together the way map.tsx puts it together: CityGlanceTop with
the compass inside it, the map following the rider, and CityGlanceBottom. The phone runs the app's own logic
(src/lib/city-ride.ts, city-demo.ts, compass.ts, traffic-fuel.ts),
copied in by npm run canvas:sync, so a state here is what the phone would show for the same speeds.
Pause, Resume, End and City Ride work on the phone itself. Landscape is the same ride on an 800 × 360
screen: Android keeps its navigation bar beside the app, the strip and card share one panel on the left,
and the dock stands on the left edge when idle.
Orientation
Ride as
0:00/ 14:15
Light
Night
About this screen
Orientation
Variant
Light
Night
Round 6 applied · round 5 proposed · rounds 1–4 applied · R3·2 not taken
Fixes from the backlog
The bugs the canvas audit found (docs/backlog.md → Bugs to fix next), each as it looks
today and as it would after the fix, with the change to the code. All ten are applied; 10 came from your note on the
toast. Leave a note on any of them with Rahnotate.
Round 6 · fuel and ride entry · applied
From lending the bike: the dash read 14,011.7 km on Thursday evening, a friend rode it without the phone, and on
Tuesday it read 14,083 km with Trip F 60.2 before ₹300 of petrol at ₹137.99 a litre. Logging that took a fill, an odometer reading and a
ride, in whatever order, and each order lost something. Every phone below uses those numbers. Branch
claude/fuel-ride-entry-logic-h3os3b; the logic is in test/fill-entry.test.ts.
R6·1
Getting the bike back: log the odometer first, from Home
Applied
The first thing to do on getting the bike back is read the dash. The only way to log a reading was “Log a past ride” on
Rides, a ride form: it wanted From and To (filled in from the usual trip), dated the km today, and dropped the tenth (72 km, not 71.3).
So the fill at the pump went in first, became the latest point, and the 71.3 km never reached a ride. Now a Log odometer row sits
under the bike card, and its sheet asks only for the odometer, with the tenth, and Trip F on a Hunter. The km since the last point that no
ride holds are always logged, as a ride without GPS dated from that point; where and when come next (R6·2).
Before · Rides → + → Log a past ride
Log a past rideFrom the odometer on your dash
From odometerEnter km
Odometer now · km14083
Trip F · km60.2
Since 14,011 km on Thu, 1 Oct: 72 km ridden = 72 km not yet logged.
FromHome
ToOffice
TodayYesterday
Save ride
After · Home, under the bike card
52km
Low-fuel light on · refuel soon
31km/L
Mileage · assumed86 % of 36.2 ARAI
Log odometerLast 14,011.7 km · 1 Oct 18:00
After · Log odometer, typed on getting the bike back
Log odometerRead it when you get on the bike
Odometer · km14083
Trip F · km60.2
Since 14,011.7 km (1 Oct 18:00): 71.3 km ridden = 71.3 km not in any ride.
71.3 km will be logged as a rideWithout GPS, from 14,011.7 km (1 Oct 18:00), so your rides add up to the odometer. Lent the bike, or rode without recording? This is that riding. Next, add where it went and when, or do it later from Rides.
Save
After · a little over the GPS rides is GPS reading short, not riding
Log odometerRead it when you get on the bike
Odometer · km14320.6
Trip F · kmIf shown
Since 14,083 km (6 Oct 09:00): 237.6 km ridden − 230.4 km in rides = 7.2 km not in any ride.A little more than your GPS rides: GPS reads a few % short of the odometer, so this isn't logged as a ride.
Save
src/components/odometer-sheet.tsx new: the odometer (dashKm, keeps the tenth) and Trip F; saves the gap ride, then the reading
src/app/(tabs)/index.tsx
+ <Pressable … onPress={() => setReading(true)}> … Log odometer · Last 14,011.7 km · 1 Oct 18:00
+ {reading ? <OdometerSheet onSaved={setLogged} … /> : null}
src/lib/odometer.ts
+export function dashKm(text: string): number | null // "14011.7" stays 14011.7
+export const isRealGap = (u: Untracked) => u.untrackedKm >= Math.max(2, 0.06 * u.loggedKm);
+export function gapRide(u: Untracked, at: number, now: number): RideLogEntry // just after the earlier point, needsDetails
R6·2
A ride from the odometer: From, To and the day, now or later
Applied
Every km is tracked, so the gap ride is never skipped; where it went and when matter for riding and bike health figures
to come. After Log odometer, Add ride details opens for it, with Later. A ride still waiting says so in Rides, and its page
leads with Add details. The day can only be one between the two readings (Thursday to Tuesday here), and on those days the ride is
moved inside them, so it is still counted once and burns the right fill's fuel. The distance stays the odometer's.
Add ride details · right after Log odometer
Add ride details71.3 km · 14,011.7 → 14,083 km on the odometer
Where it went and when help your riding and bike health figures. You can add them now or later from Rides.
FromKukatpally
ToWarangal
Which day? Between the two readings
TodayYesterdaySun, 4 OctSat, 3 OctFri, 2 OctThu, 1 Oct
Riding time · h3
min30
Riding time is optional. Without it, the ride has no average speed.
LaterSave
Later · Rides, and the ride's own page
14,011.7 km → 14,083 kmFrom the odometer · logged by hand · 71.3 kmAdd From, To and day
14,011.7 km → 14,083 kmFrom the odometer · details to addFound from the odometer, 14,011.7 → 14,083 km. Add where it went and which day, for your riding and bike health figures.Add details
src/lib/ride-log.ts
+export type OdometerSpan = { fromKm: number; toKm: number; after?: number; before: number };
+ odometer?: OdometerSpan; needsDetails?: true; // on RideLogEntry, kept by parseRideLog for rides logged by hand
+export function withRideDetails(ride, { origin, destination, date, hours }, today, now): RideLogEntry
+ // a day outside the readings: "Pick a day from 1 Oct to 6 Oct: the odometer readings this ride lies between."
src/components/ride-details-sheet.tsx new: From and To with the usual places, a chip per day (up to 8, else the wheel), riding time
src/app/(tabs)/rides.tsx + "Add From, To and day" on the row src/app/ride/[id].tsx + Add details · Edit details
R6·3
At the pump: the odometer is read off the dash, not guessed, and any order works
Applied
The fill's odometer was filled in with the last reading plus GPS rides: “some other value”, and one tap of Save stored the
guess as a real reading. It now starts empty, with the estimate offered as a button. With the odometer logged first, a fill at the same
14,083 km was refused (“must be above 14,083 km”); a fill may now sit at a reading's km, and the tank takes the reading, then the fill.
Without it, the form finds the 71.3 km itself and logs the ride (details later, from Rides).
Before · a guess in the field, then refused after Log a past ride
Amount paid · ₹300
Price per litre · ₹137.99
Litres2.17
Odometer · km14015
Estimated: 14,011 + 4 km of GPS rides · check the dashThe odometer must be above 14,083 km, the last point before this fill.
After · read off the dash; the gap found if the odometer wasn't logged first
Amount paid · ₹300
Price per litre · ₹137.99
Litres2.17
Odometer · km14083
Read it off the dash, with the tenth. Last known: 14,011.7 km.
71.3 km since 14,011.7 km (1 Oct 18:00) aren't in any ride. They'll be logged as a ride without GPS, so your rides add up to the odometer.Add where it went and when later, from Rides. Next time, Log odometer on Home when you get on the bike.
After · a new fill, with GPS rides since the last reading
Odometer · kmFrom the dash, like 14083.4
Use estimate · 14,087 kmRead it off the dash, with the tenth. Last known: 14,083 km, plus 4 km of GPS rides since.
After · saved
Fuel fill saved · 2.17 L · 71.3 km ride logged, add its details in Rides
src/app/vehicle.tsx- const kmText = mode === 'fuel' && !fill && !kmEdited ? String(odoEstimate.km) : km;
+ const kmText = mode === 'fuel' && !fill && !kmEdited ? '' : km; // "Use estimate · 14,087 km" fills it on a tap
+ const missing = gapAt(odo, at); if (missing) ride = gapRide(missing, at, Date.now());
src/lib/fill-timing.ts checkFillPlacement
- if (!(fill.km > floor) …) return `The odometer must be above ${floor} km, the last point before this fill.`;
+ if (fill.km < readingFloor) return `The odometer can't be below ${readingFloor} km, your last reading before this fill.`;
+ if (!(fill.km > fillFloor) …) return `The odometer must be above ${fillFloor} km, the last fill before this one.`;
src/lib/vehicle-dashboard.ts energyEstimate: at the same km, points in time order (the reading, then the fill)
R6·4
Vehicle: the readings are listed, and a mistyped one can be deleted with its ride
Applied
Readings could be added but never seen or removed: 140830 typed for 14083 left the odometer at 1,40,830 and a
1,26,818.3 km ride. Vehicle info now has an Odometer card: Log odometer, and the readings newest first (the latest five, or all).
Deleting one offers to delete the ride logged from it, and moves the odometer back to the furthest point left, never below a service's km.
Deleting a fuel fill offers the same for a ride its form logged, and moves the odometer back the same way (R6·6).
Before · Vehicle info
Royal EnfieldHunter 350
Year2022
Odometer1,40,830 km
No list of readings, and no way to remove one.
After · the Odometer card, and deleting the typo
OdometerRead off the dash. Fuel, range and rides without GPS start from the latest; delete one you mistyped.Log odometer
1,40,830 km09:00 · Trip F 60.2 km
14,011.7 km1 Oct 18:00
Delete this odometer reading?09:00 · 1,40,830 km · Trip F 60.2 km
The 1,26,818.3 km ride logged from it came from the same odometer number. Delete it too?
CancelOdometer reading onlyDelete both
src/lib/odometer.ts
+export function withoutReading(v: Vehicle, reading: OdoReading): Vehicle // odometer back to the furthest point left
+export const rideLoggedAt = (rides, point) => rides.find(r => r.manual && r.odometer?.before === point.at && r.odometer?.toKm === point.km);
src/app/vehicle.tsx
+ <ThemedText type="label">Odometer</ThemedText> … Log odometer · readings newest first · delete
+ const removePoint = (what, point, label, without) => … // "Odometer reading only" · "Delete both"
R6·5
The order of entry no longer changes the numbers
Applied
Each way of logging Tuesday ends the same: one 71.3 km ride without GPS between Thursday's reading and 14,083 km, the
tank at 4 L − 60.2 km ÷ 31 km/L + 2.17 L ≈ 4.2 L, and the next reading measured from 14,083 km. A ride logged “From odometer” on Rides is
now placed after the reading it is measured from, not at 06:00, which could fall before it and count the km again.
Order
Before
After
Log odometer, then the fill
No Log odometer; a past ride wanted From and To and dated the km today, and the fill at 14,083 km was refused
The ride is logged and dated from Thursday; the fill is accepted and finds nothing missing
The fill, then the odometer
The fill swallowed the gap: “0 km not yet logged”, and the 71.3 km never reached a ride
The fill form logs the 71.3 km ride; the reading then finds nothing missing
The fill only
The km counted for fuel but not as riding
The ride is logged, details later from Rides
The fill at the pump, mid-ride
The next reading found the ride's km after the pump again, and logged them as a second ride
The ride is split at the pump: its km after it count after it (R6·6)
R6·6
From the review: a fill mid-ride, a mistyped fill, and thousands of km
Applied
Checking the logic found four ways the always-logged gap ride could still go wrong. A fill at the pump mid-ride
(09:00–10:00, 60 km by GPS; at the pump at 09:30 the dash read 14,100): the whole ride counted before the fill, so the next reading
found its 30 km after the pump again and logged them as a second ride. A GPS ride is now split at a fill or reading by time. A mistyped
fill (140830) left the odometer there after deleting it, and every reading after was refused; deleting or correcting it now moves
the odometer back, as for a reading. Thousands of km no ride holds are refused as a typo instead of becoming a 1,26,818.3 km
ride (more than 3,000, the most a ride by hand may be); an odometer that really is that far on is set in Edit vehicle first. And a
reading with two decimals (14,083.45) now finds the ride logged from it when deleted.
Before · the next reading after a fill mid-ride
Log odometerRead it when you get on the bike
Odometer · km14130
Trip F · kmIf shown
Since 14,100 km (09:30): 30 km ridden = 30 km not in any ride.
30 km will be logged as a rideWithout GPS, from 14,100 km (09:30), so your rides add up to the odometer.
Save
After · the ride's 30 km after the pump are in it
Log odometerRead it when you get on the bike
Odometer · km14130
Trip F · kmIf shown
Since 14,100 km (09:30): 30 km ridden − 30 km in rides = 0 km not in any ride.
Save
Before · 140830 typed for 14083
Log odometerRead it when you get on the bike
Odometer · km140830
Trip F · kmIf shown
Since 14,011.7 km (1 Oct 18:00): 1,26,818.3 km ridden = 1,26,818.3 km not in any ride.
1,26,818.3 km will be logged as a rideWithout GPS, from 14,011.7 km (1 Oct 18:00), so your rides add up to the odometer.
Save
After · refused, with the reason
Log odometerRead it when you get on the bike
Odometer · km140830
Trip F · kmIf shown
That's 1,26,818.3 km since 14,011.7 km that no ride holds, more than 3,000. Check the odometer. If it's right, set it in Edit vehicle first.
Save
After · the same typo in the fuel form, on Save
Odometer · km140830
Read it off the dash, with the tenth. Last known: 14,011.7 km.That's 1,26,818.3 km since 14,011.7 km that no ride holds, more than 3,000. Check the odometer. If it's right, set it in Edit vehicle first.
After · a mistyped fill deleted: the odometer goes back
Delete this fuel fill?6 Oct · 1,40,830 km · 2.17 L · ₹300
CancelDelete
Royal EnfieldHunter 350
Year2022
Odometer14,011.7 km
src/lib/odometer.ts
+export function rideKmBetween(r, from, to?): number // a GPS ride split by time at a fill or reading logged during it
- … r.startedAt >= sinceAt && (at === undefined || r.startedAt < at) ? r.distanceKm : 0
+ … rideKmBetween(r, sinceAt, at)
+export const MAX_GAP_KM = 3000; export const gapProblem = (u: Untracked): string | null
+export const withoutFill = (v, fill) => settled(v, fill.km, …) // shared with withoutReading: odometer back
- const toKm = tenth(u.sinceKm + u.riddenKm);
+ const toKm = u.odoKm; // the reading as typed, 14083.45, so rideLoggedAt finds it
src/lib/vehicle-dashboard.ts ridesKmSince: rideKmBetween, so the tank counts a mid-ride fill's km after it
src/app/vehicle.tsx
+ () => withoutFill(v, fill) // delete
+ next.odometer = Math.max((fill ? withoutFill(vehicle, fill) : vehicle).odometer, odo!); // edit
+ if (tooMany) throw new Error(tooMany); // a fill "just now" is measured like a reading, from an odometer set by hand too
src/components/odometer-sheet.tsx + gapProblem: the reason in place of the working, nothing saved
Round 5 · proposed
R5·1
The speed breaker warning almost never came on a real ride
Proposed
Your note: the map shows the confirmed breakers, but riding past them, "Speed breaker ahead" didn't come. The
warning is wired to every real ride (not demos) and uses the same breakers the map draws; what kept it quiet were its thresholds.
It warned only at 25 km/h or more and only once the breaker was 8 s away, which is 60 m at 25–30 km/h. A rider eases off before a
breaker they know, so by 60 m out they were under 25 and it never fired; at a steady 18–22 km/h in traffic it never could; and with
city GPS jittering ±10 m, a heading from fixes 8 m apart could swing past the 35° "ahead" check, so the warning came late. The proposal warns
100 m out (10 s at speed, up to 200 m) from 15 km/h, with the heading from fixes 15 m apart. It then stays until the breaker is
passed, 30 s at most (for a rider who stops short of it): 10 s hid it 50 m early at 18 km/h. And like the toast, the banner is as
wide as its line and centred, wrapping to a second line, rather than the width of the screen. Pick an approach: both lanes ride it
fix by fix, one a second; "after" is lib/breaker-warning.ts itself, "before" its old rules.
Approach
Before · from 25 km/h, 8 s out (60–200 m), heading from 8 m, 10 s on show, full width
After · from 15 km/h, 100 m out (10 s at speed, to 200 m), heading from 15 m, until passed (30 s at most), centred
src/lib/breaker-warning.ts-export const WARN_KPH = 25;-export const WARN_SECONDS = 8, MIN_WARN_M = 60, MAX_WARN_M = 200;
+export const WARN_KPH = 15;
+export const WARN_SECONDS = 10, MIN_WARN_M = 100, MAX_WARN_M = 200;
…
-const HEADING_MIN_M = 8;
+const HEADING_MIN_M = 15;
-export const SHOW_MS = 10000;
+export const SHOW_MS = 30000; // until passed, this long at most
src/components/breaker-banner.tsx- banner: { flexDirection: 'row', … }, … style={{ color: theme.onTint, flex: 1 }}
+ banner: { alignSelf: 'center', maxWidth: 480, flexDirection: 'row', … }, … style={{ color: theme.onTint, flexShrink: 1 }}
test/breaker-warning.test.ts
+test('a rider easing off before a breaker is warned before they drop to a crawl', …); // fails on the old rules
+test('the warning stays until the breaker is passed, even slow, and 30 s at most', …);
Round 4 · worst case and large text · applied
From the stress switches in the Screens view: every screen and state run through worst-case data, Android's
font size at 1.3× and 2×, and a 320 dp phone, with a script flagging text that is cut off, clipped, overlapping or off the screen,
then each one looked at against the app's code. Every phone here is the canvas's own screen with the switches set as captioned;
"before" draws it as the app was. The canvas estimates text widths and grows every size alike (Android 14 and later grow large
text less), so each fix wants a look on a phone at the largest font size.
R4·1
The app's text had no ceiling: at 2× the big numbers crowded everything around them
Applied
No ThemedText set maxFontSizeMultiplier, so every text grew with Android's font size,
the 48 dp range and the 36 dp ride numbers included, while the cards, rings and icons around them stay in dp. At 2× the headline
numbers broke first: Home's range ran into the mileage corner, the Ride tab's total took two lines. Now only the display numerals,
which are large already, have a ceiling: hero, display and title at 1.3×,
metric and subtitle at 1.5×. Reading text keeps growing all the way, as DESIGN.md asks; a caller's own
maxFontSizeMultiplier still wins.
Before · Home at 2×
After
Before · Ride at 2×
After
src/components/themed-text.tsx
+/**
+ * How far a type grows with Android's font size. The display numerals are large already, and at 2× they crowd the
+ * cards and rings around them, which stay in dp; reading text grows all the way. A `maxFontSizeMultiplier` prop wins.
+ */
+const MAX_SCALE: Partial<Record<NonNullable<ThemedTextProps['type']>, number>> = { hero: 1.3, display: 1.3, title: 1.3, metric: 1.5, subtitle: 1.5 };
…
textBreakStrategy={HEADINGS.has(type) ? 'balanced' : 'highQuality'}
+ maxFontSizeMultiplier={MAX_SCALE[type]}
R4·2
Home: the mileage corner was cut off at normal size, and met the range at 2×
Applied
The corner was capped at 36 % of the card (44 % in landscape) and each of its lines was one line. On a bike that
isn't a Hunter, "Compare: set in Energy" was cut at 1×; at 1.3× both captions were ("Mileage · measu…"); at 2× the range ran into
the corner. Now the corner takes what the range box leaves (the card less its 24 dp inset, the measured range box with its 20 dp
margin and the card's padding, and a 12 dp gap), and its captions wrap to two lines instead of cutting. The fixed shares stay only
for the first frame, before the range box is measured.
Before · Himalayan at 1×
After
Before · Hunter at 1.3×
After
src/app/(tabs)/index.tsx
+ /**
+ * The mileage corner takes what the range box leaves: the card less its 24 dp inset, the range box with its
+ * 20 dp margin and the card's padding, and a 12 dp gap. A fixed share cut it off at large text, or ran into the range.
+ */
+ const mileageWidth = rangeBox.width ? Math.max(64, columnWidth - 24 - rangeBox.width - 20 - CARD_PADDING - 12) : undefined;
…
- … style={[styles.mileage, landscape && styles.mileageWide]}>
+ … style={[styles.mileage, mileageWidth ? { maxWidth: mileageWidth } : landscape && styles.mileageWide]}>
- <ThemedText type="caption" themeColor="textSecondary" numberOfLines={1}>Mileage · …</ThemedText>
+ <ThemedText type="caption" themeColor="textSecondary" numberOfLines={2}>Mileage · …</ThemedText>
(the same on the compare line)
R4·3
Home: a five-digit range printed without its separator
Applied
The range and the low-fuel distance were printed as raw numbers ("99740", "~99590 km"), where the rest of the app
groups them the Indian way. Five digits needs a 999.9 L tank at 99.9 km/L, which the fields accept; four needs only a big tank
(a 40 L tank puts the light 1,116 km away). Both now go through toLocaleString('en-IN'), with a test for the caption.
Before · worst case
After
src/app/(tabs)/index.tsx- <ThemedText type="hero" numberOfLines={1} …>{fuel.rangeKm}</ThemedText>
+ <ThemedText type="hero" numberOfLines={1} …>{fuel.rangeKm.toLocaleString('en-IN')}</ThemedText>
src/lib/vehicle-dashboard.ts- caption: … lowFuel ? `Range · light in ~${lowFuel.km} km` : 'Range',
+ caption: … lowFuel ? `Range · light in ~${lowFuel.km.toLocaleString('en-IN')} km` : 'Range',
test/vehicle-dashboard.test.ts
+ // A big tank puts the light over a thousand km away: grouped the Indian way, like every other distance.
+ assert.equal(bikeCardFuel(big, energyEstimate(big), fullTankRange(big))!.caption, 'Range · light in ~1,116 km');
R4·4
Ride tab: each ride's date, time and distance were cut off at 1.3×
Applied
A ride row's second line ("20 Sep, 05:12 · 1 h 42 min · 64 km") was one line, so at 1.3× it lost its distance, the
one number a list of rides is for; the Insights row's caption was cut even at 1×. Both take two lines now; at 1.3× the row's two
lines still fit beside its 72 dp thumbnail.
Before · 1×
After
Before · 1.3×
After
src/app/(tabs)/rides.tsx- <ThemedText type="caption" themeColor="textSecondary" numberOfLines={1}>Distance by week · ridden most · city riding</ThemedText>
+ <ThemedText type="caption" themeColor="textSecondary" numberOfLines={2}>Distance by week · ridden most · city riding</ThemedText>
…
- <ThemedText type="caption" themeColor="textSecondary" numberOfLines={1} style={styles.tabular}>{detail}</ThemedText>
+ <ThemedText type="caption" themeColor="textSecondary" numberOfLines={2} style={styles.tabular}>{detail}</ThemedText>
Riding: the glanceable panels cut what they said at large text
Applied
What's read at a glance while riding is sized for a glance: City Ride's top strip cut "25–50 km/h balanced" at
1.3× and crowded the compass at 2×, and its bottom card's "Distance" and "Riding time" ran together; on a Long Ride the time left
was cut at 2× ("~5 h 39 m…"), and so was the paused card's "Counts as a break". They are large already and read in a second, so
their text now grows to 1.3× at most: RideTextScale in theme.ts, on every text in CityGlanceTop,
CityGlanceBottom and RidePausedCard, the progress bars' labels and the guidance bar. The route summary sheet under the bars is
read, not glanced at, and keeps growing. City Ride isn't drawn from a screen module, so its links open it in the Screens view.
src/constants/theme.ts
+/**
+ * How far the ride overlays' text grows with Android's font size: they're read at a glance while riding and sized
+ * for it (the city strip and card, the guidance bar, the progress bars, the paused card).
+ */
+export const RideTextScale = 1.3;
src/components/city-dashboard.tsx · ride-paused-card.tsx · ride-overview.tsx · src/app/(tabs)/map.tsx- <ThemedText type="caption" style={…} numberOfLines={1}>{bar.label}</ThemedText>
+ <ThemedText type="caption" maxFontSizeMultiplier={RideTextScale} style={…} numberOfLines={1}>{bar.label}</ThemedText>
(every ThemedText in CityGlanceTop, CityGlanceBottom and RidePausedCard, and the guidance bar's two)
R4·7
Insights: month labels were cut at 1.3×, and at 2× they ran into the caption
Applied
Each label under the distance chart got a twelfth of the width, about 24 dp, so at 1.3× "Dec" became "De…"; the
week chart's month row was a fixed 16 dp high, so at 2× the month names sat on "Weeks of this month · km". Past eight bars only every
third is labelled, so each label now has three slots, centred on its bar; the chart's labels (axis, bars, months) are a scale and
stop growing at 1.3×, and their rows are as tall as that text. A route's "14 rides · 118 km · last 29 Sep 2026" and the slope
counts ("61 launches · 4.1 %") take two lines.
Before · by month at 1.3×
After
Before · by week at 2×
After
src/components/ride-insights.tsx
+/** The chart's labels are a scale, not reading text: they grow with the font size up to 1.3×. */
+const LABEL_SCALE = 1.3;
…
+ const labelHeight = Math.ceil(16 * Math.min(fontScale, LABEL_SCALE));
+ const span = n <= 8 ? 1 : 3; // with every third labelled, a label can have three slots, centred on its bar
…
- <View style={{ flexDirection: 'row', paddingLeft: LEFT }}> … width: `${100 / n}%` …
+ <View style={{ height: labelHeight, marginLeft: LEFT }}> … position: 'absolute', left: `${(i - (span - 1) / 2) / n * 100}%`, width: `${span / n * 100}%` …
- {chart.unit === 'week' ? <View style={{ height: 16, marginLeft: LEFT }}>
+ {chart.unit === 'week' ? <View style={{ height: labelHeight, marginLeft: LEFT }}>
(and maxFontSizeMultiplier={LABEL_SCALE} on the axis, bar and month labels; the route detail numberOfLines={2})
src/components/slope-card.tsx- <ThemedText type="caption" themeColor="textSecondary" numberOfLines={1} style={styles.tabular}>{detail}</ThemedText>
+ <ThemedText type="caption" themeColor="textSecondary" numberOfLines={2} style={styles.tabular}>{detail}</ThemedText>
R4·8
Page titles were cut: "Vehicle i…" at 2×, the trip's name at 1.3×
Applied
PageHeader's title and subtitle were one line each beside a 48 dp Back button (and, on Vehicle info,
the Edit button), so at 2× "Vehicle info" and "Prices, pumps and spend" were cut, and at 1.3× so was Widgets' subtitle; the Trip
page's own header cut the trip's name ("Guntur → Bang…") at 1.3×. They take two lines each now, which keeps the headers' height at 1×.
Ride page: "Riding time" and the slope counts were cut at large text
Applied
The figures over the relief (Distance, Riding time, Climb, Steepest) were one line each, so "Riding time" was cut
at 1.3×; in the slope card the counts were cut at 2×. A label of two or more words takes two lines now; a one-word label stays one
line, because Android splits a word that doesn't fit ("Steep / est", DESIGN.md §3). The slope counts take two lines (R4·7's
change to SlopeCard, which both pages use).
Trip: at its limits the break schedule drew 1,199 rows
Applied
Ride settings accepts 3,000 km at 10 km/h with a 120 min break every 15 min, each within its range, and the plan
is 2,698 hours with 1,199 breaks, every one of them a row (thousands of views in one ScrollView). The schedule now shows the first
20 and "Show all 1,199 breaks", and the count is grouped. The times already say the day after midnight ("5:30 AM (+12d)", from
plannedClock); the canvas had left that out, and draws it now. Whether settings like these should be allowed
together is a separate question.
Before · worst case, the schedule's end
After
src/app/plan.tsx
+/** Breaks shown before “Show all”. */
+const SCHEDULE_PREVIEW = 20;
…
+ /** A plan at its limits can have a thousand breaks: the first 20, then the rest on request. */
+ const [allBreaks, setAllBreaks] = useState(false);
…
- {schedule.stops.map((stop, index) => …)}
+ {(allBreaks ? schedule.stops : schedule.stops.slice(0, SCHEDULE_PREVIEW)).map((stop, index) => …)}
+ {!allBreaks && schedule.stops.length > SCHEDULE_PREVIEW ? <Button label={`Show all ${schedule.stops.length.toLocaleString('en-IN')} breaks`} variant="secondary" onPress={() => setAllBreaks(true)} /> : null}
R4·11
Fuel: at 2× the price axis ran into the dates
Applied
The price chart's axis labels ("₹100") sit in a 48 dp gutter and its date labels in a row under the plot; at 2× they
grew into each other. Like Insights' axis (R4·7), they're a scale, not reading text, and stop growing at 1.3×.
Before · 2×
After
src/components/fuel-price-chart.tsx
+ {/* The axis and dates are a scale, not reading text: they grow with the font size up to 1.3×. */}
- {width > 0 ? grid.map(t => <ThemedText key={t} type="caption" themeColor="textSecondary"
+ {width > 0 ? grid.map(t => <ThemedText key={t} type="caption" themeColor="textSecondary" maxFontSizeMultiplier={1.3}
(and on the two date labels)
R4·C
Canvas: three places now wrap and stop as the app's do
Applied
Three of the audit's finds were the canvas, not the app. A long road name pushed the Long Ride guidance bar into
the time left and the speed widget; the app caps its title and text at two lines each (map.tsx 591–592), and with
the same cap they no longer meet, even at 2× on a 320 dp phone. Add fuel fill's "When did you fill up?" chips were cut at 2×; the
app's wrap (vehicle.tsx 286 has no numberOfLines), and now the canvas's do too. The Trip schedule's
times after midnight left out plannedClock's "(+Nd)". The canvas still doesn't do adjustsFontSizeToFit
(R4·5); it draws a maxFontSizeMultiplier as a capped --fs.
Round 3 · R3·1 applied
R3·1
Landscape Home: the right column ends level with the bike card
Applied
Your note on the landscape Home. The bike card is 368 dp tall; the Energy and Vehicle health tiles (158) and the
Documents row (72) stopped 122 dp above its bottom edge, so the two columns never lined up. Now the two tiles grow until
Documents ends exactly on the bike card's bottom edge (measured with onLayout), and each tile's number and caption
sit at its bottom, so the extra height reads as a widget rather than empty space. The usual-trip card carries on under the bike
card and Recent rides under Documents. Landscape only; where the bike card is shorter than the tiles and Documents, nothing stretches. Worth knowing: sideways the screen shows 360 dp and the bike card
alone is 368, so the two columns meet just below the fold; the middle pair is scrolled to that point. Every phone here is the
canvas's own Home screen.
Before · typical
After · Documents on the bike card's bottom edge
Before · scrolled to where the columns end
After · scrolled: Documents and the bike card end together
Before · low-fuel light on
After
src/app/(tabs)/index.tsx
+ /** Landscape: the bike card's height, so the tiles grow until Documents ends on its bottom edge. */
+ const [bikeHeight, setBikeHeight] = useState(0);
…
- <View style={[styles.vehicle, …]}>
+ <View onLayout={landscape ? e => { const h = e.nativeEvent.layout.height; setBikeHeight(b => b === h ? b : h); } : undefined}
+ style={[styles.vehicle, …]}>
…
<View style={[styles.details, { width: columnWidth }]}>
+ <View style={[styles.details, landscape && bikeHeight ? { minHeight: bikeHeight } : null]}>
- <View style={styles.tiles}>
+ <View style={[styles.tiles, landscape && { flex: 1 }]}>
…
- <ThemedText type="metric">{energy ? …}</ThemedText>
+ <ThemedText type="metric" style={landscape && styles.pinned}>{energy ? …}</ThemedText>
… (the same on Vehicle health's metric)
<Pressable … Documents … />
+ </View>
{!landscape && usualCard}
+ pinned: { marginTop: 'auto' },
R3·2
Or: a taller Documents card with the four documents, and Recent rides two by two
Not taken · R3·1 applied instead
Your alternative to R3·1. The tiles stay as they are; Documents grows to end on the bike card's bottom
edge, and the room shows the four documents as a 2×2 — Driving licence, Registration (RC), Insurance, Pollution (PUC) — each with
its icon and whether it's added, from the data Home already loads, each opening Documents. Recent rides go two by
two: half the scrolling, but each card is about 150 dp wide instead of 320, so its route relief is smaller. Landscape only; portrait
is unchanged. As with R3·1, the columns meet just below the fold (the screen shows 360 dp; the bike card is 368).
Map: Fit route in landscape squeezes the route into a 110 dp strip, running under the dock and the buttons
Applied
Fit route (and building a route) pads the camera by a fixed { top: 110, bottom: 140, left: 30, right: 30 }, sized for
portrait. On a 756 × 360 landscape map that leaves 360 − 250 = 110 dp of height for the whole route, while the sides still let it run under the
dock on the left (it ends at 68) and the compass and map buttons on the right (from 61 in). The fix pads by what is on screen: in landscape the
measured panels top and bottom, the dock's side and the button column, which gives the route 603 × 234 dp, twice the
height; in portrait the compass on top and the Long Ride and City Ride buttons above the dock, which the fixed 140 ran under by about 36 dp.
Before · 756 × 360, fitted into 696 × 110After · 603 × 234, clear of the dock, the column and the ride buttons
src/app/(tabs)/map.tsx
+ /**
+ * Where Fit route keeps the route: clear of what stands over the map. Landscape: the measured top and bottom panels,
+ * the dock on the left and the button column on the right. Portrait: the compass on top, the ride buttons above the dock.
+ */
+ const fitPadding = landscape
+ ? { top: panels.top + 12, bottom: panels.bottom, left: insets.left + dock.side + 12, right: insets.right + COMPASS_SIZE + 24 }
+ : { top: insets.top + 6 + COMPASS_SIZE + 12, bottom: dock.clearance + 8 + 52 + 12, left: 30, right: 30 };
const fit = () => {
…
camera.current?.fitBounds(routeBounds(route.coordinates),
- { padding: { top: 110, bottom: 140, left: 30, right: 30 }, duration: 600 });
+ { padding: fitPadding, duration: 600 });
…
if (!auto || session.status === 'idle') camera.current?.fitBounds(routeBounds(result.coordinates),
- { padding: { top: 110, bottom: 140, left: 30, right: 30 }, duration: 600 });
+ { padding: fitPadding, duration: 600 });
R2·5
Lite: in landscape the two 260 dp dials overflow their 248 dp row by 12 dp
Applied
dialSize keeps CHROME = 96 dp of height round the dials, but the ride screen spends 112 in landscape:
32 top padding (the 24 dp status bar + 8), 8 bottom, the 20 dp “City Ride” strip and the 52 dp Pause and End buttons. On a 360 dp tall phone
the dials come out 260 in a 248 dp row, so they spill 6 dp into the strip and 6 dp into the buttons. The fix takes the system bars off the
height first and counts only Lite's own parts in CHROME (8 + 8 + 20 + 52 = 88), so the dials are 248 and fit whatever the phone's
insets are. Portrait stacks two dials but sizes them as one, which fits a 360 × 800 phone and not one under about 690 dp tall (left as is).
Before · 756 × 360, 260 dp dials in a 248 dp rowAfter · 248 dp dials, the row exactly
src/lib/lite.ts-/** Room kept around the dials for the status strip and the screen edges. */-const CHROME = 96, GAP = 40, MAX_DIAL = 260;
+/** Height the ride screen keeps round the dials, inside the system bars: 8 + 8 padding, the 20 dp strip, the 52 dp controls. */
+const CHROME = 8 + 8 + 20 + 52, GAP = 40, MAX_DIAL = 260;
src/components/lite-ride.tsx- const across = dialsFitAcross(width, height);- const size = dialSize(width, height, across ? 2 : 1);
+ // The status and navigation bars come off first; CHROME is only Lite's own padding, strip and controls.
+ const room = height - insets.top - insets.bottom;
+ const across = dialsFitAcross(width, room);
+ const size = dialSize(width, room, across ? 2 : 1);
test/lite.test.ts
assert.equal(dialSize(720, 360), 260, 'height caps it, not width');
+ // Less its 24 dp status bar, the dials fill the 248 dp row between the strip and the controls.
+ assert.equal(dialSize(720, 336), 248);
R2·6
Vehicle: every bike but the Hunter reads “low-fuel warning on”
Applied
Once a bike has a fuel estimate, the Fuel & mileage line ends “· low-fuel warning on” whenever lowFuelInKm is null.
energyEstimate sets it only for the Hunter (the one bike whose light level, 4 L, is known), so any other bike on a full tank reads as if its light were on.
The fix says nothing about the warning unless the bike is a Hunter, as the Home bike card already does.
Before · not a Hunter, full tank
Fuel & mileageRange to empty ~285 km · ~8.2 L · low-fuel warning on.
Vehicle: the next service shows a raw date, and an empty part with no km
Applied
The Service history line prints the stored date as is, “2027-03-12”. With only a date set it reads “Next service · · 2027-03-12”, with an empty km part between two dots.
The fix formats the date with the screen's own dateLabel (“12 Mar 2027”, as the fill and service rows show it), adds “by” as the Home health tile does, and leaves out the parts that aren't set.
Before · date only, then km and date
Service historyNext service · · 2027-03-12Next service · 15,000 km · 2027-03-12
After · date only, then km and date
Service historyNext service · by 12 Mar 2027Next service · 15,000 km · by 12 Mar 2027
Profile: an online phone renewing its sign-in says “Offline”
Applied
Account & sync shows the Offline line for online === falseor status reconnecting. But reconnecting also means an online phone
whose sign-in token is waiting to refresh, so a rider on good signal reads “Offline · 2 changes upload when you're back online”. The fix keeps Offline for
online === false only and gives reconnecting its own line in the same “state · detail” voice; it recovers by itself, so it asks nothing of the rider.
Before · online, sign-in renewing
Account & syncOffline · 2 changes upload when you're back online · last synced 9:41 am
After · online, sign-in renewing
Account & syncSigning in again · 2 changes waiting to upload · last synced 9:41 amWith nothing waiting: Signing in again · sync resumes by itself · last synced 9:41 am
src/app/profile.tsx- : account.online === false || account.status === 'reconnecting' ? `Offline · ${account.pending ? … : 'syncs'} when you're back online${synced ? ` · last synced ${synced}` : ''}`
+ : account.online === false ? `Offline · ${account.pending ? … : 'syncs'} when you're back online${synced ? ` · last synced ${synced}` : ''}`
+ : account.status === 'reconnecting' ? `Signing in again · ${account.pending ? `${account.pending} ${account.pending === 1 ? 'change' : 'changes'} waiting to upload` : 'sync resumes by itself'}${synced ? ` · last synced ${synced}` : ''}`
: account.error ? `Sync problem: ${account.error} · trying again shortly` : …
R2·9
Documents: “puc” and “rc” lose their capitals mid-sentence
Applied
The add sheet, its toast and the remove alert put the document's title in a sentence with title.toLowerCase(), which also lowercases the abbreviations:
“Add to pollution (puc)”, “Added to pollution (puc)”, “From registration (rc), on this phone and in your backup.” The fix adds docName beside
DOC_LABEL, which lowercases only the first letter, so they read “pollution (PUC)” and “registration (RC)”.
Before · add sheet and toast
Add to pollution (puc)A photo of the card, or the PDF
Added to pollution (puc)
After · add sheet and toast
Add to pollution (PUC)A photo of the card, or the PDF
Added to pollution (PUC)
src/lib/documents.ts
export const DOC_LABEL: Record<DocKind, { title: string; hint: string }> = { … };
+/** The title inside a sentence, keeping abbreviations: "pollution (PUC)", "registration (RC)". */
+export const docName = (kind: DocKind) => DOC_LABEL[kind].title[0].toLowerCase() + DOC_LABEL[kind].title.slice(1);
src/app/documents.tsx- toast.show(`Added to ${DOC_LABEL[kind].title.toLowerCase()}`, 'success');
+ toast.show(`Added to ${docName(kind)}`, 'success');
…
- … `From ${DOC_LABEL[kind].title.toLowerCase()}, on this phone and in your backup.` …
+ … `From ${docName(kind)}, on this phone and in your backup.` …
…
- … title={adding ? `Add to ${DOC_LABEL[adding].title.toLowerCase()}` : ''} …
+ … title={adding ? `Add to ${docName(adding)}` : ''} …
R2·10
Trip: the elevation card shows fetch's raw error
Applied
When the elevation fetch fails, useRouteElevation keeps the error's own message, so offline the Trip card reads “Network request failed” above Retry elevation.
DESIGN.md says to pass failures through userMessage(error, fallback), as Map, Documents and the ride review do: a lost connection becomes a plain sentence,
the app's own sentences (“Elevation is not available for this route.”, “The map service timed out. Check your connection and retry.”) pass through, and anything raw gets the fallback.
Before · offline
Network request failedRetry elevation
After · offline
No internet connection. Check it and try again.Retry elevation
src/hooks/use-route-elevation.ts
import { useTrip } from '@/lib/trip-store';
+import { userMessage } from '@/lib/toast';
…
- .catch(e => { if (active) setSettled({ key, error: e instanceof Error ? e.message : 'Elevation unavailable.' }); });
+ .catch(e => { if (active) setSettled({ key, error: userMessage(e, 'Could not load the elevation profile. Try again.') }); });
R2·11
Ride page: a demo ride's caption names the place “City”
Applied
The caption under “Demo City Ride” reads “City ride · City · 29 Sep 2026 at 18:40”. A city ride is saved with the
placeholder origin 'City', and only a non-demo ride on the Map gets it swapped for the area's name, so demos, every
Lite ride and any ride whose area couldn't be found keep it. The fix runs the origin through the named check the ride list
already uses (NO_NAME in lib/ride-path.ts), so a placeholder is dropped and a real area stays.
Before
Demo City RideCity ride · City · 29 Sep 2026 at 18:40
Ride page: the delete dialog names the ride differently from the heading
Applied
The heading says “Morning Ride”, but Delete ride asks about “Morning ride · 20 Sep 2026 at 05:12”. The heading
capitalises the trailing “ride” from rideTitle, and the dialog uses rideTitle as it is. The fix works
the heading's name out once and uses it in both places, so the dialog says “Morning Ride” too (hand-logged and demo rides already
matched).
Before
Delete this ride?Morning ride · 20 Sep 2026 at 05:12
CancelDelete
After
Delete this ride?Morning Ride · 20 Sep 2026 at 05:12
CancelDelete
src/app/ride/[id].tsx
const toast = useToast();
+ /** The short name, "Morning Ride" as on Home; the heading and the delete dialog both use it. */
+ const title = ride ? ride.manual ? `${ride.origin} → ${ride.destination}` : rideTitle(ride).replace(/ ride$/, ' Ride') : 'Ride';
- const remove = () => ride && Alert.alert('Delete this ride?', `${rideTitle(ride)} · ${rideStartLabel(ride.startedAt)}`, [
+ const remove = () => ride && Alert.alert('Delete this ride?', `${title} · ${rideStartLabel(ride.startedAt)}`, [
…
- <ThemedText type="screenTitle" accessibilityRole="header" numberOfLines={1}>{ride ? ride.manual ? `${ride.origin} → ${ride.destination}` : rideTitle(ride).replace(/ ride$/, ' Ride') : 'Ride'}</ThemedText>
+ <ThemedText type="screenTitle" accessibilityRole="header" numberOfLines={1}>{title}</ThemedText>
R2·13
Fuel: an unchanged price still shows the falling-price icon
Applied
When the last two fills cost the same a litre, the line says “Same as the fill before” but keeps the
trend-down arrow, because the icon only checks change > 0 and a change of 0 falls to “down”. Neither
the app's Icon nor the canvas has a neutral “flat” glyph, so the fix drops the icon for an unchanged price and keeps
the arrows for a real move. The “same” test is worked out once and used for both the icon and the words.
Before
Last price
₹103.09per litre · Indian Oil - Sri Sai Service Station · 27 Sept 2026
Same as the fill before
After
Last price
₹103.09per litre · Indian Oil - Sri Sai Service Station · 27 Sept 2026
Same as the fill before
₹0.27 more a litre than the fill before
src/app/fuel.tsx
const summary = useMemo(() => priceSummary(fills), [fills]);
+ /** The price didn't move from the fill before: no up or down arrow then. */
+ const samePrice = summary?.change != null && Math.abs(summary.change) < 0.005;
…
{summary.change !== null ? <View style={styles.row}>
- <Icon name={summary.change > 0 ? 'trend-up' : 'trend-down'} size={16} color={theme.textSecondary} />- <ThemedText … >{Math.abs(summary.change) < 0.005 ? 'Same as the fill before' : `₹${…`}</ThemedText>
+ {samePrice ? null : <Icon name={summary.change > 0 ? 'trend-up' : 'trend-down'} size={16} color={theme.textSecondary} />}
+ <ThemedText … >{samePrice ? 'Same as the fill before' : `₹${…`}</ThemedText>
</View> : null}
R2·14
Fuel: without an engine size, the traffic card asks you to ride forever
Applied
When the model name has no engine size (“Classic”, say), trafficFuelOverRides returns null however many
rides there are, so the card keeps saying “Rides record the time they spend in traffic. Ride to see the fuel and money it costs.”
Riding more never changes it. DESIGN.md says the idle-fuel figure is “Hidden when the model name has no engine size”, as the ride page
and Insights already do, so the fix hides the whole card then. With an engine size the line still shows until a ride records traffic,
which is when it's true.
Before
Where you filled
None of your fills has a place yet. Add the next fill at the pump and it keeps where you filled and finds the station.
Fuel idling in traffic
Rides record the time they spend in traffic. Ride to see the fuel and money it costs.
Fills
After
Where you filled
None of your fills has a place yet. Add the next fill at the pump and it keeps where you filled and finds the station.
Fills
src/app/fuel.tsx-import { formatFuel, formatRupees, trafficFuelOverRides, type TrafficFuel } from '@/lib/traffic-fuel';
+import { formatFuel, formatRupees, idleLitresPerHour, trafficFuelOverRides, type TrafficFuel } from '@/lib/traffic-fuel';
…
+ {/* No engine size in the model name, no idle burn: the card is hidden, as on a ride's page and Insights. */}
- {traffic === null && !ridesError ? null : <View style={card}>
+ {idleLitresPerHour(vehicle) === null || (traffic === null && !ridesError) ? null : <View style={card}>
<Heading icon="traffic" label="Fuel idling in traffic" />
R2·15
Insights: the tallest distance bar can run off the top of the chart
Applied
The chart scales every bar to its top gridline (top = grid[grid.length - 1]), but ticks() stops
once a line would pass the tallest week by more than half a step. For a 46 km week it draws lines at 20 and 40, so the bar is scaled
to 46/40 of the chart and its top 7.5 dp is clipped; 120 km (lines at 50 and 100) does the same. The fix keeps adding lines until one
reaches the tallest bar: 20, 40, 60 here. It's still at most three lines, and a chart whose top line already lands on or above the
tallest bar (40 km, 74 km, 100 km) doesn't change.
Before
Distance by week
2040
101724317142128
AugSep
Last 8 weeks · km
After
Distance by week
204060
101724317142128
AugSep
Last 8 weeks · km
src/components/ride-insights.tsx-/** Round gridline step (1, 2, 2.5 or 5 × 10ⁿ) for two or three lines above zero. */
+/** Round gridline step (1, 2, 2.5 or 5 × 10ⁿ) for two or three lines above zero, the top one at or above `high`. */
function ticks(high: number): number[] {
…
- for (let t = step; t <= high + step / 2 && out.length < 3; t += step) out.push(t);
+ for (let t = step; t - step < high && out.length < 3; t += step) out.push(t);
return out;
}
docs/component-canvas.html the canvas's copy of ticks() (Insights) takes the same one-line change
R2·16
Trip: “Loading trip…” sits under the status bar
Applied
Until the trip has loaded, the Trip screen draws a bare <ThemedText>Loading trip…</ThemedText> with no
padding. The app draws edge to edge, so the text lands at the very top-left corner, behind the clock and battery. The fix gives it the
same padding as the loaded page's content: the top safe-area inset + 12, and 16 plus the side insets (DESIGN.md §4).
Before
Loading trip…
After
Loading trip…
src/app/plan.tsx
export default function PlanScreen() {
const { trip, hydrated, setRidePlan } = useTrip();
- if (!hydrated) return <ThemedText>Loading trip…</ThemedText>;
+ const insets = useSafeAreaInsets();
+ // Padded like the page's content, so it clears the status bar.
+ if (!hydrated) return <ThemedText style={{ paddingTop: insets.top + 12, paddingLeft: insets.left + Spacing.three, paddingRight: insets.right + Spacing.three }}>Loading trip…</ThemedText>;
return <PlanEditor initial={trip.ridePlan ?? DEFAULT_RIDE_PLAN} save={setRidePlan} />;
}
R2·17
Trip: a whole-hour time stays “10 h” beside “11h 40m”
Applied
The route card shortens formatDuration's “2 h 10 min” to “2h 10m” with .replace(/ h /g, 'h '), which needs a space after the h.
A whole hour comes out as “10 h” with nothing after it, so it stays spaced next to “11h 40m”. Matching the h at a word end (/ h\b/, and / min\b/)
shortens both forms; distances (“612 km”, “800 m”) still don't match.
DESIGN.md §3 says to use only ThemedText types, with no custom sizes or weights in screens. Two places set their own:
the model name on Vehicle info (28/34, medium) and the checklist count in Before you ride (22/28, regular weight, coloured
positive). The nearest types are subtitle (24/30), “big words inside cards”, for the model name, and
metric (20/26, medium, tabular digits), the stat-value type, for the count. Each gets 4 dp smaller and the count turns medium,
like other numbers in cards. Neither needs a new type.
Before
Royal EnfieldHunter 350
28 / 34 · medium · custom
Before you ride7/10
22 / 28 · regular · custom
After
Royal EnfieldHunter 350
subtitle · 24 / 30
Before you ride7/10
metric · 20 / 26 · medium · tabular
src/app/vehicle.tsx- <ThemedText style={{ fontSize: 28, lineHeight: 34, fontWeight: '500' }}>{v.model}</ThemedText>
+ <ThemedText type="subtitle">{v.model}</ThemedText>
src/components/ride-preparation.tsx- <ThemedText style={{ fontSize: 22, lineHeight: 28, color: theme.positive, fontVariant: ['tabular-nums'] }}>{checked.length}/{PRE_RIDE_CHECKS.length}</ThemedText>…
+ <ThemedText type="metric" themeColor="positive">{checked.length}/{PRE_RIDE_CHECKS.length}</ThemedText>…
docs/component-canvas.html the Vehicle bike card (.vehicle-model) and the Before you ride specimens take the same types
R2·D1
Map (landscape): the toast clears My location on a 756 dp map; only a narrower phone gets it covered
Guard applied
Now that toasts are as wide as their message and centred between the dock (left 84) and right 16, a 756 × 360 map keeps
them off the column: “Ride saved · 12.4 km in 38 min” is about 290 wide and ends near x 555, and even a long one at the 480 cap ends at 652,
43 dp short of My location at 695. On the Nokia 3.1's 676 dp frame the long one still clears, by 3 dp. Only a frame under about 670 dp (a
360 × 640 phone gives 596) lets a long toast sit on My location and Route & stops for its 6 s; if that is worth guarding, a
right anchor of the column's width (49 + 12), mirroring the dock's left, keeps it 16 dp clear.
Only on a 596 × 360 map · a long toast on My locationOptional · a right anchor, 16 clear of the column
src/components/toast.tsx (optional)
-/** Where the toast sits: its bottom edge above the screen's bottom, and on the left clear of a vertical dock. */-type Anchor = { bottom: number; left?: number };
+/** Where the toast sits: its bottom edge above the screen's bottom, on the left clear of a vertical dock, on the right of a button column. */
+type Anchor = { bottom: number; left?: number; right?: number };
…
- const bottom = anchor?.bottom, left = anchor?.left;
+ const bottom = anchor?.bottom, left = anchor?.left, right = anchor?.right;
useEffect(() => {
if (bottom === undefined) return;
- set(key, { bottom, left });
+ set(key, { bottom, left, right });
return () => set(key, null);
- }, [set, key, bottom, left]);
+ }, [set, key, bottom, left, right]);
…
- if (previous[key]?.bottom === anchor?.bottom && previous[key]?.left === anchor?.left) return previous;
+ if (previous[key]?.bottom === anchor?.bottom && previous[key]?.left === anchor?.left && previous[key]?.right === anchor?.right) return previous;
…
- style={[styles.host, { bottom: anchor.bottom, left: insets.left + Spacing.three + (anchor.left ?? 0), right: insets.right + Spacing.three,
+ style={[styles.host, { bottom: anchor.bottom, left: insets.left + Spacing.three + (anchor.left ?? 0), right: insets.right + Spacing.three + (anchor.right ?? 0),
src/app/(tabs)/map.tsx- useToastAnchor('screen', mapInFront && panels.bottom > 0 ? { bottom: panels.bottom + 8, ...(landscape && !riding ? { left: dock.side } : {}) } : null);
+ useToastAnchor('screen', mapInFront && panels.bottom > 0 ? { bottom: panels.bottom + 8, ...(landscape && !riding ? { left: dock.side, right: COMPASS_SIZE + 12 } : {}) } : null);
Round 1 · applied
1
Demo ride title reads “Demo city Ride”
Applied
The ride page title-cases a trailing “ride” for its heading (Morning ride → Morning Ride), which also turns the
demo's name into “Demo city Ride”. The ride list shows “Demo city ride”, so the two disagree. The fix names the demo
Demo City Ride, like the City Ride button, in rideTitle: the heading and the list then match, and the
replace no longer touches it.
Before · ride page
Demo city RideCity ride · City · 30 Sep 2026 at 09:30
After · ride page and list
Demo City RideCity ride · City · 30 Sep 2026 at 09:30
src/lib/ride-path.ts- if (ride.demo) return 'Demo city ride';
+ if (ride.demo) return 'Demo City Ride';
test/ride-path.test.ts the demo list title expects 'Demo City Ride'
2
“Reroute from here” offered during a city ride
Applied
With a Long Ride trip built, browsing the map on a city ride and opening Route & stops offers a reroute to
that trip's destination. A city ride has no route to rejoin. The Live traffic block right under it already checks
!cityRide; the reroute button doesn't.
The demo runs on its own simulated clock, which only moves while riding, so a paused demo never counts its break. The fix
gives the demo a separate simulated break clock that runs at the same 12× while paused (not once the script has finished):
the break counts up, riding time stays still, and the break is saved with the demo ride. Both pills below run live, paused 4 min
into the demo.
Before · paused demo
After · the break counts at 12×
src/hooks/use-ride-session.ts- type CityDemo = { base: number; simMs: number; km: number; … };
+ type CityDemo = { base: number; simMs: number; breakMs: number; km: number; … };
+ /** The demo's "now": riding time plus the breaks taken, both simulated. */
+ const demoNow = (d: CityDemo, base: number) => base + d.simMs + d.breakMs;
cityClock, pause, the demo's samples and path, end (endedAt) and cityNow read demoNow
+ // Paused demo: the break runs at the demo's speed (not once the script has finished).
+ useEffect(() => { if (ride.status !== 'paused' || !demoRef.current || finished) return;
+ const timer = setInterval(() => { demoRef.current!.breakMs += CITY_DEMO_SPEEDUP * 250; setCityDemo({ ...demoRef.current! }); }, 250); … }
4
Log a past ride: an odometer typed with a comma is refused
Applied
“20,412” is read with Number(), which gives NaN, and the sheet says the reading is below the last one. Fuel fills
and Vehicle already read the dash with wholeKm, which takes commas and drops a tenth.
Before
Odometer now · km20,412
The odometer can't be below your last reading, 20,000 km.
After
Odometer now · km20,412
Since 20,000 km on Sat, 26 Sep: 412 km ridden − 380 km already logged = 32 km not yet logged.
Log a past ride: “75” minutes saves the ride with no riding time
Applied
hoursFrom turns anything it can't read (minutes of 60 or more, a fraction, a letter) into “no time”, so the ride
is saved without a riding time and without a word. The fix tells the rider instead.
Before · saved, time lost
Time · h1
min75
Ride logged · 32 km
After · says what's wrong
Time · h1
min75
Enter whole hours and 0–59 minutes, or leave the time empty.
src/lib/date-wheel.ts-/** … '' when it isn't a time */ export function hoursFrom(h: string, min: string): string {
+/** Decimal hours, '' when both are empty, null when they aren't a time. */ export function hoursFrom(h: string, min: string): string | null {
- if (!Number.isFinite(hours) || … ) return '';
+ if (!Number.isFinite(hours) || … ) return null;
src/components/past-ride-sheet.tsx
+ const hours = hoursFrom(h, min);
+ if (hours === null) throw new Error('Enter whole hours and 0–59 minutes, or leave the time empty.');
test/date-wheel.test.ts 60 minutes, 1.5 hours, −1 and “x” expect null; empty stays ''
6
The two trip forms word the same errors differently
Applied
Ride settings (the Trip page) and New trip (the trip list) check the same things and say them three different ways. The fix
uses one wording for each, and writes the limits with a thousands separator.
Form · case
Before
After
Ride settings · no start or destination
Enter a start and destination.
Choose a start and destination.
New trip · no start or destination
Choose a start and destination.
Choose a start and destination.
Ride settings · distance
Distance estimate (km): enter a number from 1 to 3000.
Distance estimate (km): enter a number from 1 to 3,000.
New trip · distance
Enter an estimated distance from 1–3,000 km.
Distance estimate (km): enter a number from 1 to 3,000.
Departure sheet · time
Use 24-hour time, for example 05:00 or 16:30.
Use 24-hour time, for example 05:00 or 16:30.
New trip · time
Use 24-hour departure time, for example 04:30.
Use 24-hour time, for example 05:00 or 16:30.
src/app/plan.tsx- setError('Enter a start and destination.'); return;
+ setError('Choose a start and destination.'); return;
- setError(`${label}: enter a number from ${min} to ${max}.`); return;
+ setError(`${label}: enter a number from ${min.toLocaleString('en-IN')} to ${max.toLocaleString('en-IN')}.`); return;
src/components/ride-library-sheet.tsx- setError('Enter an estimated distance from 1–3,000 km.')
+ setError('Distance estimate (km): enter a number from 1 to 3,000.')
- setError('Use 24-hour departure time, for example 04:30.')
+ setError('Use 24-hour time, for example 05:00 or 16:30.')
7
The usual-trip card can sit on “Checking live traffic…”
Applied
Until the phone reports whether it's online (online is null), Home sends no request but already shows
loading. If that answer is slow or never comes, the card waits for good. The fix asks unless the phone is known to be
offline; a request that fails offline already shows “Couldn't check live traffic just now.”
Before · online not known yet
Home → Office
You usually leave around 09:10 · 12 ridesChecking live traffic…
After · asks, then answers
Home → Office
You usually leave around 09:10 · 12 ridesLive traffic, or “Couldn't check live traffic just now.”
Search nearby says “near the map centre” with a break selected
Applied
With a planned break selected, the sheet's body searches near that break (“Near break 3 · 5 km radius”), but its subtitle still
says the map centre.
Before · break 3 selected
Search nearbyFuel, food, breaks and places near the map centre
Near break 3 · 5 km radius
After
Search nearbyFuel, food, breaks and places near break 3
Near break 3 · 5 km radius
src/app/(tabs)/map.tsx- <Sheet … title="Search nearby" subtitle="Fuel, food, breaks and places near the map centre">
+ <Sheet … title="Search nearby" subtitle={`Fuel, food, breaks and places near ${selected ? `break ${target! + 1}` : 'the map centre'}`}>
9
Small code-only fixes
Applied
“Stopped for 2 min” comes from ASK_AFTER_MS (lib/ride-wait.ts) instead of being typed in map.tsx, so the two can't drift.
Landscape Home reserves 16 dp between its two columns, the gap it actually has, not 20 (app/(tabs)/index.tsx:58): each column gets 2 dp back.
Stale comments corrected: the “+ button” and pump time in app/(tabs)/index.tsx:169–170, “Fuelled here” on pendingFill (lib/vehicle.ts:25, now only older builds' data), and “Home tiles” on WIDGETS (lib/device-sensors.ts, now the Widgets page).
10
A short toast still spans the whole screen
Applied
Your note: the toast is too long. Every toast is as wide as the screen allows (16 dp from each edge, up to 480), so
“Ride logged · 32 km” sits in a bar far wider than its words. The proposal sizes the toast to its message, centred above what it
sits over, and lets a long message still wrap at the same width as today. Placement, timing and the close button stay as
they are. Shown on a 360 dp screen.
Before · full width
Ride logged · 32 km
After · as wide as the message
Ride logged · 32 km
Before · a long message
No internet. Your route builds by itself when you're back online.
After · wraps at the same width
No internet. Your route builds by itself when you're back online.
The landscape toast keeps clear of the Map's button column (round 2, D1).
Unused code removed:Brand, ThemedView, setWidget and the stored widget choice, the linkPrimary text role, IconButton's elevated, and two map styles.
An unreachable message removed: the Trip page's “Elevation profile unavailable.” The past-ride date check stays: it is tested, and guards what gets saved.
Web · the dashboard’s seven ideas built · 8, the App Store badge, built
Navigation, and an Overview for what you check
Every page of the web dashboard (yamdrive.hirahul.xyz/app) drawn in the proposed layout, at desktop, tablet and phone sizes, with the demo data. The ideas come from the Rivian in-car screens on hirahul.xyz/yamdrive. Landing and Download are the public site’s pages, drawn for idea 8. Pick a page and a state below; Now shows the page as it is today, loaded from the local web server.
Show
Zoom
Ideas on this screen
What changes from now
To build it
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
Token
Light
Night
Role
text
#242523
#F5F5F1
Primary copy
background
#F5F5F1
#141715
Screen canvas, sheet body
backgroundElement
#EAEAE5
#30342F
Secondary button, input, chip
backgroundSelected
#DEDFD8
#3C4039
Pressed row, active saved ride
textSecondary
#636760
#B2B7AD
Captions, hints, placeholders
tint
#665000
#F4C430
Icon / link accent
onTint
#242523
#242523
Copy on the yellow fill
border
#DCDDD6
#41453E
Hairlines, dividers, sheet handle
primary
#F4C430
#F4C430
Primary action fill
surface
#FFFFFF
#252825
Raised card
navigation
#246BAC
#70B4EF
Turn glyph in the guidance bar
rest
#E3DCEB
#3B3345
Break / checklist tile
fuel
#F0DFC4
#443B2A
Refuel tile
positive
#367923
#86CD65
Checklist progress
departure
#E8C2A6
#E8C2A6
Departure card ground
onFeature
#242523
#242523
Copy on departure / tiles
danger
#C22C24
#F87171
Destructive action, form error
healthGood
#DCEBD3
#28381F
Vehicle health tile · on track
healthSoon
#F3E3B5
#43391D
Due within 30 days or 500 km
healthDue
#F4D3CF
#4A2523
Service due
route
#368DDD
#368DDD
Route line, ride thumbnail
heat
#5B21B6
#5B21B6
Heatmap line
heatGlow
#8B5CF6
#8B5CF6
Heatmap glow, blurred under it
speedLow
#D9A52C
#D9A52C
Speed band · below range
onSpeedLow
#3A2A05
#3A2A05
Copy on the low band
speedBalanced
#3F7A50
#3F7A50
Speed band · within range
speedHigh
#B4502F
#B4502F
Speed band · above range
onSpeed
#FFFFFF
#FFFFFF
Copy on the green and red bands
eventTraffic
#D98B52
#D98B52
City event · traffic wait
eventStop
#6B6F68
#6B6F68
City event · stop
eventBreak
#8A72B8
#8A72B8
City event · break
eventAccel
#368DDD
#368DDD
City event · hard acceleration
eventBrake
#8C3A24
#8C3A24
City event · hard braking
fuelLevel
#E0A12E
#E8B04A
Energy tile · the fuel in the tank
fuelBody
#FBF4E8
#2E2819
Energy tile · the tank body
fuelOutline
#5C4424
#F0DFC4
Energy tile · the tank outline
reliefWall
#CFE2F4
#34506B
Route relief · the wall under the ribbon
reliefSteep
#1F5E99
#8CC4F2
Route relief · the colour at a 10 % grade
toggleThumb
#FFFFFF
#FFFFFF
Toggle · the thumb, white on either track
dock
#202220
#202220
Floating dock ground
dockIcon
#D3D5D1
#D3D5D1
Floating dock · inactive icon
scrim
11 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.
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
Use
Fill
Foreground
Where
origin pin “A”
#166534
#fff label, #fff 2 dp ring
MapPin · map.tsx, ride/[id].tsx
destination pin “B”
#991b1b
#fff label, #fff ring
MapPin · map.tsx, ride/[id].tsx
break · rest
#0369a1
#fff label, #fff ring
MapPin Rn · map.tsx
break · selected
#6d28d9
#fff label, #fff ring
MapPin, target set · map.tsx
search result · not fuel
#475569
#fff label, #fff ring
MapPin +n · map.tsx
you · idle
#2563eb
#fff label, #fff ring
MapPin “You” · map.tsx
petrol pill
#242523
#fff label · #fff border, #F4C430 when selected
PetrolMarker
petrol badge
#F4C430 · planned #E9C2A8
#242523 pump
PetrolMarker
petrol tip
#242523 arrow · #fff dot
#242523 dot ring
PetrolMarker
road label
#1769AA
#fff
“Toward …” · NavigationMarker
compass dial
#FFFFFF · ticks #D4D7D1
#242523 label
MapCompass
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 #a3a3a3
MapCredit
progress bars
#D5DDBB #E3D9EC
on #F5F5F1 · #242523 text
RideOverview
departure card
#D2C4DB → #E8B18E gradient
clock disc #242523, #F5F5F1 glyph
RidePreparation
category, selected
the category colour
#FFFFFF icon + label
CategoryPicker; 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
Scale
Key
dp
Applied to
Spacing
half / one / two
2 / 4 / 8
Icon gaps, label stacks, chip rows
three / four
16 / 24
Card padding, screen gutters, group gap
five / six
32 / 64
Empty-state padding, tall spacers
Radius
sm / md
8 / 16
Handle, toast · button, input, flat card
lg / xl
24 / 28
Screen card, route summary · sheet top, dock
pill
999
Chip, icon button, speed meter, marker
Layout
MinTouchSize
48
Every shared control
BottomTabInset
80 Android · 50 iOS
Material tab bar is the taller one
MaxContentWidth
800
Reading measure cap
dock clearance
inset + 84
Scroll 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.
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.
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
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.
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.
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.
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
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.
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.
speed number | null · city CityState · range SpeedRange · now number
· pauseddemo boolean · kmridingMs number · onPauseonResumeonEnd
· 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.
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.
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.
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
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.
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.
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.
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”.
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 20mEstimated arrival · 5:13 PM ISTApproximate 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 20mEstimated 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 40mEstimated arrival · 2:48 PM ISTDemo 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.
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.
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
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.
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.
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
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
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 · BangaloreCity Ride
idle · no trip yetno endpoints · no fit, no Route & stops
Plan Long RideCity 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
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 → Bangalore598 km · 9 h 58 min estimated · no live traffic
Update route
Town or address
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 rideGuntur → Bangalore598 km · 9 h 58 min estimated
Update route
Town or address
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 demoGuntur → Bangalore598 km · 9 h 58 min estimated · no live traffic
Update route
Town or address
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
petrol
Fuel nearbyMatches “petrol” · within 5 km
Looking up places…
SearchSuggestions · placesthe phone’s places first, then OpenStreetMap
nandi
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 PradeshBreakfast 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 MapsSaved 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 MapsAdd 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 destinationChoose 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 MapsEndpoints 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
RecordsCardrecords 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.
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.
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
StartGunturFinishVijayawada
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
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.
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
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.
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.
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.
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
Gate
Limit
Rejected value shows as
Fix age
≤ 8 000 ms, and no more than 2 000 ms in the future
Speed — · “Waiting for GPS”
Horizontal accuracy
0 – 30 m
Speed — · position not drawn
Reported speed
Finite and ≥ 0; converted ×3.6 to km/h
Speed —
Heading
0 – 360, and speed > 3 km/h
Compass “—”, marker falls back to a dot
Off route
Projection > 0.075 km (75 m)
“Off route” · distance, time and road label suppressed
Saved stop on route
Within 0.075 km of the line
Stop excluded from “Next”
Next stop lookahead
km > travelled + 0.025 km
Stop treated as passed
Arrival
< 0.025 km of geometry remaining
“Arriving at destination”
Altitude accuracy
0 – 30 m, fresh within 8 000 ms
Elevation —; session extrema kept
Elevation display
Reading < 8 s old, not demo, not paused
Elevation —
Route freshness
roadRoute.signature must equal the current origin, destination, pins and stops
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
Field
Accepted
On load, otherwise
Error copy
distanceKm
1 – 3 000
600
Both forms: “Distance estimate (km): enter a number from 1 to 3,000.”
averageKph
10 – 120
60
Ride settings: “Planning pace (km/h): enter a number from 10 to 120.”
breakEveryMinutes
15 – 180
60
Ride settings: “Rest every (min): enter a number from 15 to 180.”
breakMinutes
5 – 120
15
Ride settings: “Break length (min): enter a number from 5 to 120.”
fuelEveryKm
20 – 500, or null (blank field)
null if missing; 150 if out of range
Ride settings: “Fuel interval (km, optional): enter a number from 20 to 500.”
speedRange
0 – 200, max > min, both or neither
unset
Ride 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 trip
unset
Departure and New trip: “Use 24-hour time, for example 05:00 or 16:30.”
origin · destination
Non-empty; stored trimmed and cut to 200 chars
''
Both forms: “Choose a start and destination.”
originPin · destinationPin
Finite, |lat| ≤ 90, |lon| ≤ 180
pin dropped
—
preRideChecks
Filtered against PRE_RIDE_CHECKS ids; reset to [] when the endpoints or departure change
unset unless an array
—
lightMap
boolean
unset
—
trip name
TextField maxLength 100 only; Save name disabled while blank; New trip blank becomes “origin → destination”
“My trip” if blank or not a string
—
saved stop
Non-empty id, finite coordinates in range
stop dropped; blank name “Unnamed stop”; unknown category other
—
trip · library
Non-empty, unique id
trip dropped; unknown activeId opens the first trip