Skip to content

feat: add regional bikeways, fix trail hover rendering#453

Merged
fatherlinux merged 2 commits into
masterfrom
feature/trail-bikeways-and-hover-fix
May 31, 2026
Merged

feat: add regional bikeways, fix trail hover rendering#453
fatherlinux merged 2 commits into
masterfrom
feature/trail-bikeways-and-hover-fix

Conversation

@fatherlinux
Copy link
Copy Markdown
Member

Summary

  • New trail POIs with OSM geometry and Biking activity: Cleveland Lakefront Bikeway (17mi), Cleveland Foundation Centennial Trail, Bike & Hike Trail (33mi), Portage Hike & Bike Trail (11mi)
  • Updated trails: Ohio & Erie Canal Towpath Trail (full 110mi geometry replaces stub), Mud Brook Greenway Trail (added Biking activity)
  • Bug fix: Trail hover rendering — replaced CSS drop-shadow filter 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.
  • Feature: Trails with matching activities now show when their activity filter is active (e.g. clicking Biking shows biking trails even if the Trails toggle is off)

The Cleveland Lakefront Bikeway serves as the news target for the Euclid Beach Connector project (under construction 2026-2027).

Test plan

  • Navigate to /cleveland-lakefront-bikeway — verify trail renders along Edgewater lakefront
  • Click None then Biking in POI panel — verify all biking trails appear (CLB, Towpath, Bike & Hike, Centennial, Portage, Freedom)
  • Hover trails with MultiLineString geometry (Keystone Loop, CLB) — verify NO stray fragments appear
  • Hover marker icons — verify blue drop-shadow glow still works
  • Verify Towpath renders full length from Cleveland to south of New Philadelphia

🤖 Generated with Claude Code

fatherlinux and others added 2 commits May 31, 2026 09:53
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>
@fatherlinux fatherlinux merged commit 99c0386 into master May 31, 2026
3 checks passed
@fatherlinux fatherlinux deleted the feature/trail-bikeways-and-hover-fix branch May 31, 2026 13:57
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +21 to +24
UPDATE pois
SET primary_activities = 'Biking, Hiking'
WHERE name = 'Mud Brook Greenway Trail'
AND (primary_activities IS NULL OR primary_activities = '');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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';

Comment on lines +629 to +630
visibleTypes.has('boundary') ||
isFilteredMode;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
visibleTypes.has('boundary') ||
isFilteredMode;
visibleTypes.has('boundary') ||
(iconConfig && Array.from(visibleTypes).some(type => iconConfig.find(icon => icon.name === type)?.activity_fallbacks));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant