feat: prompt vehicle selection on login after auto-downgrade (#60) #62
Reference in New Issue
Block a user
Delete Branch "issue-60-vehicle-selection-prompt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When a user's subscription is auto-downgraded to free tier (via grace period expiration) and they have more than 2 vehicles, they are now prompted to select which 2 vehicles to keep active on their next login.
Fixes #60
Changes
Backend
GET /api/subscriptions/needs-vehicle-selectionendpoint{ needsSelection, vehicleCount, maxAllowed }based on:tier_vehicle_selectionsFrontend
useNeedsVehicleSelectionhook withstaleTime: 0for fresh checks on loginVehicleSelectionDialogwithblockingprop:App.tsxafter auth gate ready:Test Plan
Acceptance Criteria from Issue
needsSelectionstatus🤖 Generated with Claude Code
- Add GET /api/subscriptions/needs-vehicle-selection endpoint - Returns { needsSelection, vehicleCount, maxAllowed } - Checks: free tier, >2 vehicles, no existing selections 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>