refactor(app): audit element properties and strip irrelevant controls on map elements #57
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 264 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.334
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #57"
general
weight: 0.35
FrancescoCastaldi
Summary
Audits element properties for course maps across the UI, template schema, and chart renderer, addressing the course maps audit sub-item in TODOS.md:
1. UI restrictions (ElementProperties.svelte):
- Restricts Fill (color and opacity) to scalar metric plots (elevation, speed, power, etc.) and hides it when item.value === 'course', because GPS route lines have no area under curve.
- Restricts Point Label (show value at marker, font, size, italic, units, decimal rounding) to scalar metric plots and hides it for course maps.
- Updates setAllColors so basic-mode bulk color updates do not inject unused fill or point_label color patches into course map element configs.
- Switching an element's metric to course leaves existing fill and point_label keys in the config untouched; they are hidden in the UI and come back if the metric is switched away from course.
2. Template schema & deserialization (template.rs):
- Added PlotConfig::is_course(), PlotConfig::effective_fill(), and PlotConfig::effective_point_label(). fill_opacity() and fill_color() delegate to effective_fill(), returning None for course plots.
- Saved configs are never stripped: fill and point_label stay in the JSON, and the renderer ignores them for course plots via the effective_* accessors (hide in UI + ignore at render).
3. Renderer alignment (chart.rs):
- ChartCache::build loads effective_point_label(), skipping font loading for course maps.
- render_chart_background skips fill drawing for course maps via effective_fill() and ColorBy::color_fill(is_course), ensuring route paths are rendered cleanly without baseline artifacts.
4. Task tracking (TODOS.md):
- Split the Element properties audit item into a completed sub-bullet for course maps, keeping the remaining audit tasks open for subsequent element types.
Verification