Gregario · identity ■ Blocked — waiting on a human 3 days
When a rider signs up after riding anonymously, which rides move to the new account?
Everything else on the branch is written and green. This is the last thing left and I can't decide it for you: it's a product call about whose rides are whose, not a technical one. It is ambiguous in exactly two cases — the same phone has held two anonymous sessions, or the email already exists with rides of its own. Pick a rule below and I'll implement it as written.
Three rules, pick one
A · B · CAll three are the same amount of work, roughly a day. They differ only in who ends up owning a ride when the answer isn't obvious.
AThe device wins
Every anonymous ride on the phone attaches to the new account, no prompt.
Nobody ever loses a ride. On a borrowed or shared phone you silently inherit a stranger's rides, and there is no way to hand them back.
If the email already has rides: keep both sets, dedupe by ride id, last write wins.
BThe session wins
Only rides from the anonymous session signed in at that moment attach.
Predictable and never wrong about ownership. Rides from an earlier anonymous session on the same phone stay local and are gone at the next reinstall — about 60 of the 412.
If the email already has rides: the server's rides stand, local extras attach around them.
CAsk the rider
Sign-up lists the local rides by date and distance; the rider ticks the ones that are theirs.
Correct in every case. Costs a new screen in the sign-up flow and asks a question at the moment people are least willing to answer one; expect drop-off.
If the email already has rides: the clash is shown and the rider resolves it.