diff --git a/client/src/pages/TeslaTripPlanner.tsx b/client/src/pages/TeslaTripPlanner.tsx index de63ceb..3fe32cc 100644 --- a/client/src/pages/TeslaTripPlanner.tsx +++ b/client/src/pages/TeslaTripPlanner.tsx @@ -1396,7 +1396,11 @@ function TopBar({ onDisconnectTesla: () => void; inCar: boolean; }) { - const hideVehicleChip = inCar && !!teslaStatus?.connected; + // Tesla connected → we know the car, so the manual vehicle picker is dead weight. + const hideVehicleChip = !!teslaStatus?.connected; + // In-car AND connected → origin is the car's actual GPS, so collapse the + // From input to a static pill (typing on a touchscreen sucks). + const showFromAsPill = inCar && !!teslaStatus?.connected; const hideGpxChip = inCar; const [locating, setLocating] = React.useState(false); const handleLocate = async () => { @@ -1435,15 +1439,26 @@ function TopBar({ >
- onOriginChange(e.target.value)} - onKeyDown={(e) => { if (e.key === 'Enter') { e.currentTarget.blur(); onODCommit(); } }} - onBlur={onODCommit} - placeholder="From" - className="bg-transparent border-none outline-none text-[13px] w-full" - style={{ color: 'var(--gd-text)' }} - /> + {showFromAsPill ? ( +
+ + {origin || 'Locating your car…'} +
+ ) : ( + onOriginChange(e.target.value)} + onKeyDown={(e) => { if (e.key === 'Enter') { e.currentTarget.blur(); onODCommit(); } }} + onBlur={onODCommit} + placeholder="From" + className="bg-transparent border-none outline-none text-[13px] w-full" + style={{ color: 'var(--gd-text)' }} + /> + )}