Make Veo dockless rentals user-friendly#92
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The Bend Veo feed returns one record per physical vehicle (~208), which the
station-shaped UI rendered as 208 serial-numbered sidebar cards with identical
noise badges, while the vehicle_types and system_pricing_plans feeds we'd
configured went unused.
- Resolve each vehicle's real type ("E-bike") and price ("$1 to unlock +
$0.39/min") from the vehicle_types + system_pricing_plans feeds; surface the
remaining range and a "Rent in <provider> app" deep link in the popup.
- Collapse the per-vehicle sidebar list into one fleet summary card for
free-bike providers (count, type breakdown, shared price); clicking it fits
the map to the fleet bounds. Station providers (Chattanooga) are unchanged.
- Enrichment feeds are optional and degrade gracefully; the rental deep link is
restricted to http(s) so it's safe in an href. Reuses METERS_PER_MILE /
formatDistance from utils/format.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Resolve map.css conflict: keep the new .rental-link styles; drop the .osm-trail-* block, which main refactored away (PR #87) and which the merged osm-trails popup no longer references.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Bend uses Veo, a dockless (free-bike) GBFS provider — unlike Chattanooga's station-based feed, it returns one record per physical vehicle (~208). The station-shaped UI rendered all 208 as serial-numbered sidebar cards (
Veo 1014956) with identical noise badges (Shared Vehicle / Use Veo app / When available), and thevehicle_types+system_pricing_plansfeeds we'd already wired into the Bend config were never fetched.Changes
Enrich each vehicle (
src/data/gbfs.ts)vehicle_types+system_pricing_plansfeeds (in parallel, degrade gracefully on failure) and resolve real values per vehicle:"E-bike"(form-factor × propulsion)"$1 to unlock + $0.39/min"(was a hardcoded"Use Veo app")rental_urisdeep link (previously parsed only for a serial, then discarded)Enrich the map popup (
MapMarkers.tsx) — adds the remaining range and a "Rent in Veo app →" button. Station popups (Chattanooga) are unchanged.Collapse the sidebar (
BikeRentalList.tsx) — for free-bike providers the 208 cards become one fleet summary card (count, type breakdown, shared price); clicking it fits the map to the fleet bounds. Station providers keep the per-station list.Review
Built under
/code-review max(recall-focused). 14 findings surfaced and fixed before this PR, including:hrefwith only HTML-escaping — now restricted tohttp(s)so ajavascript:link can't execute.$1.50, not$1.5), lowest-start paid tier (skips a free intro tier), billing interval, single-shared-price-or-none (no misleading "dominant" price for mixed fleets).vehicleTypeLabelelectric check by explicit set (no longer mislabels combustion/hybrid).METERS_PER_MILE/formatDistance; cachedIntl.NumberFormat; memoized summary.Out of scope (by design)
Map-marker clustering (the 208 pins) was explicitly deferred — this PR only collapses the sidebar + enriches data.
Testing
pnpm test:run→ 361 passing (+11 new for the GBFS enrichment),pnpm lint+tscclean.🤖 Generated with Claude Code