Skip to content

2.5.25: switch between your cars (issue #52) - #65

Merged
CalmAussie merged 5 commits into
mainfrom
claude/project-thread-hbnfgb
Dec 2, 2026
Merged

CalmAussie merged 5 commits into
mainfrom
claude/project-thread-hbnfgb

Conversation

@CalmAussie

Copy link
Copy Markdown
Owner

Requested by George · project thread

What this adds

Switch between your cars (idea from issue #52). A car button sits in the home screen's top bar, next to the style button, with a small count once there are two or more cars. It opens Your cars: each car with the adapter used with it, the chosen one ticked. Tap a car to switch; the screen is rebuilt with that car's settings.

Each car keeps its own: make, year, model and engine, where it was sold, protocol, a typed-in VIN, the adapter (Bluetooth or Wi-Fi), Dashboard tiles, graphs, custom readings and Android Auto readings. Units, styles, alerts and the histories stay shared (code history was already kept per car).

  • Add a car starts an empty car and opens the car sheet. Closing the sheet without saving goes back to the car that was chosen.
  • Edit cars gives a car a nickname or removes it (removing the chosen car switches to the next one).
  • Switching while connected asks to disconnect first.
  • With two or more cars, a line under the connection status says which car is chosen and its adapter. With one car the home screen looks as before.
  • On narrow phones the app name in the top bar shortens with "…" to make room for the button.

How it works

The app's settings keep holding the chosen car's copy, so nothing else in the app changed how it reads them. CarProfiles (pure Kotlin, JVM-tested) keeps the list and works out the swaps; CarGarage saves them on the phone.

Backups: the list (car_profiles) and the chosen car (active_car) are backed up. Every value inside the list is checked with the backup's existing rules, so a crafted backup can't slip in a public Wi-Fi address or a non read-only custom reading, and Bluetooth adapters never leave the phone. Each car's VIN goes in only when the user includes the VIN. Restoring joins the backup's list with the phone's and keeps this phone's Bluetooth adapter for the same car; an older backup's car joins the list instead of replacing the chosen car.

Tests

  • New CarProfilesTest (14 tests: add, switch and back, unfinished add, remove, cap of 20, nicknames, bad lines, backups with and without VIN, value checks, restore merge). CarProfilesTest + BackupFileTest pass on the JVM.
  • Test tour: a new step (debug builds) gives two cars through demo_car_add / demo_cars_clear, shoots the car button, the list, the switch, and Add a car closed without saving (Pit lane and Asphalt).
  • Live preview (preview/index.html) has the car button and sheets.

Version 2.5.25.


Generated by Claude Code

A car button beside the style button lists the user's cars; tapping one
switches to it and the app takes that car's own settings: the car, where
it was sold, protocol, typed-in VIN, adapter, Dashboard tiles, graphs,
custom readings and Android Auto readings. Units, styles and alerts stay
shared. Add a car opens the car sheet (closing it without saving goes
back to the previous car); Edit cars gives a nickname or removes a car.
Switching while connected asks to disconnect first.

The app's settings keep holding the chosen car's copy, so the rest of
the app is unchanged; CarProfiles saves and swaps the per-car copies.
Backups carry the list, every value checked with the backup's own rules
(Bluetooth adapters never leave the phone; each car's VIN only when the
user includes it). Restoring joins the backup's list with the phone's,
keeping this phone's adapter for the same car; an older backup's car
joins the list instead of replacing the chosen car.

Tour: two cars via debug-only demo_car_add / demo_cars_clear extras,
the list, a switch, and Add a car closed without saving. Live preview
has the car button and sheet too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
@CalmAussie CalmAussie self-assigned this Dec 1, 2026
@CalmAussie
CalmAussie marked this pull request as ready for review December 1, 2026 15:08
Design gate: the app name no longer gets cut short on most phones. AM/PM
on the top bar's clock is drawn at 60 % size, as phone clocks do, and
the app name autosizes from 22sp down to 16sp before the ellipsis is
used. Count badge text 11sp. Tour: one more shot at 360dp wide.

Pen test note: restoring a backup with 20 cars no longer pushes out cars
that are only on this phone; the backup's last cars are left out instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
…nd argument

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
…00dp, 22sp from 400dp)

The design check of the 360dp tour shot found the clock at 22sp beside an app name that had
autosized down to 15-16sp. Both now take @dimen/top_bar_title; the name keeps its autosize
(down to 14sp) for large font sizes. The tour also takes the 360dp shot in Race telemetry,
whose heading font is condensed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
@CalmAussie
CalmAussie merged commit 77c7316 into main Dec 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants