From the 2026-07-16 debt review (finding 6). Severity: high (maintenance).
GoogleMapRenderer.kt:302-324,779-790 and MapLibreRenderer.kt:211-239,246-256 carry the identical ~60-line algorithm: identity/equality early-out, reconcileEqualItems diff, per-index width comparison against renderedRouteWidths, retained-native width patching, the three-field state update, and the camera-settle width-resync loop. #1865 introduced the copy in both flavors; #1892 grew it in parallel (the renderedRouteWidthScale: Float? → renderedRouteWidths: List<Float> migration was applied twice), and one #1865 review fix had to be applied to both copies — the hazard has already materialized.
The platform-specific surface is only three operations: create a native line, remove one, set its width.
Fix (medium): a RoutePolylineReconciler<NativeLine> beside the existing map/render/ListReconciliation.kt, parameterized by those three lambdas. Lower-priority echo: the renderedStops/renderedFocusedStopId/renderedScaleWithZoom dedup-guard triple copied between GoogleRouteStopBitmapLayer.kt:66-93 and MapLibreRouteStopCircleLayer.kt:99-109 (drawing strategies genuinely differ there).
From the 2026-07-16 debt review (finding 6). Severity: high (maintenance).
GoogleMapRenderer.kt:302-324,779-790andMapLibreRenderer.kt:211-239,246-256carry the identical ~60-line algorithm: identity/equality early-out,reconcileEqualItemsdiff, per-index width comparison againstrenderedRouteWidths, retained-native width patching, the three-field state update, and the camera-settle width-resync loop. #1865 introduced the copy in both flavors; #1892 grew it in parallel (therenderedRouteWidthScale: Float?→renderedRouteWidths: List<Float>migration was applied twice), and one #1865 review fix had to be applied to both copies — the hazard has already materialized.The platform-specific surface is only three operations: create a native line, remove one, set its width.
Fix (medium): a
RoutePolylineReconciler<NativeLine>beside the existingmap/render/ListReconciliation.kt, parameterized by those three lambdas. Lower-priority echo: therenderedStops/renderedFocusedStopId/renderedScaleWithZoomdedup-guard triple copied betweenGoogleRouteStopBitmapLayer.kt:66-93andMapLibreRouteStopCircleLayer.kt:99-109(drawing strategies genuinely differ there).