fix(share): open shared EV charger links on the EV layer for new visitors - #145
Conversation
…tors A station share link carried no fuel, so a fresh visitor landed on the default fuel; the viewport fetch is fuel-filtered, the charger never loaded and the popup never opened (#129). Station links now carry the fuel they were shared from, and the deep-link reader honours it the way route links already did. Old links without a fuel behave as before.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughStation share URLs now preserve the selected fuel. Station deep-link parsing validates that fuel and applies valid values. Tests cover EV, default, invalid, absent, and serialized fuel values. ChangesStation fuel deep links
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change preserves and validates station-link fuel selection with regression coverage for valid, invalid, and absent values. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Sharing an EV charger produced
/es?station=ES:reve-…&lat=…&lng=…with no fuel. A fresh visitor opened that on the default fuel (Diesel A); the viewport fetch is fuel-filtered, so the charger never loaded and the deep-link resolver, which only matches loaded features, never opened the popup. The visitor saw diesel stations around the spot with no hint anything failed. Since #143 every German charger link is affected too.Fixes #129 the way the issue sketched it:
buildStationQuerycarries the fuel the station was shared from (popup share/copy, and the URL the app writes on selection).readDeepLink's station branch validates and appliesfuelexactly like the route branch already did.Links without a fuel behave as before (default fuel), and an invalid code is ignored. Regression tests on all three layers (URL helpers, popup share link, HomeClient deep-link read); each was checked to fail against the unfixed code.
Summary by CodeRabbit