feat: add regional bikeways, fix trail hover rendering#453
Conversation
Add four regional biking trails with OSM geometry and Biking activity: - Cleveland Lakefront Bikeway (17mi, Euclid Beach Connector news target) - Cleveland Foundation Centennial Trail (Flats connector) - Bike & Hike Trail (33mi, Summit/Portage counties) - Portage Hike & Bike Trail (11mi, Kent to Ravenna) Update existing trails with Biking activity: - Ohio & Erie Canal Towpath Trail (full 110mi OSM geometry replaces stub) - Mud Brook Greenway Trail Fix trail hover rendering bug: replace CSS drop-shadow filter with direct stroke color override for SVG paths. The filter forced browsers to composite all child <path> elements in SVG <g> groups, defeating Leaflet's viewport clipping and causing distant MultiLineString segments to render as stray fragments during hover. Also show trails when their activity filter is active (e.g. Biking) even if the Trails layer toggle is off. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix migration comment numbers to match filenames (076, 077) - Replace overly broad `visibleTypes.size > 0` with `isFilteredMode` in includeLinearFeatures guard — the per-feature check handles activity matching, so the guard just needs to not skip the scan Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request adds new trail POIs (Cleveland Lakefront Bikeway and Portage Hike & Bike Trail) via database migrations, documents extensive park boundary data in the boundaries README, and updates the map frontend to support highlighting and filtering of linear features. The code review identified two key issues: first, a SQL migration update condition for the Mud Brook Greenway Trail is too restrictive and may silently skip updating existing records; second, an unconditional check in the map bounds tracker defeats a performance optimization by always enabling linear features in filtered mode, which should instead be restricted to active activity filters.
| UPDATE pois | ||
| SET primary_activities = 'Biking, Hiking' | ||
| WHERE name = 'Mud Brook Greenway Trail' | ||
| AND (primary_activities IS NULL OR primary_activities = ''); |
There was a problem hiding this comment.
The condition AND (primary_activities IS NULL OR primary_activities = '') will prevent this update from running if the Mud Brook Greenway Trail already has any existing activities (such as 'Hiking'). Since the goal is to add 'Biking' to this trail, and the trail likely already exists with 'Hiking', this condition will cause the migration to silently skip updating the trail.
We should update the activities to 'Biking, Hiking' unconditionally or check if 'Biking' is not already present.
UPDATE pois
SET primary_activities = 'Biking, Hiking'
WHERE name = 'Mud Brook Greenway Trail';| visibleTypes.has('boundary') || | ||
| isFilteredMode; |
There was a problem hiding this comment.
The addition of || isFilteredMode to the includeLinearFeatures condition creates a tautology (!isFilteredMode || isFilteredMode), which makes includeLinearFeatures always evaluate to true. This completely bypasses the performance optimization intended to skip processing linear features when the map is filtered to a small set of specific point POIs.
Instead of unconditionally enabling linear features in filtered mode, we should only enable them if one of the active filters is an activity filter (i.e., has activity_fallbacks in iconConfig). This preserves the optimization while still showing trails when their activity filter is active.
| visibleTypes.has('boundary') || | |
| isFilteredMode; | |
| visibleTypes.has('boundary') || | |
| (iconConfig && Array.from(visibleTypes).some(type => iconConfig.find(icon => icon.name === type)?.activity_fallbacks)); |
Summary
drop-shadowfilter with direct stroke color override for SVG paths. The filter forced browsers to composite all<path>elements in<g>groups, defeating Leaflet's viewport clipping and rendering distant MultiLineString segments as stray fragments during hover.The Cleveland Lakefront Bikeway serves as the news target for the Euclid Beach Connector project (under construction 2026-2027).
Test plan
/cleveland-lakefront-bikeway— verify trail renders along Edgewater lakefront🤖 Generated with Claude Code