fix(engine): a legend's lists bind every layer of a name they give #3622
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 228 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.325
Real PR Conversation Timeline
1 comments
"Review active on #3622"
general
weight: 0.35
github-actions[bot]
Summary
A legend's
exclude,layerOrder,columnBreaks,labelsandclassLabelsname layers, and the legend applies each name to every layer of the frame's map that has it, in any case. The inputs oflayout.addElementandlayout.updatetook only the first of those layers, so an exact approval didn't bind the others.legend_inputs, which both commands and all five lists go through, now binds every layer of a named name in the frame's map.Map::layer_by_nameis unchanged, and so is what a table, chart or colorbar binds, which each read one layer.Surfaces: the change is in the shared engine, in what
layout.addElementandlayout.updatebind when a plan is approved, so the Assistant, MCP and any other surface that plans these two commands get it, whichever app it runs in. No command, option or tool description changed, and there is nothing to add to the ribbon, shortcuts, command search or any pane. Nothing saved or undone changes.Testing
crates/engine/src/tests/layout_legend_shared_names.rs: with two layers named Rivers, each of the five lists (and another case of the name) binds both, through both commands; with one, only that layer is bound, a same-named layer in another map isn't, and a call that gives no list binds none. The first test fails without the fix (left: [(2, 4)],right: [(2, 3), (2, 4)]).rustgis-geolibreand theline_strokes_editor_edits_one_classsmoke test, #3411). After a last change to one new test, the 62layout_legendtests, fmt and clippy ofrustgis-enginepass again.UI evidence
No visible UI change.
Related issue
Closes #3288.